diff options
| author | 2024-01-28 21:03:44 +0800 | |
|---|---|---|
| committer | 2024-01-28 21:08:17 +0800 | |
| commit | 86ec2108527f300433bbb642e492c95726fa0ae5 (patch) | |
| tree | c229802cdfeda13e9d6fd53ab4ccd2cd31930788 /pydis_site/static/css/base/themes.css | |
| parent | Add section about dark mode in guide for contributing a page (diff) | |
| parent | Merge pull request #1176 from hedyhli/gdwr-dark-theme (diff) | |
Merge branch 'main' into docs/dark-theme
Diffstat (limited to 'pydis_site/static/css/base/themes.css')
| -rw-r--r-- | pydis_site/static/css/base/themes.css | 69 | 
1 files changed, 69 insertions, 0 deletions
diff --git a/pydis_site/static/css/base/themes.css b/pydis_site/static/css/base/themes.css new file mode 100644 index 00000000..d22c6c58 --- /dev/null +++ b/pydis_site/static/css/base/themes.css @@ -0,0 +1,69 @@ +/* Theme switch toggle */ + +.switch { +    position: relative; +    height: 2em; +    width: 4em; +    cursor: pointer; +} + +.switch-outer { +    position: absolute; +    height: 100%; +    width: 100%; +    border-radius: 2em; +    transition: background-color 0.3s ease-out; +} + +.switch.dark .switch-outer { +    background-color: #22272E; +    border: solid 1px #515151; +} + +.switch.light .switch-outer { +    background-color: #3f61d9; +} + +.knob { +    position: absolute; +    padding-top: 20%; +    height: 70%; +    width: 37.5%; +    border-radius: 10em; +    transition: all 0.5s ease-out; +} + +.knob.dark { +    background-color: #586282; +    margin: 7% auto auto 8%; +} + +.knob.light { +    background-color: white; +    margin: 7% auto auto 56%; +} + +.theme-icon { +    position: absolute !important; +    --ggs: 0.75; +    transition: opacity 0.1s ease-out; +} + +.theme-icon.light { +    left: 10%; +    top: 15%; +    color: white; +} + +.theme-icon.dark { +    right: 10%; +    top: 20% +} + +.switch.dark .theme-icon.light { +    opacity: 0; +} + +.switch.light .theme-icon.dark { +    opacity: 0; +}  |