feat(mdn): rewrite (#2157)
Co-authored-by: Kyosuke Kobayashi <[email protected]>
This commit is contained in:
1 parent
ecaf6c0c72
commit
7dc4c4f84c
1 file changed
+85
-135
+85
-135
@@ -22,141 +22,91 @@
|
||||
#lib.defaults();
|
||||
#lib.css-variables();
|
||||
|
||||
--text-primary: @text;
|
||||
--text-secondary: @subtext0;
|
||||
--text-active: @overlay1;
|
||||
--text-inactive: fade(@subtext0, 60%);
|
||||
--text-link: @accent;
|
||||
--text-visited: lighten(saturate(@accent, -20%), -20%);
|
||||
--text-invert: @base;
|
||||
--background-primary: @base;
|
||||
--background-secondary: @crust;
|
||||
--background-tertiary: @mantle;
|
||||
--background-toc-active: @crust;
|
||||
--background-mark-yellow: fade(@yellow, 40%);
|
||||
--background-mark-green: fade(@green, 40%);
|
||||
--background-information: fade(@blue, 10%);
|
||||
--background-warning: fade(@maroon, 10%);
|
||||
--background-critical: fade(@red, 10%);
|
||||
--background-success: fade(@green, 10%);
|
||||
--border-primary: @surface2;
|
||||
--border-secondary: @surface1;
|
||||
--button-primary-default: @text;
|
||||
--button-primary-hover: @subtext0;
|
||||
--button-primary-active: @overlay0;
|
||||
--button-primary-inactive: @text;
|
||||
--button-secondary-default: @surface2;
|
||||
--button-secondary-hover: @surface1;
|
||||
--button-secondary-active: @overlay0;
|
||||
--button-secondary-inactive: @surface2;
|
||||
--button-secondary-border-focus: @blue;
|
||||
--button-secondary-border-red: @red;
|
||||
--button-secondary-border-red-focus: @maroon;
|
||||
--icon-primary: @text;
|
||||
--icon-secondary: @subtext0;
|
||||
--icon-information: @blue;
|
||||
--icon-warning: @peach;
|
||||
--icon-critical: @maroon;
|
||||
--icon-success: @green;
|
||||
--accent-primary: @accent;
|
||||
--accent-primary-engage: fade(@accent, 10%);
|
||||
--accent-secondary: @accent;
|
||||
--accent-tertiary: fade(saturate(@accent, 10%), 10%);
|
||||
--shadow-01: 0 1px 2px fade(@text, 20%);
|
||||
--shadow-02: 0 1px 6px fade(@text, 20%);
|
||||
--focus-01: 0 0 0 3px fade(@text, 50%);
|
||||
--field-focus-border: @text;
|
||||
--code-background-inline: @mantle;
|
||||
--code-background-block: @mantle;
|
||||
--notecard-link-color: @subtext1;
|
||||
--scrollbar-bg: transparent;
|
||||
--scrollbar-color: hsla(0, 0%, 100%, 0.25);
|
||||
--category-color: @sky;
|
||||
--category-color-background: fade(@sky, 40%);
|
||||
--code-color: lighten(@sky, 10%);
|
||||
--mark-color: darken(@sky, 30%);
|
||||
--plus-accent-color: @maroon;
|
||||
--html-accent-color: @red;
|
||||
--css-accent-color: @sapphire;
|
||||
--js-accent-color: @yellow;
|
||||
--http-accent-color: @green;
|
||||
--apis-accent-color: @mauve;
|
||||
--learn-accent-color: @pink;
|
||||
--plus-code-color: saturate(@maroon, 10%);
|
||||
--html-code-color: saturate(@red, 10%);
|
||||
--css-code-color: saturate(@sapphire, 10%);
|
||||
--js-code-color: saturate(@yellow, 10%);
|
||||
--http-code-color: saturate(@green, 10%);
|
||||
--apis-code-color: saturate(@mauve, 10%);
|
||||
--learn-code-color: saturate(@pink, 10%);
|
||||
--plus-mark-color: darken(@maroon, 30%);
|
||||
--html-mark-color: darken(@red, 30%);
|
||||
--css-mark-color: darken(@sapphire, 30%);
|
||||
--js-mark-color: darken(@yellow, 30%);
|
||||
--http-mark-color: darken(@green, 30%);
|
||||
--apis-mark-color: darken(@mauve, 30%);
|
||||
--learn-mark-color: darken(@pink, 30%);
|
||||
--plus-accent-background-color: fade(@maroon, 30%);
|
||||
--html-accent-background-color: fade(@red, 30%);
|
||||
--css-accent-background-color: fade(@sapphire, 30%);
|
||||
--js-accent-background-color: fade(@yellow, 30%);
|
||||
--http-accent-background-color: fade(@green, 30%);
|
||||
--apis-accent-background-color: fade(@mauve, 30%);
|
||||
--learn-accent-background-color: fade(@pink, 30%);
|
||||
--plus-accent-engage: fade(@maroon, 70%);
|
||||
--html-accent-engage: fade(@red, 70%);
|
||||
--css-accent-engage: fade(@sapphire, 70%);
|
||||
--js-accent-engage: fade(@yellow, 70%);
|
||||
--http-accent-engage: fade(@green, 70%);
|
||||
--apis-accent-engage: fade(@mauve, 70%);
|
||||
--learn-accent-engage: fade(@pink, 70%);
|
||||
--modal-backdrop-color: fade(@mantle, 70%);
|
||||
--selection-background-color: fade(@surface2, 60%);
|
||||
--text-primary-red: @red;
|
||||
--text-primary-green: @green;
|
||||
--text-primary-blue: @blue;
|
||||
--text-primary-yellow: @yellow;
|
||||
--collections-link: @flamingo;
|
||||
--collections-header: darken(@red, 30%);
|
||||
--collections-mandala: darken(@red, 20%);
|
||||
--collections-icon: darken(@red, 10%);
|
||||
--updates-link: @sky;
|
||||
--updates-header: @crust;
|
||||
--updates-mandala: lighten(@sky, 10%);
|
||||
--updates-icon: @sky;
|
||||
--ai-help-link: @green;
|
||||
--ai-help-header: @crust;
|
||||
--ai-help-mandala: lighten(@green, 10%);
|
||||
--ai-help-icon: @green;
|
||||
--form-limit-color: @overlay0;
|
||||
--form-limit-color-emphasis: @overlay1;
|
||||
--form-invalid-color: @red;
|
||||
--form-invalid-focus-color: @flamingo;
|
||||
--form-invalid-focus-effect-color: fade(@flamingo, 20%);
|
||||
--baseline-high-bg: hsl(
|
||||
hue(@green),
|
||||
saturation(@green),
|
||||
lightness(@surface0)
|
||||
);
|
||||
--baseline-high-engine-bg: hsl(
|
||||
hue(@green),
|
||||
saturation(@green),
|
||||
lightness(@base)
|
||||
);
|
||||
--baseline-high-check: @green;
|
||||
--baseline-low-bg: hsl(hue(@blue), saturation(@blue), lightness(@surface0));
|
||||
--baseline-low-engine-bg: hsl(
|
||||
hue(@blue),
|
||||
saturation(@blue),
|
||||
lightness(@base)
|
||||
);
|
||||
--baseline-low-check: @blue;
|
||||
--baseline-low-pill-bg: @sapphire;
|
||||
--baseline-low-pill-color: @base;
|
||||
--baseline-limited-bg: @surface0;
|
||||
--baseline-limited-engine-bg: @base;
|
||||
--baseline-limited-check: @green;
|
||||
--baseline-limited-cross: @peach;
|
||||
--color-text-primary: @text;
|
||||
--color-text-secondary: @subtext0;
|
||||
--color-background-page: @base;
|
||||
--color-background-primary: @mantle;
|
||||
--color-background-secondary: @surface0;
|
||||
--color-link-normal: @blue;
|
||||
--color-link-visited: @mauve;
|
||||
--color-border-primary: @surface1;
|
||||
--color-border-secondary: @overlay2; // used for icons
|
||||
--color-border-active: @accent;
|
||||
--color-area-background: fade(@accent, 25%);
|
||||
--color-area-highlight-border: @accent;
|
||||
--color-area-link: @accent;
|
||||
--color-background-red: fade(@red, 25%);
|
||||
--color-background-orange: fade(@peach, 25%);
|
||||
--color-background-yellow: fade(@yellow, 25%);
|
||||
--color-background-green: fade(@green, 25%);
|
||||
--color-background-blue: fade(@blue, 25%);
|
||||
--color-background-purple: fade(@mauve, 25%);
|
||||
--color-white: @text;
|
||||
--color-white-alpha-25: fade(@text, 25%);
|
||||
--color-white-alpha-75: fade(@text, 75%);
|
||||
--color-black: @crust;
|
||||
--color-black-alpha-25: fade(@crust, 25%);
|
||||
--color-black-alpha-75: fade(@crust, 75%);
|
||||
|
||||
--color-gray-90: hsl(hue(@base), saturation(@base), 90%);
|
||||
--color-gray-80: hsl(hue(@base), saturation(@base), 80%);
|
||||
--color-gray-60: hsl(hue(@base), saturation(@base), 60%);
|
||||
--color-gray-40: hsl(hue(@base), saturation(@base), 40%);
|
||||
--color-gray-20: hsl(hue(@base), saturation(@base), 20%);
|
||||
--color-gray-10: hsl(hue(@base), saturation(@base), 10%);
|
||||
--color-gray-05: hsl(hue(@base), saturation(@base), 5%);
|
||||
#__color-scale(@id, @color) {
|
||||
--color-@{id}-90: hsl(hue(@color), saturation(@color), 90%);
|
||||
--color-@{id}-80: hsl(hue(@color), saturation(@color), 80%);
|
||||
--color-@{id}-50: hsl(hue(@color), saturation(@color), 50%);
|
||||
--color-@{id}-20: hsl(hue(@color), saturation(@color), 20%);
|
||||
--color-@{id}-10: hsl(hue(@color), saturation(@color), 10%);
|
||||
}
|
||||
#__color-scale(red, @red);
|
||||
#__color-scale(orange, @peach);
|
||||
#__color-scale(yellow, @yellow);
|
||||
#__color-scale(green, @green);
|
||||
#__color-scale(blue, @blue);
|
||||
#__color-scale(purple, @mauve);
|
||||
|
||||
.baseline-indicator {
|
||||
--baseline-bg: @surface0;
|
||||
--baseline-engine-bg: @base;
|
||||
--baseline-check: @green;
|
||||
--baseline-cross: @peach;
|
||||
|
||||
@darker: fade(@peach, 20%);
|
||||
@svg: escape(
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 111 62"><path fill="@{peach}" d="m30.833 0 18.5 18.6-6.166 6.2-18.5-18.6z"/><path fill="@{darker}" d="M86.333 6.2 111 31 86.333 55.8l-6.166-6.2 18.5-18.6-18.5-18.6z"/><path fill="@{peach}" d="m67.833 37.2-6.166 6.2 18.5 18.6 6.166-6.2z"/><path fill="@{darker}" d="m24.667 6.2 6.166 6.2-18.5 18.6 18.5 18.6-6.166 6.2L0 31z"/><path fill="@{peach}" d="m80.167 0 6.166 6.2-55.5 55.8-6.166-6.2z"/></svg>'
|
||||
);
|
||||
--baseline-img: url("data:image/svg+xml,@{svg}");
|
||||
|
||||
&.high {
|
||||
--baseline-bg: fade(@green, 20%);
|
||||
--baseline-engine-bg: fade(@green, 20%);
|
||||
--baseline-check: @green;
|
||||
|
||||
@darker: fade(@green, 20%);
|
||||
@svg: escape(
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 111 62"><path fill="@{darker}" d="m86.333 6.2-6.166 6.2 18.5 18.6-18.5 18.6-12.334-12.4-6.166 6.2 18.5 18.6L111 31zM30.833 0 6.167 24.8l6.166 6.2 18.5-18.6 12.334 12.4 6.166-6.2z"/><path fill="@{green}" d="m80.167 0 6.166 6.2-55.5 55.8L0 31l6.167-6.2 24.666 24.8z"/></svg>'
|
||||
);
|
||||
--baseline-img: url("data:image/svg+xml,@{svg}");
|
||||
}
|
||||
|
||||
&.low {
|
||||
--baseline-bg: fade(@blue, 20%);
|
||||
--baseline-engine-bg: fade(@blue, 20%);
|
||||
--baseline-check: @blue;
|
||||
--baseline-pill-bg: @blue;
|
||||
--baseline-pill-color: @base;
|
||||
|
||||
@darker: fade(@blue, 20%);
|
||||
@svg: escape(
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 111 61"><path fill="@{darker}" d="M30.833 0 37 6.1l-6.167 6.1-6.166-6.1zm12.334 12.2 6.166 6.1-6.166 6.1L37 18.3zm49.333 0 6.167 6.1-6.167 6.1-6.167-6.1zm12.333 12.2L111 30.5l-6.167 6.1-6.166-6.1zM92.5 36.6l6.167 6.1-6.167 6.1-6.167-6.1zM80.167 48.8l6.166 6.1-6.166 6.1L74 54.9zM67.833 36.6 74 42.7l-6.167 6.1-6.166-6.1zM18.5 12.2l6.167 6.1-6.167 6.1-6.167-6.1z"/><path fill="@{blue}" d="m80.167 0 6.166 6.1-55.5 54.9L0 30.5l6.167-6.1 24.666 24.4z"/></svg>'
|
||||
);
|
||||
--baseline-img: url("data:image/svg+xml,@{svg}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-document domain("developer.mozilla.org") {
|
||||
|
||||
Reference in new issue
Block a user