diff options
author | 2019-06-25 13:56:07 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:55 +0300 | |
commit | 72d02a353882ff245b38a273c1b2851ce04c9677 (patch) | |
tree | c05d4cef1a71c0c0a202247beb84a34bd708cb74 /vnext | |
parent | 8f9f5acccf45155dfd2a544c901477a723d28e23 (diff) |
Trying to use css variables
Diffstat (limited to 'vnext')
-rw-r--r-- | vnext/src/index.css | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/vnext/src/index.css b/vnext/src/index.css index 2fb4c087..225379d7 100644 --- a/vnext/src/index.css +++ b/vnext/src/index.css @@ -1,7 +1,8 @@ @custom-media --viewport-desktop (width >=62.5rem); :root { --main-width: 1000px; - color-scheme: light dark; + --background-color: #fff; + --text-color: #363636; } * { @@ -34,7 +35,7 @@ body { background: #f8f8f8; text-size-adjust: 100%; word-break: break-word; - color: #363636; + color: var(--text-color); line-height: 1.4; text-rendering: optimizeLegibility; } @@ -106,7 +107,7 @@ hr { #header { grid-area: header; - background: #fff; + background: var(--background-color); border-bottom: 1px solid #eee; transition: transform 0.2s; overflow-x: hidden; @@ -129,7 +130,7 @@ hr { display: flex; flex-direction: row; justify-content: space-around; - background: #fff; + background: var(--background-color); border-top: 1px solid #eee; } @@ -148,7 +149,7 @@ hr { display: none; background: #f8f8f8; border-top: 1px solid #ccc; - color: #363636; + color: var(--text-color); padding: 10px; transition: margin-left 0.4s; overflow-x: hidden; @@ -253,7 +254,7 @@ hr { } #search input { - background: #FFF; + background: var(--background-color); border: 1px solid #ccc; outline: none !important; padding: 4px; @@ -359,11 +360,8 @@ hr { } @media (prefers-color-scheme: dark) { - body { - background: #363636; - color: #fff; - } - a { - color: #ff9966; + :root { + --background-color: #363636; + --text-color: #fff; } } |