|
@ -215,6 +215,7 @@ |
|
|
|
|
|
|
|
|
$active-color: #fff; |
|
|
$active-color: #fff; |
|
|
$is-active-bg-light: lightness(map-get($theme, "button")) > 50; |
|
|
$is-active-bg-light: lightness(map-get($theme, "button")) > 50; |
|
|
|
|
|
|
|
|
@if ($is-active-bg-light) { |
|
|
@if ($is-active-bg-light) { |
|
|
$active-color: #000; |
|
|
$active-color: #000; |
|
|
} |
|
|
} |
|
@ -479,8 +480,16 @@ |
|
|
|
|
|
|
|
|
.topic-listing { |
|
|
.topic-listing { |
|
|
> li:nth-of-type(2n) { |
|
|
> li:nth-of-type(2n) { |
|
|
color: mix(map-get($theme, "foreground-primary"), map-get($theme, "foreground-highlight")); |
|
|
|
|
|
background-color: mix(map-get($theme, "background-primary"), map-get($theme, "background-secondary")); |
|
|
|
|
|
|
|
|
color: |
|
|
|
|
|
mix( |
|
|
|
|
|
map-get($theme, "foreground-primary"), |
|
|
|
|
|
map-get($theme, "foreground-highlight") |
|
|
|
|
|
); |
|
|
|
|
|
background-color: |
|
|
|
|
|
mix( |
|
|
|
|
|
map-get($theme, "background-primary"), |
|
|
|
|
|
map-get($theme, "background-secondary") |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -657,7 +666,7 @@ |
|
|
font-style: italic; |
|
|
font-style: italic; |
|
|
} // Generic.Emph |
|
|
} // Generic.Emph |
|
|
.syntax-gr { |
|
|
.syntax-gr { |
|
|
color: map-get($theme, "syntax-constant"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-constant"); |
|
|
} // Generic.Error |
|
|
} // Generic.Error |
|
|
.syntax-gh { |
|
|
.syntax-gh { |
|
|
color: map-get($theme, "syntax-constant"); |
|
|
color: map-get($theme, "syntax-constant"); |
|
@ -685,7 +694,7 @@ |
|
|
color: map-get($theme, "syntax-constant"); |
|
|
color: map-get($theme, "syntax-constant"); |
|
|
} // Keyword.Constant |
|
|
} // Keyword.Constant |
|
|
.syntax-kd { |
|
|
.syntax-kd { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Keyword.Declaration |
|
|
} // Keyword.Declaration |
|
|
.syntax-kn { |
|
|
.syntax-kn { |
|
|
color: map-get($theme, "syntax-comment"); |
|
|
color: map-get($theme, "syntax-comment"); |
|
@ -694,7 +703,7 @@ |
|
|
color: map-get($theme, "syntax-comment"); |
|
|
color: map-get($theme, "syntax-comment"); |
|
|
} // Keyword.Pseudo |
|
|
} // Keyword.Pseudo |
|
|
.syntax-kr { |
|
|
.syntax-kr { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Keyword.Reserved |
|
|
} // Keyword.Reserved |
|
|
.syntax-kt { |
|
|
.syntax-kt { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
color: map-get($theme, "syntax-keyword"); |
|
@ -712,16 +721,16 @@ |
|
|
color: map-get($theme, "foreground"); |
|
|
color: map-get($theme, "foreground"); |
|
|
} // Name.Attribute |
|
|
} // Name.Attribute |
|
|
.syntax-nb { |
|
|
.syntax-nb { |
|
|
color: map-get($theme, "syntax-builtin"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-builtin"); |
|
|
} // Name.Builtin |
|
|
} // Name.Builtin |
|
|
.syntax-nc { |
|
|
.syntax-nc { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Name.Class |
|
|
} // Name.Class |
|
|
.syntax-no { |
|
|
.syntax-no { |
|
|
color: map-get($theme, "syntax-constant"); |
|
|
color: map-get($theme, "syntax-constant"); |
|
|
} // Name.Constant |
|
|
} // Name.Constant |
|
|
.syntax-nd { |
|
|
.syntax-nd { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Name.Decorator |
|
|
} // Name.Decorator |
|
|
.syntax-ni { |
|
|
.syntax-ni { |
|
|
color: map-get($theme, "syntax-builtin"); |
|
|
color: map-get($theme, "syntax-builtin"); |
|
@ -730,7 +739,7 @@ |
|
|
color: map-get($theme, "syntax-builtin"); |
|
|
color: map-get($theme, "syntax-builtin"); |
|
|
} // Name.Exception |
|
|
} // Name.Exception |
|
|
.syntax-nf { |
|
|
.syntax-nf { |
|
|
color: map-get($theme, "syntax-builtin"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-builtin"); |
|
|
} // Name.Function |
|
|
} // Name.Function |
|
|
.syntax-nl { |
|
|
.syntax-nl { |
|
|
color: map-get($theme, "foreground"); |
|
|
color: map-get($theme, "foreground"); |
|
@ -745,10 +754,10 @@ |
|
|
color: map-get($theme, "foreground"); |
|
|
color: map-get($theme, "foreground"); |
|
|
} // Name.Property |
|
|
} // Name.Property |
|
|
.syntax-nt { |
|
|
.syntax-nt { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Name.Tag |
|
|
} // Name.Tag |
|
|
.syntax-nv { |
|
|
.syntax-nv { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Name.Variable |
|
|
} // Name.Variable |
|
|
.syntax-ow { |
|
|
.syntax-ow { |
|
|
color: map-get($theme, "syntax-comment"); |
|
|
color: map-get($theme, "syntax-comment"); |
|
@ -793,7 +802,7 @@ |
|
|
color: map-get($theme, "syntax-string"); |
|
|
color: map-get($theme, "syntax-string"); |
|
|
} // Literal.String.Other |
|
|
} // Literal.String.Other |
|
|
.syntax-sr { |
|
|
.syntax-sr { |
|
|
color: map-get($theme, "syntax-constant"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-constant"); |
|
|
} // Literal.String.Regex |
|
|
} // Literal.String.Regex |
|
|
.syntax-s1 { |
|
|
.syntax-s1 { |
|
|
color: map-get($theme, "syntax-string"); |
|
|
color: map-get($theme, "syntax-string"); |
|
@ -802,16 +811,16 @@ |
|
|
color: map-get($theme, "syntax-string"); |
|
|
color: map-get($theme, "syntax-string"); |
|
|
} // Literal.String.Symbol |
|
|
} // Literal.String.Symbol |
|
|
.syntax-bp { |
|
|
.syntax-bp { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Name.Builtin.Pseudo |
|
|
} // Name.Builtin.Pseudo |
|
|
.syntax-vc { |
|
|
.syntax-vc { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Name.Variable.Class |
|
|
} // Name.Variable.Class |
|
|
.syntax-vg { |
|
|
.syntax-vg { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Name.Variable.Global |
|
|
} // Name.Variable.Global |
|
|
.syntax-vi { |
|
|
.syntax-vi { |
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
|
|
|
|
|
|
color: map-get($theme, "syntax-keyword"); |
|
|
} // Name.Variable.Instance |
|
|
} // Name.Variable.Instance |
|
|
.syntax-il { |
|
|
.syntax-il { |
|
|
color: map-get($theme, "syntax-comment"); |
|
|
color: map-get($theme, "syntax-comment"); |
|
@ -844,8 +853,8 @@ |
|
|
"foreground-secondary" |
|
|
"foreground-secondary" |
|
|
"link" |
|
|
"link" |
|
|
"link-visited" |
|
|
"link-visited" |
|
|
"warning" |
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
"warning"; |
|
|
|
|
|
|
|
|
@each $key in $essential-keys { |
|
|
@each $key in $essential-keys { |
|
|
@if (not map-has-key($theme, $key)) { |
|
|
@if (not map-has-key($theme, $key)) { |
|
|
@error "Missing essential key in theme: #{$key}"; |
|
|
@error "Missing essential key in theme: #{$key}"; |
|
@ -860,7 +869,9 @@ |
|
|
$border: map-get-fallback($theme, "border", "foreground-secondary"); |
|
|
$border: map-get-fallback($theme, "border", "foreground-secondary"); |
|
|
$button: map-get-fallback($theme, "button", "link"); |
|
|
$button: map-get-fallback($theme, "button", "link"); |
|
|
$button-used: map-get-fallback($theme, "button-used", "link-visited"); |
|
|
$button-used: map-get-fallback($theme, "button-used", "link-visited"); |
|
|
$foreground-highlight: map-get-fallback($theme, "foreground-highlight", "foreground-primary"); |
|
|
|
|
|
|
|
|
// stylelint-disable-next-line |
|
|
|
|
|
$foreground-highlight: |
|
|
|
|
|
map-get-fallback($theme, "foreground-highlight", "foreground-primary"); |
|
|
$stripe-mine: map-get-fallback($theme, "stripe-mine", "link-visited"); |
|
|
$stripe-mine: map-get-fallback($theme, "stripe-mine", "link-visited"); |
|
|
$stripe-target: map-get-fallback($theme, "stripe-target", "warning"); |
|
|
$stripe-target: map-get-fallback($theme, "stripe-target", "warning"); |
|
|
$syntax-builtin: map-get-fallback($theme, "syntax-builtin", "foreground-primary"); |
|
|
$syntax-builtin: map-get-fallback($theme, "syntax-builtin", "foreground-primary"); |
|
@ -872,13 +883,17 @@ |
|
|
$topic-tag-nsfw: map-get-fallback($theme, "topic-tag-nsfw", "error"); |
|
|
$topic-tag-nsfw: map-get-fallback($theme, "topic-tag-nsfw", "error"); |
|
|
$topic-tag-spoiler: map-get-fallback($theme, "topic-tag-spoiler", "warning"); |
|
|
$topic-tag-spoiler: map-get-fallback($theme, "topic-tag-spoiler", "warning"); |
|
|
|
|
|
|
|
|
// foreground-extreme: if not defined, use white on a dark background and black on a light one |
|
|
|
|
|
|
|
|
// 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: if($is-light, #000, #fff) !default; |
|
|
$foreground-extreme: if($is-light, #000, #fff) !default; |
|
|
|
|
|
|
|
|
// foreground-middle: if not defined, mix foreground-primary and foreground-secondary |
|
|
// 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")) !default; |
|
|
|
|
|
|
|
|
$foreground-middle: |
|
|
|
|
|
mix( |
|
|
|
|
|
map-get($theme, "foreground-primary"), |
|
|
|
|
|
map-get($theme, "foreground-secondary") |
|
|
|
|
|
) !default; |
|
|
|
|
|
|
|
|
// link-hover: if not defined, darken the link color slightly |
|
|
// link-hover: if not defined, darken the link color slightly |
|
|
$link-hover: map-get($theme, "link-hover"); |
|
|
$link-hover: map-get($theme, "link-hover"); |
|
|