diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-10-30 11:51:52 +0200 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2021-10-30 22:33:34 +0200 |
| commit | d0a31645145aa34dc41e0f4defcdf8c909b10416 (patch) | |
| tree | 85d4b11136c49452b279731f5f6c60da17c044d5 /searx/static/themes/simple/src/less/toolkit.less | |
| parent | 67b0b68b407b6080dd3b9e424eb2cfefbda87e13 (diff) | |
[fix] simple theme: /preferences: dark theme version for select widgets
It is not possible to use CSS variable in a SVG when this is in a background.
This commit adds two .svg files, less converts them into data URL.
The two files are indentical except the fill color.
Diffstat (limited to 'searx/static/themes/simple/src/less/toolkit.less')
| -rw-r--r-- | searx/static/themes/simple/src/less/toolkit.less | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/searx/static/themes/simple/src/less/toolkit.less b/searx/static/themes/simple/src/less/toolkit.less index 74cc55f0c..681da43e7 100644 --- a/searx/static/themes/simple/src/less/toolkit.less +++ b/searx/static/themes/simple/src/less/toolkit.less @@ -328,7 +328,7 @@ select { -moz-appearance: none; border: none; border-bottom: 1px solid var(--color-toolkit-select-border); - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat; + background: data-uri('image/svg+xml;charset=UTF-8', @select-light-svg-path) no-repeat; background-position-x: 105%; background-size: 2em; background-origin: content-box; @@ -339,6 +339,12 @@ select { border-bottom: 1px solid var(--color-search-border); } } + + @media (prefers-color-scheme: dark) { + select { + background-image: data-uri('image/svg+xml;charset=UTF-8', @select-dark-svg-path); + } + } } /* -- checkbox-onoff -- */ |