Andrew Shu 4 weeks ago
parent
commit
e7f305c440
  1. 1610
      tildes/package-lock.json
  2. 9
      tildes/package.json
  3. 6
      tildes/scss/_base.scss
  4. 8
      tildes/scss/_functions.scss
  5. 4
      tildes/scss/_layout.scss
  6. 1
      tildes/scss/_placeholders.scss
  7. 13
      tildes/scss/modules/_btn.scss
  8. 2
      tildes/scss/modules/_chip.scss
  9. 6
      tildes/scss/modules/_comment.scss
  10. 2
      tildes/scss/modules/_donation.scss
  11. 9
      tildes/scss/modules/_form.scss
  12. 1
      tildes/scss/modules/_logged-in-user.scss
  13. 1
      tildes/scss/modules/_menu.scss
  14. 1
      tildes/scss/modules/_message.scss
  15. 4
      tildes/scss/modules/_sidebar.scss
  16. 1
      tildes/scss/modules/_site-footer.scss
  17. 2
      tildes/scss/modules/_site-header.scss
  18. 1
      tildes/scss/modules/_tab.scss
  19. 1
      tildes/scss/modules/_theme-preview.scss
  20. 1
      tildes/scss/modules/_toast.scss
  21. 7
      tildes/scss/modules/_topic.scss
  22. 22
      tildes/scss/themes/_atom_one_dark.scss
  23. 4
      tildes/scss/themes/_black.scss
  24. 4
      tildes/scss/themes/_default.scss
  25. 8
      tildes/scss/themes/_dracula.scss
  26. 12
      tildes/scss/themes/_gruvbox.scss
  27. 8
      tildes/scss/themes/_love.scss
  28. 12
      tildes/scss/themes/_nord.scss
  29. 12
      tildes/scss/themes/_solarized.scss
  30. 184
      tildes/scss/themes/_theme_mixins.scss
  31. 4
      tildes/scss/themes/_zenburn.scss

1610
tildes/package-lock.json
File diff suppressed because it is too large
View File

9
tildes/package.json

@ -14,8 +14,8 @@
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"prettier": "^3.6.2",
"stylelint": "^13.13.1",
"stylelint-scss": "^3.6.0"
"stylelint": "^14.16.1",
"stylelint-config-standard-scss": "^6.1.0"
},
"type": "module",
"prettier": {
@ -31,6 +31,7 @@
"plugins": [
"stylelint-scss"
],
"extends": "stylelint-config-standard-scss",
"rules": {
"at-rule-empty-line-before": [
"always",
@ -74,6 +75,7 @@
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": true,
"declaration-block-no-redundant-longhand-properties": null,
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-newline-before": "never-multi-line",
@ -106,6 +108,7 @@
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"no-descending-specificity": null,
"no-duplicate-at-import-rules": true,
"no-duplicate-selectors": true,
"no-empty-first-line": true,
@ -155,6 +158,7 @@
"unit-no-unknown": true,
"unit-allowed-list": [
"%",
"deg",
"fr",
"px",
"rem",
@ -177,6 +181,7 @@
"scss/at-mixin-argumentless-call-parentheses": "never",
"scss/at-mixin-parentheses-space-before": "never",
"scss/at-mixin-pattern": "^[a-z-]+$",
"scss/at-rule-conditional-no-parentheses": null,
"scss/at-rule-no-unknown": true,
"scss/declaration-nested-properties": "never",
"scss/dollar-variable-colon-newline-after": "always-multi-line",

6
tildes/scss/_base.scss

@ -14,7 +14,6 @@ html {
a {
text-decoration: none;
color: var(--link-color);
&:hover {
@ -42,9 +41,7 @@ blockquote {
margin-left: 1rem;
max-width: $paragraph-max-width - 1rem; // subtract the left margin
margin-right: 0;
border-left: 1px dotted;
border-color: var(--foreground-highlight-color);
background-color: var(--background-secondary-color);
@ -79,9 +76,7 @@ button {
code {
display: inline-block;
font-size: inherit;
-moz-tab-size: 4;
tab-size: 4;
color: var(--foreground-highlight-color);
background-color: var(--background-secondary-color);
}
@ -178,7 +173,6 @@ main {
padding: 0.2rem;
overflow: hidden;
max-width: 100vw;
background-color: var(--background-primary-color);
@media (min-width: $size-md) {

8
tildes/scss/_functions.scss

@ -8,7 +8,7 @@
$x1: $x0;
@for $i from 1 through 10 {
$x1: $x0 - ($x0 * $x0 - abs($r)) / (2 * $x0);
$x1: $x0 - ($x0 * $x0 - math.abs($r)) / (2 * $x0);
$x0: $x1;
}
@ -24,9 +24,9 @@
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number;
// Extract color components
$red-component: red($color);
$green-component: green($color);
$blue-component: blue($color);
$red-component: color.red($color);
$green-component: color.green($color);
$blue-component: color.blue($color);
// Calculate a brightness value in 3d color space between 0 and 255
$red: $red-component * $red-component * $red-magic-number;

4
tildes/scss/_layout.scss

@ -5,7 +5,6 @@ body {
@supports (display: grid) {
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-columns: 1fr minmax(auto, $main-max-width) 1fr;
grid-template-areas:
". header ."
@ -56,9 +55,7 @@ body {
#site-header {
grid-area: header;
max-width: 100vw;
padding: 0.2rem;
padding-bottom: 0;
@ -83,7 +80,6 @@ body {
width: $sidebar-width;
min-width: $sidebar-width;
padding: 0.4rem;
}

1
tildes/scss/_placeholders.scss

@ -30,6 +30,7 @@
ol,
ul {
$list-left-margin: 2rem;
margin: 0 0 0.4rem $list-left-margin;
li {

13
tildes/scss/modules/_btn.scss

@ -7,10 +7,8 @@
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.6rem;
font-weight: bold;
color: var(--button-color);
background-color: transparent;
border-color: var(--button-color);
@ -79,14 +77,11 @@
align-items: center;
margin: 0 0.4rem;
padding: 0.2rem;
background: none;
border: 0;
font-size: 0.6rem;
font-weight: bold;
text-transform: capitalize;
cursor: pointer;
&.btn-used {
@ -131,7 +126,6 @@
.btn-light {
font-weight: normal;
color: var(--foreground-secondary-color);
border-color: var(--border-color);
@ -173,19 +167,14 @@
display: flex;
padding: 0.4rem;
background: none;
border: 0;
justify-content: center;
align-items: center;
font-weight: bold;
font-size: 0.6rem;
line-height: 0.6rem;
cursor: pointer;
color: var(--foreground-secondary-color);
&:hover {
@ -200,7 +189,6 @@
.btn.btn-primary {
color: var(--button-by-brightness-color);
background-color: var(--button-color);
border-color: var(--button-color);
@ -208,7 +196,6 @@
color: var(--button-by-brightness-color);
background-color: var(--button-color);
border-color: var(--button-color);
filter: brightness(90%);
}

2
tildes/scss/modules/_chip.scss

@ -3,7 +3,6 @@
.chip {
border-radius: 0;
background-color: var(--background-secondary-color);
color: var(--foreground-highlight-color);
@ -18,7 +17,6 @@
&.error {
background-color: var(--error-color);
color: var(--error-by-brightness-color);
.btn {

6
tildes/scss/modules/_comment.scss

@ -55,7 +55,6 @@
.comment-excerpt {
display: none;
margin-left: 0.4rem;
white-space: nowrap;
overflow: hidden;
@ -64,9 +63,7 @@
.comment-branch-counter {
display: none;
margin-right: 0.4rem;
color: var(--foreground-secondary-color);
}
@ -91,9 +88,7 @@
display: flex;
align-items: center;
font-size: 0.6rem;
margin-left: 0.4rem;
@media (min-width: $size-md) {
@ -142,7 +137,6 @@
.comment-label-buttons {
display: flex;
flex-wrap: wrap;
margin: 0;
padding: 0 1rem;
justify-content: space-between;

2
tildes/scss/modules/_donation.scss

@ -6,12 +6,10 @@
flex-direction: column;
align-items: center;
max-width: $paragraph-max-width;
padding: 0.4rem;
margin: 1rem 0;
border: 1px solid;
border-color: inherit;
font-size: 0.6rem;
line-height: 1.3;
text-align: center;

9
tildes/scss/modules/_form.scss

@ -25,11 +25,8 @@
}
}
select.form-select:not([multiple]):not([size]) {
// would be better to implement autoprefixer to do this
-moz-appearance: none;
-webkit-appearance: none;
select.form-select:not([multiple], [size]) {
appearance: none;
border-color: var(--border-color);
background-color: var(--background-input-color);
}
@ -72,7 +69,6 @@ select.form-select:not([multiple]):not([size]) {
padding: 0.4rem;
border: 1px dashed;
overflow: auto;
border-color: var(--border-color);
}
@ -81,7 +77,6 @@ select.form-select:not([multiple]):not([size]) {
flex-direction: row-reverse;
justify-content: flex-start;
align-items: center;
margin: 0.2rem 0;
max-width: 40rem;

1
tildes/scss/modules/_logged-in-user.scss

@ -4,7 +4,6 @@
.logged-in-user-info {
flex-direction: row-reverse;
align-items: center;
font-size: 0.8rem;
a {

1
tildes/scss/modules/_menu.scss

@ -4,7 +4,6 @@
.menu {
box-shadow: none;
border: 1px outset var(--border-color);
background-color: var(--background-primary-color);
.menu-item {

1
tildes/scss/modules/_message.scss

@ -12,7 +12,6 @@
padding: 0.2rem;
font-size: 0.7rem;
line-height: 0.9rem;
color: var(--foreground-highlight-color);
background-color: var(--background-secondary-color);

4
tildes/scss/modules/_sidebar.scss

@ -8,7 +8,6 @@
// stylelint-disable-next-line declaration-block-no-duplicate-properties
background-color: var(--background-primary-color);
border-left-color: var(--border-color);
.btn {
@ -52,7 +51,6 @@
padding: 0.2rem 0.4rem;
align-items: center;
justify-content: space-between;
background-color: var(--background-secondary-color);
}
@ -62,13 +60,11 @@
position: absolute;
right: 0;
top: 0;
min-width: 0 !important;
max-width: 90vw;
z-index: 1000;
min-height: 100vh;
height: 100%;
border-left: 3px double;
}
}

1
tildes/scss/modules/_site-footer.scss

@ -20,7 +20,6 @@
display: flex;
flex-wrap: wrap;
justify-content: space-around;
list-style-type: none;
margin: 0 auto;
max-width: 50rem;

2
tildes/scss/modules/_site-header.scss

@ -66,10 +66,8 @@
padding-left: 40px;
padding-right: 8px;
line-height: 32px;
font-size: 1.2rem;
font-weight: bold;
color: var(--foreground-highlight-color);
&:visited {

1
tildes/scss/modules/_tab.scss

@ -32,7 +32,6 @@
flex-wrap: nowrap;
padding-left: 0;
margin-top: 0;
justify-content: space-around;
// have the tabs span the full width at small sizes

1
tildes/scss/modules/_theme-preview.scss

@ -11,7 +11,6 @@
min-width: 6rem;
margin: 0.4rem;
padding: 1rem;
text-align: center;
font-weight: bold;
white-space: nowrap;

1
tildes/scss/modules/_toast.scss

@ -6,7 +6,6 @@
margin: 1rem 0;
font-weight: bold;
color: var(--foreground-highlight-color);
background-color: var(--background-secondary-color);
border-color: var(--border-color);

7
tildes/scss/modules/_topic.scss

@ -27,6 +27,7 @@
// set some minimum row heights on mobile to space them out a bit
$row-height: $min-touch-size - 4px; // subtract grid-gap
grid-template-rows: repeat(3, minmax($row-height, auto));
// on larger screens, rows can size automatically
@ -35,7 +36,6 @@
}
align-items: center;
position: relative;
// smaller bottom padding to account for the empty .post-action-settings div
@ -251,7 +251,6 @@
margin: 0;
overflow: hidden;
font-style: italic;
color: var(--foreground-secondary-color);
h1 {
@ -291,9 +290,7 @@
.topic-info {
display: grid;
grid-template-columns: 1fr 1.5fr 0.7fr;
grid-column-gap: 0.4rem;
align-items: end;
max-width: 32rem;
white-space: nowrap;
@ -350,7 +347,6 @@
display: grid;
grid-template-columns: max-content minmax(auto, $paragraph-max-width);
align-items: baseline;
margin: 0;
}
@ -407,7 +403,6 @@
display: flex;
flex-wrap: wrap;
align-items: center;
margin-bottom: 0.4rem;
h2 {

22
tildes/scss/themes/_atom_one_dark.scss

@ -2,18 +2,18 @@
// https://github.com/atom/atom/blob/master/packages/one-dark-syntax/styles/colors.less
// Base colors
$background: hsl(220, 13%, 18%);
$background: hsl(220deg 13% 18%);
$background-alt: #21242b;
$foreground: hsl(220, 14%, 71%);
$foreground-alt: hsl(220, 9%, 55%);
$foreground: hsl(220deg 14% 71%);
$foreground-alt: hsl(220deg 9% 55%);
// Accent colors
$cyan: hsl(187, 47%, 55%);
$blue: hsl(207, 82%, 66%);
$purple: hsl(286, 60%, 67%);
$green: hsl(95, 38%, 62%);
$red: hsl(355, 65%, 65%);
$orange: hsl(29, 54%, 61%);
$cyan: hsl(187deg 47% 55%);
$blue: hsl(207deg 82% 66%);
$purple: hsl(286deg 60% 67%);
$green: hsl(95deg 38% 62%);
$red: hsl(355deg 65% 65%);
$orange: hsl(29deg 54% 61%);
// Actual theme definition
$theme-atom-one-dark: (
@ -51,6 +51,6 @@ body.theme-atom-one-dark {
@include theme-preview-block(
"atom-one-dark",
map-get($theme-atom-one-dark, "foreground-primary"),
map-get($theme-atom-one-dark, "background-primary")
map.get($theme-atom-one-dark, "foreground-primary"),
map.get($theme-atom-one-dark, "background-primary")
);

4
tildes/scss/themes/_black.scss

@ -30,6 +30,6 @@ body.theme-black {
@include theme-preview-block(
"black",
map-get($theme-black, "foreground-primary"),
map-get($theme-black, "background-primary")
map.get($theme-black, "foreground-primary"),
map.get($theme-black, "background-primary")
);

4
tildes/scss/themes/_default.scss

@ -34,6 +34,6 @@ body {
@include theme-preview-block(
"white",
map-get($default-theme, "foreground-primary"),
map-get($default-theme, "background-primary")
map.get($default-theme, "foreground-primary"),
map.get($default-theme, "background-primary")
);

8
tildes/scss/themes/_dracula.scss

@ -12,7 +12,7 @@ $green: #50fa7b;
$orange: #ffb86c;
$pink: #ff79c6;
$purple: #bd93f9;
$red: #ff5555;
$red: #f55;
$yellow: #f1fa8c;
// Actual theme definition
@ -20,7 +20,7 @@ $theme-dracula: (
"alert": $orange,
"background-primary": $background,
"background-secondary": $background-alt,
"background-input": darken($background, 10%),
"background-input": color.adjust($background, $lightness: -10%),
"border": $foreground-alt,
"comment-label-exemplary": $cyan,
"comment-label-joke": $green,
@ -53,6 +53,6 @@ body.theme-dracula {
@include theme-preview-block(
"dracula",
map-get($theme-dracula, "foreground-primary"),
map-get($theme-dracula, "background-primary")
map.get($theme-dracula, "foreground-primary"),
map.get($theme-dracula, "background-primary")
);

12
tildes/scss/themes/_gruvbox.scss

@ -93,7 +93,7 @@ $gruvbox-base: (
// Dark theme definition
$theme-gruvbox-dark:
map-merge(
map.merge(
$gruvbox-base,
(
"alert": $gb-dm-light-orange,
@ -118,13 +118,13 @@ body.theme-gruvbox-dark {
@include theme-preview-block(
"gruvbox-dark",
map-get($theme-gruvbox-dark, "foreground-primary"),
map-get($theme-gruvbox-dark, "background-primary")
map.get($theme-gruvbox-dark, "foreground-primary"),
map.get($theme-gruvbox-dark, "background-primary")
);
// Light theme definition
$theme-gruvbox-light:
map-merge(
map.merge(
$gruvbox-base,
(
"alert": $dark-orange,
@ -149,6 +149,6 @@ body.theme-gruvbox-light {
@include theme-preview-block(
"gruvbox-light",
map-get($theme-gruvbox-light, "foreground-primary"),
map-get($theme-gruvbox-light, "background-primary")
map.get($theme-gruvbox-light, "foreground-primary"),
map.get($theme-gruvbox-light, "background-primary")
);

8
tildes/scss/themes/_love.scss

@ -36,8 +36,8 @@ body.theme-love-dark {
@include theme-preview-block(
"love-dark",
map-get($theme-love-dark, "foreground-primary"),
map-get($theme-love-dark, "background-primary")
map.get($theme-love-dark, "foreground-primary"),
map.get($theme-love-dark, "background-primary")
);
// Love Light
@ -76,6 +76,6 @@ body.theme-love-light {
@include theme-preview-block(
"love-light",
map-get($theme-love-light, "foreground-primary"),
map-get($theme-love-light, "background-primary")
map.get($theme-love-light, "foreground-primary"),
map.get($theme-love-light, "background-primary")
);

12
tildes/scss/themes/_nord.scss

@ -52,7 +52,7 @@ $theme-nord-base: (
// Dark theme definition
$theme-nord-dark:
map-merge(
map.merge(
$theme-nord-base,
(
"background-input": #001f27,
@ -71,13 +71,13 @@ body.theme-nord-dark {
@include theme-preview-block(
"nord-dark",
map-get($theme-nord-dark, "foreground-primary"),
map-get($theme-nord-dark, "background-primary")
map.get($theme-nord-dark, "foreground-primary"),
map.get($theme-nord-dark, "background-primary")
);
// Light theme definition
$theme-nord-light:
map-merge(
map.merge(
$theme-nord-base,
(
"background-input": #fefbf1,
@ -98,6 +98,6 @@ body.theme-nord-light {
@include theme-preview-block(
"nord-light",
map-get($theme-nord-light, "foreground-primary"),
map-get($theme-nord-light, "background-primary")
map.get($theme-nord-light, "foreground-primary"),
map.get($theme-nord-light, "background-primary")
);

12
tildes/scss/themes/_solarized.scss

@ -56,7 +56,7 @@ $theme-solarized-base: (
// Dark theme definition
$theme-solarized-dark:
map-merge(
map.merge(
$theme-solarized-base,
(
"background-input": #001f27,
@ -75,13 +75,13 @@ body.theme-solarized-dark {
@include theme-preview-block(
"solarized-dark",
map-get($theme-solarized-dark, "foreground-primary"),
map-get($theme-solarized-dark, "background-primary")
map.get($theme-solarized-dark, "foreground-primary"),
map.get($theme-solarized-dark, "background-primary")
);
// Light theme definition
$theme-solarized-light:
map-merge(
map.merge(
$theme-solarized-base,
(
"background-input": #fefbf1,
@ -102,6 +102,6 @@ body.theme-solarized-light {
@include theme-preview-block(
"solarized-light",
map-get($theme-solarized-light, "foreground-primary"),
map-get($theme-solarized-light, "background-primary")
map.get($theme-solarized-light, "foreground-primary"),
map.get($theme-solarized-light, "background-primary")
);

184
tildes/scss/themes/_theme_mixins.scss

@ -10,12 +10,12 @@
}
@function map-get-fallback($map, $preferred-key, $fallback-key) {
// map-get that will fall back to a second key if the first isn't set
// map.get that will fall back to a second key if the first isn't set
@if (map-has-key($map, $preferred-key)) {
@return map-get($map, $preferred-key);
@return map.get($map, $preferred-key);
}
@return map-get($map, $fallback-key);
@return map.get($map, $fallback-key);
}
@function init-theme($theme) {
@ -62,27 +62,27 @@
$topic-tag-spoiler: map-get-fallback($theme, "topic-tag-spoiler", "warning");
// foreground-extreme: if not defined, use white on a dark bg and black on a light one
$foreground-extreme: map-get($theme, "foreground-extreme");
$foreground-extreme: map.get($theme, "foreground-extreme");
$foreground-extreme:
choose-by-brightness(
map-get($theme, "background-primary"),
map.get($theme, "background-primary"),
#000,
#fff,
) !default;
// foreground-middle: if not defined, mix foreground-primary and foreground-secondary
$foreground-middle: map-get($theme, "foreground-middle");
$foreground-middle: map.get($theme, "foreground-middle");
$foreground-middle:
mix(
map-get($theme, "foreground-primary"),
map-get($theme, "foreground-secondary")
color.mix(
map.get($theme, "foreground-primary"),
map.get($theme, "foreground-secondary")
) !default;
// link-hover: if not defined, darken the link color slightly
$link-hover: map-get($theme, "link-hover");
$link-hover: darken(map-get($theme, "link"), 5%) !default;
$link-hover: map.get($theme, "link-hover");
$link-hover: color.adjust(map.get($theme, "link"), $lightness: -5%) !default;
$new-theme:
map-merge(
map.merge(
$theme,
(
"background-input": $background-input,
@ -106,7 +106,7 @@
)
);
@return map-merge($default-theme, $new-theme);
@return map.merge($default-theme, $new-theme);
}
@mixin minimal-hardcoded-theme($theme) {
@ -117,9 +117,9 @@
@supports not (--test: green) {
*,
#sidebar {
background-color: map-get($theme, "background-primary");
border-color: map-get($theme, "border");
color: map-get($theme, "foreground-primary");
background-color: map.get($theme, "background-primary");
border-color: map.get($theme, "border");
color: map.get($theme, "foreground-primary");
}
a,
@ -128,7 +128,7 @@
.btn-link,
.nav-item a,
.tab-item {
color: map-get($theme, "link");
color: map.get($theme, "link");
}
// "&" represents the <body> element itself
@ -137,15 +137,15 @@
#site-header *,
.comment-header,
.comment-header * {
background-color: map-get($theme, "background-secondary");
background-color: map.get($theme, "background-secondary");
}
input,
input[readonly],
textarea,
textarea[readonly],
.form-select:not([multiple]):not([size]) {
background-color: map-get($theme, "background-input");
.form-select:not([multiple], [size]) {
background-color: map.get($theme, "background-input");
}
.btn.btn-primary {
@ -153,7 +153,7 @@
}
.text-secondary {
color: map-get($theme, "foreground-secondary");
color: map.get($theme, "foreground-secondary");
}
// Prevents the * rule from causing a <span> to override its parent
@ -165,119 +165,105 @@
@mixin use-theme($selected-theme) {
$theme: init-theme($selected-theme);
$is-light: is-color-bright(map-get($theme, "background-primary"));
$is-light: is-color-bright(map.get($theme, "background-primary"));
@include minimal-hardcoded-theme($theme);
// When creating CSS custom properties and using any of Sass' capabilities
// you'll have to interpolate it with the Sass syntax `#{...}` as seen below.
--alert-color: #{map-get($theme, "alert")};
--background-input-color: #{map-get($theme, "background-input")};
--alert-color: #{map.get($theme, "alert")};
--background-input-color: #{map.get($theme, "background-input")};
--background-mixed-color:
#{mix(
map-get($theme, "background-primary"),
map-get($theme, "background-secondary")
#{color.mix(
map.get($theme, "background-primary"),
map.get($theme, "background-secondary")
)};
--background-primary-color: #{map-get($theme, "background-primary")};
--background-secondary-color: #{map-get($theme, "background-secondary")};
--border-color: #{map-get($theme, "border")};
--button-color: #{map-get($theme, "button")};
--background-primary-color: #{map.get($theme, "background-primary")};
--background-secondary-color: #{map.get($theme, "background-secondary")};
--border-color: #{map.get($theme, "border")};
--button-color: #{map.get($theme, "button")};
--button-by-brightness-color:
#{choose-by-brightness(
map-get($theme, "button"),
map.get($theme, "button"),
#000,
#fff
)};
--button-transparent-color: #{rgba(map-get($theme, "button"), 0.2)};
--button-used-color: #{map-get($theme, "button-used")};
--error-color: #{map-get($theme, "error")};
--button-transparent-color: #{rgba(map.get($theme, "button"), 0.2)};
--button-used-color: #{map.get($theme, "button-used")};
--error-color: #{map.get($theme, "error")};
--error-by-brightness-color:
#{choose-by-brightness(
map-get($theme, "error"),
map.get($theme, "error"),
#000,
#fff
)};
--foreground-extreme-color:
#{choose-by-brightness(
map-get($theme, "background-primary"),
map.get($theme, "background-primary"),
#000,
#fff
)};
--foreground-highlight-color: #{map-get($theme, "foreground-highlight")};
--foreground-highlight-color: #{map.get($theme, "foreground-highlight")};
--foreground-mixed-color:
#{mix(
map-get($theme, "foreground-primary"),
map-get($theme, "foreground-highlight")
#{color.mix(
map.get($theme, "foreground-primary"),
map.get($theme, "foreground-highlight")
)};
--foreground-primary-color: #{map-get($theme, "foreground-primary")};
--foreground-secondary-color: #{map-get($theme, "foreground-secondary")};
--link-color: #{map-get($theme, "link")};
--link-hover-color: #{map-get($theme, "link-hover")};
--link-visited-color: #{map-get($theme, "link-visited")};
--stripe-mine-color: #{map-get($theme, "stripe-mine")};
--stripe-target-color: #{map-get($theme, "stripe-target")};
--success-color: #{map-get($theme, "success")};
--syntax-builtin-color: #{map-get($theme, "syntax-builtin")};
--syntax-comment-color: #{map-get($theme, "syntax-comment")};
--syntax-constant-color: #{map-get($theme, "syntax-constant")};
--syntax-keyword-color: #{map-get($theme, "syntax-keyword")};
--syntax-literal-color: #{map-get($theme, "syntax-literal")};
--syntax-string-color: #{map-get($theme, "syntax-string")};
--foreground-primary-color: #{map.get($theme, "foreground-primary")};
--foreground-secondary-color: #{map.get($theme, "foreground-secondary")};
--link-color: #{map.get($theme, "link")};
--link-hover-color: #{map.get($theme, "link-hover")};
--link-visited-color: #{map.get($theme, "link-visited")};
--stripe-mine-color: #{map.get($theme, "stripe-mine")};
--stripe-target-color: #{map.get($theme, "stripe-target")};
--success-color: #{map.get($theme, "success")};
--syntax-builtin-color: #{map.get($theme, "syntax-builtin")};
--syntax-comment-color: #{map.get($theme, "syntax-comment")};
--syntax-constant-color: #{map.get($theme, "syntax-constant")};
--syntax-keyword-color: #{map.get($theme, "syntax-keyword")};
--syntax-literal-color: #{map.get($theme, "syntax-literal")};
--syntax-string-color: #{map.get($theme, "syntax-string")};
// Colors for the special topic tags
@if $is-light {
--topic-tag-nsfw-color: #{map-get($theme, "topic-tag-nsfw")};
--topic-tag-nsfw-color: #{map.get($theme, "topic-tag-nsfw")};
--topic-tag-nsfw-foreground-color: #fff;
--topic-tag-nsfw-border-color: transparent;
--topic-tag-spoiler-color: #{map-get($theme, "topic-tag-spoiler")};
--topic-tag-spoiler-color: #{map.get($theme, "topic-tag-spoiler")};
--topic-tag-spoiler-foreground-color: #fff;
--topic-tag-spoiler-border-color: transparent;
} @else {
--topic-tag-nsfw-color: transparent;
--topic-tag-nsfw-foreground-color: #{map-get($theme, "topic-tag-nsfw")};
--topic-tag-nsfw-border-color: #{map-get($theme, "topic-tag-nsfw")};
--topic-tag-nsfw-foreground-color: #{map.get($theme, "topic-tag-nsfw")};
--topic-tag-nsfw-border-color: #{map.get($theme, "topic-tag-nsfw")};
--topic-tag-spoiler-color: transparent;
--topic-tag-spoiler-foreground-color: #{map-get($theme, "topic-tag-spoiler")};
--topic-tag-spoiler-border-color: #{map-get($theme, "topic-tag-spoiler")};
--topic-tag-spoiler-foreground-color: #{map.get($theme, "topic-tag-spoiler")};
--topic-tag-spoiler-border-color: #{map.get($theme, "topic-tag-spoiler")};
}
--warning-color: #{map-get($theme, "warning")};
--warning-color: #{map.get($theme, "warning")};
// Colors for warning toasts
@if $is-light {
--warning-background-color: #{rgba(map-get($theme, "warning"), 0.9)};
--warning-background-color: #{rgba(map.get($theme, "warning"), 0.9)};
--warning-foreground-color: #000;
} @else {
--warning-background-color: transparent;
--warning-foreground-color: #{map-get($theme, "warning")};
--warning-foreground-color: #{map.get($theme, "warning")};
}
// Variables for the comment labels.
@if $is-light {
--background-label-exemplary-color: #{map-get($theme, "comment-label-exemplary")};
--background-label-joke-color: #{map-get($theme, "comment-label-joke")};
--background-label-noise-color: #{map-get($theme, "comment-label-noise")};
--background-label-offtopic-color: #{map-get($theme, "comment-label-offtopic")};
--background-label-malice-color: #{map-get($theme, "comment-label-malice")};
--comment-label-exemplary-color: #{map-get($theme, "comment-label-exemplary")};
--comment-label-joke-color: #{map-get($theme, "comment-label-joke")};
--comment-label-noise-color: #{map-get($theme, "comment-label-noise")};
--comment-label-offtopic-color: #{map-get($theme, "comment-label-offtopic")};
--comment-label-malice-color: #{map-get($theme, "comment-label-malice")};
--background-label-exemplary-color: #{map.get($theme, "comment-label-exemplary")};
--background-label-joke-color: #{map.get($theme, "comment-label-joke")};
--background-label-noise-color: #{map.get($theme, "comment-label-noise")};
--background-label-offtopic-color: #{map.get($theme, "comment-label-offtopic")};
--background-label-malice-color: #{map.get($theme, "comment-label-malice")};
--comment-label-exemplary-color: #{map.get($theme, "comment-label-exemplary")};
--comment-label-joke-color: #{map.get($theme, "comment-label-joke")};
--comment-label-noise-color: #{map.get($theme, "comment-label-noise")};
--comment-label-offtopic-color: #{map.get($theme, "comment-label-offtopic")};
--comment-label-malice-color: #{map.get($theme, "comment-label-malice")};
--foreground-label-exemplary-color: #fff;
--foreground-label-joke-color: #fff;
--foreground-label-noise-color: #fff;
@ -289,17 +275,15 @@
--background-label-noise-color: transparent;
--background-label-offtopic-color: transparent;
--background-label-malice-color: transparent;
--comment-label-exemplary-color: #{map-get($theme, "comment-label-exemplary")};
--comment-label-joke-color: #{map-get($theme, "comment-label-joke")};
--comment-label-noise-color: #{map-get($theme, "comment-label-noise")};
--comment-label-offtopic-color: #{map-get($theme, "comment-label-offtopic")};
--comment-label-malice-color: #{map-get($theme, "comment-label-malice")};
--foreground-label-exemplary-color: #{map-get($theme, "comment-label-exemplary")};
--foreground-label-joke-color: #{map-get($theme, "comment-label-joke")};
--foreground-label-noise-color: #{map-get($theme, "comment-label-noise")};
--foreground-label-offtopic-color: #{map-get($theme, "comment-label-offtopic")};
--foreground-label-malice-color: #{map-get($theme, "comment-label-malice")};
--comment-label-exemplary-color: #{map.get($theme, "comment-label-exemplary")};
--comment-label-joke-color: #{map.get($theme, "comment-label-joke")};
--comment-label-noise-color: #{map.get($theme, "comment-label-noise")};
--comment-label-offtopic-color: #{map.get($theme, "comment-label-offtopic")};
--comment-label-malice-color: #{map.get($theme, "comment-label-malice")};
--foreground-label-exemplary-color: #{map.get($theme, "comment-label-exemplary")};
--foreground-label-joke-color: #{map.get($theme, "comment-label-joke")};
--foreground-label-noise-color: #{map.get($theme, "comment-label-noise")};
--foreground-label-offtopic-color: #{map.get($theme, "comment-label-offtopic")};
--foreground-label-malice-color: #{map.get($theme, "comment-label-malice")};
}
}

4
tildes/scss/themes/_zenburn.scss

@ -43,6 +43,6 @@ body.theme-zenburn {
@include theme-preview-block(
"zenburn",
map-get($theme-zenburn, "foreground-primary"),
map-get($theme-zenburn, "background-primary")
map.get($theme-zenburn, "foreground-primary"),
map.get($theme-zenburn, "background-primary")
);
Loading…
Cancel
Save