refactor(nixos-manual): use vars where possible (#1756)

Co-authored-by: uncenter <[email protected]>
This commit is contained in:
isabelanduncenter authored and GitHub committed 2025-06-04 18:16:15 +01:00
1 parent 06b97f2ae7
commit 3b13436faf
1 file changed
+20 -81
+20 -81
View File
@@ -97,30 +97,21 @@
}
}
body {
background-color: @base !important;
color: @text;
}
--background: @base;
--main-text-color: @text;
--link-color: @accent;
--heading-color: @accent;
--small-heading-color: fade(@accent, 85%);
--note-text-color: @blue;
--note-background: @base;
--warning-text-color: @red;
--warning-background: @base;
--codeblock-background: @surface0;
--codeblock-text-color: @text;
p,
ol,
ul {
color: @text !important;
}
a {
border-bottom-color: @accent !important;
color: @accent;
}
h1,
h2,
h3,
h4 {
color: @accent;
}
h5 {
color: fade(@accent, 85%);
div.book .programlisting,
div.appendix .programlisting {
background-color: @surface0 !important;
}
hr,
@@ -129,68 +120,15 @@
border-bottom-color: @overlay1 !important;
}
div.variablelist {
color: @text;
}
// Version selector
div[style^="background: #333333;color: #FFFFFF;"] {
background-color: @crust !important;
code {
&.programlisting.hljs {
background-color: fade(@blue, 5%) !important;
}
}
table.informaltable {
border-color: @surface1;
thead {
background-color: @mantle;
}
}
#callout(@color) {
background-color: fade(@color, 7%) !important;
border-color: fade(@color, 20%);
a,
p,
.title {
color: @color !important;
}
a {
border-bottom-color: @color !important;
}
}
.note {
#callout(@blue);
}
.tip {
#callout(@green);
}
.important {
#callout(@mauve);
}
.caution {
#callout(@yellow);
}
.warning {
#callout(@peach);
}
div.example details[open] {
border-color: @surface1 !important;
}
div:has(> dl):has(> div > span) {
// Version selector
&,
* {
background-color: @crust !important;
dt {
color: @text !important;
}
a {
color: @accent !important;
}
@@ -205,3 +143,4 @@
@macchiato: { @rosewater: #f4dbd6; @flamingo: #f0c6c6; @pink: #f5bde6; @mauve: #c6a0f6; @red: #ed8796; @maroon: #ee99a0; @peach: #f5a97f; @yellow: #eed49f; @green: #a6da95; @teal: #8bd5ca; @sky: #91d7e3; @sapphire: #7dc4e4; @blue: #8aadf4; @lavender: #b7bdf8; @text: #cad3f5; @subtext1: #b8c0e0; @subtext0: #a5adcb; @overlay2: #939ab7; @overlay1: #8087a2; @overlay0: #6e738d; @surface2: #5b6078; @surface1: #494d64; @surface0: #363a4f; @base: #24273a; @mantle: #1e2030; @crust: #181926; };
@mocha: { @rosewater: #f5e0dc; @flamingo: #f2cdcd; @pink: #f5c2e7; @mauve: #cba6f7; @red: #f38ba8; @maroon: #eba0ac; @peach: #fab387; @yellow: #f9e2af; @green: #a6e3a1; @teal: #94e2d5; @sky: #89dceb; @sapphire: #74c7ec; @blue: #89b4fa; @lavender: #b4befe; @text: #cdd6f4; @subtext1: #bac2de; @subtext0: #a6adc8; @overlay2: #9399b2; @overlay1: #7f849c; @overlay0: #6c7086; @surface2: #585b70; @surface1: #45475a; @surface0: #313244; @base: #1e1e2e; @mantle: #181825; @crust: #11111b; };
};