Merge values with same colors

This commit is contained in:
Guillaume Gomez 2023-08-19 17:51:23 +02:00
parent ba33bb4569
commit 87a0efbf02
1 changed files with 20 additions and 37 deletions

View File

@ -5,10 +5,8 @@ show-text: true
define-function: ( define-function: (
"check-search-colors", "check-search-colors",
( (
theme, search_input_border, search_input_background, search_input_color, theme, border, background, search_input_color, search_input_border_focus,
search_input_border_focus, menu_button_border, menu_button_a_color, menu_button_a_border, menu_button_border, menu_button_a_color, menu_button_a_border_hover, menu_a_color,
menu_button_a_background, menu_button_border_hover, menu_button_a_hover,
menu_button_a_border_hover, menu_button_a_background_hover, menu_a_color,
), ),
block { block {
set-local-storage: { set-local-storage: {
@ -19,8 +17,8 @@ define-function: (
assert-css: ( assert-css: (
".search-input", ".search-input",
{ {
"border-color": |search_input_border|, "border-color": |border|,
"background-color": |search_input_background|, "background-color": |background|,
"color": |search_input_color|, "color": |search_input_color|,
}, },
) )
@ -30,7 +28,7 @@ define-function: (
".search-input", ".search-input",
{ {
"border-color": |search_input_border_focus|, "border-color": |search_input_border_focus|,
"background-color": |search_input_background|, "background-color": |background|,
"color": |search_input_color|, "color": |search_input_color|,
}, },
) )
@ -42,22 +40,22 @@ define-function: (
"#help-button > a", "#help-button > a",
{ {
"color": |menu_button_a_color|, "color": |menu_button_a_color|,
"border-color": |menu_button_a_border|, "border-color": |border|,
"background-color": |menu_button_a_background|, "background-color": |background|,
}, },
) )
// Hover help button. // Hover help button.
move-cursor-to: "#help-button" move-cursor-to: "#help-button"
assert-css: ( assert-css: (
"#help-button:hover", "#help-button:hover",
{"border-color": |menu_button_border_hover|}, {"border-color": |menu_button_border|},
) )
assert-css: ( assert-css: (
"#help-button > a", "#help-button > a",
{ {
"color": |menu_button_a_hover|, "color": |menu_button_a_color|,
"border-color": |menu_button_a_border_hover|, "border-color": |menu_button_a_border_hover|,
"background-color": |menu_button_a_background_hover|, "background-color": |background|,
}, },
) )
// Link color inside // Link color inside
@ -76,8 +74,8 @@ define-function: (
"#settings-menu > a", "#settings-menu > a",
{ {
"color": |menu_button_a_color|, "color": |menu_button_a_color|,
"border-color": |menu_button_a_border|, "border-color": |border|,
"background-color": |menu_button_a_background|, "background-color": |background|,
}, },
) )
// Hover settings menu. // Hover settings menu.
@ -89,9 +87,9 @@ define-function: (
assert-css: ( assert-css: (
"#settings-menu:hover > a", "#settings-menu:hover > a",
{ {
"color": |menu_button_a_hover|, "color": |menu_button_a_color|,
"border-color": |menu_button_a_border_hover|, "border-color": |menu_button_a_border_hover|,
"background-color": |menu_button_a_background_hover|, "background-color": |background|,
}, },
) )
}, },
@ -101,18 +99,13 @@ call-function: (
"check-search-colors", "check-search-colors",
{ {
"theme": "ayu", "theme": "ayu",
"search_input_border": "rgb(92, 103, 115)", "border": "rgb(92, 103, 115)",
"search_input_background": "rgb(20, 25, 32)", "background": "rgb(20, 25, 32)",
"search_input_color": "rgb(255, 255, 255)", "search_input_color": "rgb(255, 255, 255)",
"search_input_border_focus": "rgb(92, 103, 115)", "search_input_border_focus": "rgb(92, 103, 115)",
"menu_button_border": "rgb(197, 197, 197)", "menu_button_border": "rgb(197, 197, 197)",
"menu_button_a_color": "rgb(255, 255, 255)", "menu_button_a_color": "rgb(255, 255, 255)",
"menu_button_a_border": "rgb(92, 103, 115)",
"menu_button_a_background": "rgb(20, 25, 32)",
"menu_button_border_hover": "rgb(197, 197, 197)",
"menu_button_a_hover": "rgb(255, 255, 255)",
"menu_button_a_border_hover": "rgb(224, 224, 224)", "menu_button_a_border_hover": "rgb(224, 224, 224)",
"menu_button_a_background_hover": "rgb(20, 25, 32)",
"menu_a_color": "rgb(57, 175, 215)", "menu_a_color": "rgb(57, 175, 215)",
} }
) )
@ -120,18 +113,13 @@ call-function: (
"check-search-colors", "check-search-colors",
{ {
"theme": "dark", "theme": "dark",
"search_input_border": "rgb(224, 224, 224)", "border": "rgb(224, 224, 224)",
"search_input_background": "rgb(240, 240, 240)", "background": "rgb(240, 240, 240)",
"search_input_color": "rgb(17, 17, 17)", "search_input_color": "rgb(17, 17, 17)",
"search_input_border_focus": "rgb(0, 141, 253)", "search_input_border_focus": "rgb(0, 141, 253)",
"menu_button_border": "rgb(221, 221, 221)", "menu_button_border": "rgb(221, 221, 221)",
"menu_button_a_color": "rgb(0, 0, 0)", "menu_button_a_color": "rgb(0, 0, 0)",
"menu_button_a_border": "rgb(224, 224, 224)",
"menu_button_a_background": "rgb(240, 240, 240)",
"menu_button_border_hover": "rgb(221, 221, 221)",
"menu_button_a_hover": "rgb(0, 0, 0)",
"menu_button_a_border_hover": "rgb(255, 185, 0)", "menu_button_a_border_hover": "rgb(255, 185, 0)",
"menu_button_a_background_hover": "rgb(240, 240, 240)",
"menu_a_color": "rgb(210, 153, 29)", "menu_a_color": "rgb(210, 153, 29)",
} }
) )
@ -139,18 +127,13 @@ call-function: (
"check-search-colors", "check-search-colors",
{ {
"theme": "light", "theme": "light",
"search_input_border": "rgb(224, 224, 224)", "border": "rgb(224, 224, 224)",
"search_input_background": "rgb(255, 255, 255)", "background": "rgb(255, 255, 255)",
"search_input_color": "rgb(0, 0, 0)", "search_input_color": "rgb(0, 0, 0)",
"search_input_border_focus": "rgb(102, 175, 233)", "search_input_border_focus": "rgb(102, 175, 233)",
"menu_button_border": "rgb(0, 0, 0)", "menu_button_border": "rgb(0, 0, 0)",
"menu_button_a_color": "rgb(0, 0, 0)", "menu_button_a_color": "rgb(0, 0, 0)",
"menu_button_a_border": "rgb(224, 224, 224)",
"menu_button_a_background": "rgb(255, 255, 255)",
"menu_button_border_hover": "rgb(0, 0, 0)",
"menu_button_a_hover": "rgb(0, 0, 0)",
"menu_button_a_border_hover": "rgb(113, 113, 113)", "menu_button_a_border_hover": "rgb(113, 113, 113)",
"menu_button_a_background_hover": "rgb(255, 255, 255)",
"menu_a_color": "rgb(56, 115, 173)", "menu_a_color": "rgb(56, 115, 173)",
} }
) )