refactor(stylus): use nesting wherever possible, simplify selectors (#1216)
* refactor(stylus): use nesting wherever possible, simplify selectors * refactor(stylus): more nesting
This commit is contained in:
1 parent
39d271316e
commit
51e9ff11b1
1 file changed
+133
-114
+133
-114
@@ -2,7 +2,7 @@
|
||||
@name Stylus Catppuccin
|
||||
@namespace github.com/catppuccin/userstyles/styles/stylus
|
||||
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/stylus
|
||||
@version 1.2.3
|
||||
@version 1.2.4
|
||||
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/stylus/catppuccin.user.css
|
||||
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Astylus
|
||||
@description Soothing pastel theme for Stylus
|
||||
@@ -17,11 +17,13 @@
|
||||
|
||||
@-moz-document url-prefix("moz-extension://"), url-prefix(chrome-extension://)
|
||||
{
|
||||
[data-ui-theme="light"] {
|
||||
#catppuccin(@lightFlavor, @accentColor);
|
||||
}
|
||||
[data-ui-theme="dark"] {
|
||||
#catppuccin(@darkFlavor, @accentColor);
|
||||
:root {
|
||||
&[data-ui-theme="light"] {
|
||||
#catppuccin(@lightFlavor, @accentColor);
|
||||
}
|
||||
&[data-ui-theme="dark"] {
|
||||
#catppuccin(@darkFlavor, @accentColor);
|
||||
}
|
||||
}
|
||||
|
||||
#catppuccin(@lookup, @accent) {
|
||||
@@ -66,36 +68,36 @@
|
||||
}
|
||||
}
|
||||
|
||||
&:root {
|
||||
--bg: @base;
|
||||
--fg: @text;
|
||||
--c30: @subtext1;
|
||||
--c40: @overlay0;
|
||||
--c45: @surface2;
|
||||
--c50: @subtext0;
|
||||
--c60: @subtext0;
|
||||
--c65: @surface2;
|
||||
--c75: @overlay1;
|
||||
--c80: @surface1;
|
||||
--c85: @surface0;
|
||||
--c90: @base;
|
||||
--c95: @mantle;
|
||||
--c97: @mantle;
|
||||
--c98: @base;
|
||||
--c99: @base;
|
||||
--c100: @base;
|
||||
--red1: @red;
|
||||
--accent-1: @accent-color;
|
||||
--accent-2: @accent-color;
|
||||
--accent-3: fade(@accent-color, 25%);
|
||||
.slider {
|
||||
--color-on: fade(@accent-color, 25%);
|
||||
--color-off: @surface2;
|
||||
}
|
||||
:focus {
|
||||
--focus-color1: @accent-color !important;
|
||||
--focus-color2: fade(@accent-color, 25%) !important;
|
||||
}
|
||||
--bg: @base;
|
||||
--fg: @text;
|
||||
--c30: @subtext1;
|
||||
--c40: @overlay0;
|
||||
--c45: @surface2;
|
||||
--c50: @subtext0;
|
||||
--c60: @subtext0;
|
||||
--c65: @surface2;
|
||||
--c75: @overlay1;
|
||||
--c80: @surface1;
|
||||
--c85: @surface0;
|
||||
--c90: @base;
|
||||
--c95: @mantle;
|
||||
--c97: @mantle;
|
||||
--c98: @base;
|
||||
--c99: @base;
|
||||
--c100: @base;
|
||||
--red1: @red;
|
||||
--accent-1: @accent-color;
|
||||
--accent-2: @accent-color;
|
||||
--accent-3: fade(@accent-color, 25%);
|
||||
|
||||
.slider {
|
||||
--color-on: fade(@accent-color, 25%);
|
||||
--color-off: @surface2;
|
||||
}
|
||||
|
||||
:focus {
|
||||
--focus-color1: @accent-color !important;
|
||||
--focus-color2: fade(@accent-color, 25%) !important;
|
||||
}
|
||||
|
||||
.active #filters-stats,
|
||||
@@ -123,19 +125,29 @@
|
||||
);
|
||||
content: url("data:image/svg+xml,@{svg}");
|
||||
}
|
||||
#message-box.danger #message-box-title::before {
|
||||
@fade_color: fade(@red, 67%);
|
||||
@svg: escape(
|
||||
'<svg version="1.1" viewBox="0 0 34.5 34.5" xmlns="http://www.w3.org/2000/svg"><g transform="translate(1.5 1.5)"><path d="M.68 13.5h.14a.68.68 135 0 0 .68-.68V3.68c0-.375-.012-.988.053-1.357.139-.786.622-2.01 2.27-2.272.37-.06.982-.05 1.357-.05h21.64c.375 0 .987-.009 1.358.049 1.676.26 2.15 1.485 2.279 2.273.06.37.043.982.043 1.357v9.14a.68.68 45 0 0 .68.68h.14a.68.68 45 0 1 .68.68v3.64a.68.68 135 0 1-.68.68h-.14a.68.68 135 0 0-.68.68v9.14c0 .375.017.988-.044 1.358-.13.787-.604 2.013-2.279 2.273-.37.057-.982.05-1.358.05H5.18c-.375 0-.987.007-1.358-.052-1.644-.264-2.128-1.487-2.268-2.272-.066-.37-.054-.982-.054-1.357v-9.14a.68.68 45 0 0-.68-.68H.68a.68.68 45 0 1-.68-.68v-3.64a.68.68 135 0 1 .68-.68z" stroke="@{base}" fill="@{red}" stroke-linejoin="round" stroke-width="2.25" paint-order="stroke fill markers"/><path d="M2.788 15h1.175a.54.54 135 0 0 .537-.537V5.538c0-.297-.017-.78.024-1.074.094-.66.475-1.72 1.94-1.928.294-.042.777-.036 1.074-.036h16.925c.296 0 .78-.006 1.073.038 1.426.211 1.821 1.268 1.928 1.927.047.292.036.776.036 1.072v8.925a.54.54 45 0 0 .538.538h1.175a.54.54 45 0 1 .537.537v.925a.54.54 135 0 1-.537.538h-1.175a.54.54 135 0 0-.538.537v8.925c0 .297.01.78-.04 1.073-.111.658-.51 1.714-1.925 1.927-.293.044-.776.038-1.072.038H7.538c-.297 0-.78.006-1.074-.037-1.434-.211-1.826-1.27-1.93-1.928-.046-.292-.034-.776-.034-1.073v-8.925A.54.54 45 0 0 3.963 17H2.788a.54.54 45 0 1-.538-.538v-.925A.54.54 135 0 1 2.788 15z" fill="black" stroke-linejoin="round" stroke="@{base}" stroke-width="2" paint-order="stroke fill markers"/><path d="M2.788 15h1.175a.54.54 135 0 0 .537-.537V5.538c0-.297-.017-.78.024-1.074.094-.66.475-1.72 1.94-1.928.294-.042.777-.036 1.074-.036h16.925c.296 0 .78-.006 1.073.038 1.426.211 1.821 1.268 1.928 1.927.047.292.036.776.036 1.072v8.925a.54.54 45 0 0 .538.538h1.175a.54.54 45 0 1 .537.537v.925a.54.54 135 0 1-.537.538h-1.175a.54.54 135 0 0-.538.537v8.925c0 .297.01.78-.04 1.073-.111.658-.51 1.714-1.925 1.927-.293.044-.776.038-1.072.038H7.538c-.297 0-.78.006-1.074-.037-1.434-.211-1.826-1.27-1.93-1.928-.046-.292-.034-.776-.034-1.073v-8.925A.54.54 45 0 0 3.963 17H2.788a.54.54 45 0 1-.538-.538v-.925A.54.54 135 0 1 2.788 15z" fill="@{fade_color}" stroke-linejoin="round" stroke="@{base}" stroke-width="2" paint-order="stroke fill markers"/><path d="M21.715 4.974c-1.156-.414-3.115-.889-5.815-.75-.74.039-1.94.174-2.656.366-3.022.81-4.142 2.93-4.516 4.402-.183.716-.217 1.939-.079 2.666.277 1.462 1.486 3.747 6.737 6.126.675.306 1.823.772 2.29 1.34q.07.085.137.181c.422.603.666 1.937.21 2.487a2.2 2.2 0 0 1-.487.424c-.616.405-1.829.62-2.57.65-.895.034-2.145-.023-3.445-.42-.709-.216-1.458.073-1.716.768l-.659 1.775c-.258.695.008 1.641.68 1.951 1.132.522 3.136 1.104 6.159.815.738-.07 1.93-.262 2.637-.482 3.15-.981 4.36-3.28 4.822-4.747.221-.706.333-1.916.24-2.65-.192-1.514-.978-3.965-3.922-5.497-.657-.342-1.812-.69-2.509-.942-.912-.332-2.091-.853-2.759-1.515-.507-.503-.47-1.826-.072-2.445a2.4 2.4 0 0 1 1.253-.976c.695-.247 1.925-.167 2.653-.03.667.125 1.38.305 1.976.476.712.204 1.473-.141 1.72-.84l.466-1.317c.248-.7-.202-1.608-.9-1.857Z" stroke="@{base}" stroke-width="2" fill="@{red}" paint-order="stroke fill markers"/></g></svg>'
|
||||
);
|
||||
background: url("data:image/svg+xml,@{svg}") !important;
|
||||
}
|
||||
#message-box.danger #message-box-close-icon i {
|
||||
color: var(--c40);
|
||||
&:hover {
|
||||
color: var(--bg);
|
||||
|
||||
#message-box.danger {
|
||||
#message-box-title {
|
||||
background-color: @red;
|
||||
color: @base;
|
||||
|
||||
&::before {
|
||||
@fade_color: fade(@red, 67%);
|
||||
@svg: escape(
|
||||
'<svg version="1.1" viewBox="0 0 34.5 34.5" xmlns="http://www.w3.org/2000/svg"><g transform="translate(1.5 1.5)"><path d="M.68 13.5h.14a.68.68 135 0 0 .68-.68V3.68c0-.375-.012-.988.053-1.357.139-.786.622-2.01 2.27-2.272.37-.06.982-.05 1.357-.05h21.64c.375 0 .987-.009 1.358.049 1.676.26 2.15 1.485 2.279 2.273.06.37.043.982.043 1.357v9.14a.68.68 45 0 0 .68.68h.14a.68.68 45 0 1 .68.68v3.64a.68.68 135 0 1-.68.68h-.14a.68.68 135 0 0-.68.68v9.14c0 .375.017.988-.044 1.358-.13.787-.604 2.013-2.279 2.273-.37.057-.982.05-1.358.05H5.18c-.375 0-.987.007-1.358-.052-1.644-.264-2.128-1.487-2.268-2.272-.066-.37-.054-.982-.054-1.357v-9.14a.68.68 45 0 0-.68-.68H.68a.68.68 45 0 1-.68-.68v-3.64a.68.68 135 0 1 .68-.68z" stroke="@{base}" fill="@{red}" stroke-linejoin="round" stroke-width="2.25" paint-order="stroke fill markers"/><path d="M2.788 15h1.175a.54.54 135 0 0 .537-.537V5.538c0-.297-.017-.78.024-1.074.094-.66.475-1.72 1.94-1.928.294-.042.777-.036 1.074-.036h16.925c.296 0 .78-.006 1.073.038 1.426.211 1.821 1.268 1.928 1.927.047.292.036.776.036 1.072v8.925a.54.54 45 0 0 .538.538h1.175a.54.54 45 0 1 .537.537v.925a.54.54 135 0 1-.537.538h-1.175a.54.54 135 0 0-.538.537v8.925c0 .297.01.78-.04 1.073-.111.658-.51 1.714-1.925 1.927-.293.044-.776.038-1.072.038H7.538c-.297 0-.78.006-1.074-.037-1.434-.211-1.826-1.27-1.93-1.928-.046-.292-.034-.776-.034-1.073v-8.925A.54.54 45 0 0 3.963 17H2.788a.54.54 45 0 1-.538-.538v-.925A.54.54 135 0 1 2.788 15z" fill="black" stroke-linejoin="round" stroke="@{base}" stroke-width="2" paint-order="stroke fill markers"/><path d="M2.788 15h1.175a.54.54 135 0 0 .537-.537V5.538c0-.297-.017-.78.024-1.074.094-.66.475-1.72 1.94-1.928.294-.042.777-.036 1.074-.036h16.925c.296 0 .78-.006 1.073.038 1.426.211 1.821 1.268 1.928 1.927.047.292.036.776.036 1.072v8.925a.54.54 45 0 0 .538.538h1.175a.54.54 45 0 1 .537.537v.925a.54.54 135 0 1-.537.538h-1.175a.54.54 135 0 0-.538.537v8.925c0 .297.01.78-.04 1.073-.111.658-.51 1.714-1.925 1.927-.293.044-.776.038-1.072.038H7.538c-.297 0-.78.006-1.074-.037-1.434-.211-1.826-1.27-1.93-1.928-.046-.292-.034-.776-.034-1.073v-8.925A.54.54 45 0 0 3.963 17H2.788a.54.54 45 0 1-.538-.538v-.925A.54.54 135 0 1 2.788 15z" fill="@{fade_color}" stroke-linejoin="round" stroke="@{base}" stroke-width="2" paint-order="stroke fill markers"/><path d="M21.715 4.974c-1.156-.414-3.115-.889-5.815-.75-.74.039-1.94.174-2.656.366-3.022.81-4.142 2.93-4.516 4.402-.183.716-.217 1.939-.079 2.666.277 1.462 1.486 3.747 6.737 6.126.675.306 1.823.772 2.29 1.34q.07.085.137.181c.422.603.666 1.937.21 2.487a2.2 2.2 0 0 1-.487.424c-.616.405-1.829.62-2.57.65-.895.034-2.145-.023-3.445-.42-.709-.216-1.458.073-1.716.768l-.659 1.775c-.258.695.008 1.641.68 1.951 1.132.522 3.136 1.104 6.159.815.738-.07 1.93-.262 2.637-.482 3.15-.981 4.36-3.28 4.822-4.747.221-.706.333-1.916.24-2.65-.192-1.514-.978-3.965-3.922-5.497-.657-.342-1.812-.69-2.509-.942-.912-.332-2.091-.853-2.759-1.515-.507-.503-.47-1.826-.072-2.445a2.4 2.4 0 0 1 1.253-.976c.695-.247 1.925-.167 2.653-.03.667.125 1.38.305 1.976.476.712.204 1.473-.141 1.72-.84l.466-1.317c.248-.7-.202-1.608-.9-1.857Z" stroke="@{base}" stroke-width="2" fill="@{red}" paint-order="stroke fill markers"/></g></svg>'
|
||||
);
|
||||
background: url("data:image/svg+xml,@{svg}") !important;
|
||||
}
|
||||
}
|
||||
|
||||
#message-box-close-icon i {
|
||||
color: var(--c40);
|
||||
&:hover {
|
||||
color: var(--bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#filters label:hover,
|
||||
#filters .filter-selection:hover {
|
||||
background-color: @surface0;
|
||||
@@ -144,49 +156,56 @@
|
||||
.entry.usercss .style-name-link::after {
|
||||
background-color: fade(@accent-color, 25%);
|
||||
}
|
||||
|
||||
/* Syntax highlighting */
|
||||
.CodeMirror-activeline-background {
|
||||
background: @mantle;
|
||||
}
|
||||
.CodeMirror-linenumber {
|
||||
color: @subtext0;
|
||||
}
|
||||
.cm-s-default .cm-string {
|
||||
color: @peach;
|
||||
}
|
||||
.cm-s-default .cm-qualifier {
|
||||
color: @peach;
|
||||
}
|
||||
.installed .configure-usercss i {
|
||||
color: @accent-color;
|
||||
}
|
||||
.cm-s-default .cm-variable-2 {
|
||||
color: @sapphire;
|
||||
}
|
||||
.cm-s-default .cm-keyword {
|
||||
color: @mauve;
|
||||
}
|
||||
.cm-s-default .cm-atom,
|
||||
.cm-s-default .cm-number {
|
||||
color: @green;
|
||||
}
|
||||
.cm-s-default .cm-def {
|
||||
color: @sapphire;
|
||||
}
|
||||
.cm-s-default .cm-tag {
|
||||
color: @sapphire;
|
||||
}
|
||||
.cm-s-default .cm-builtin {
|
||||
color: @subtext1;
|
||||
}
|
||||
.cm-s-default .cm-variable-3 {
|
||||
color: @subtext1;
|
||||
}
|
||||
.cm-s-default .cm-comment {
|
||||
color: @subtext0;
|
||||
}
|
||||
.cm-s-default .cm-operator {
|
||||
color: @yellow;
|
||||
}
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {
|
||||
color: @green;
|
||||
}
|
||||
.cm-s-default {
|
||||
.cm-string {
|
||||
color: @peach;
|
||||
}
|
||||
.cm-qualifier {
|
||||
color: @peach;
|
||||
}
|
||||
.cm-variable-2 {
|
||||
color: @sapphire;
|
||||
}
|
||||
.cm-keyword {
|
||||
color: @mauve;
|
||||
}
|
||||
.cm-atom,
|
||||
.cm-number {
|
||||
color: @green;
|
||||
}
|
||||
.cm-def {
|
||||
color: @sapphire;
|
||||
}
|
||||
.cm-tag {
|
||||
color: @sapphire;
|
||||
}
|
||||
.cm-builtin {
|
||||
color: @subtext1;
|
||||
}
|
||||
.cm-variable-3 {
|
||||
color: @subtext1;
|
||||
}
|
||||
.cm-comment {
|
||||
color: @subtext0;
|
||||
}
|
||||
.cm-operator {
|
||||
color: @yellow;
|
||||
}
|
||||
.cm-variable {
|
||||
color: @text;
|
||||
}
|
||||
}
|
||||
button:disabled,
|
||||
select:disabled,
|
||||
option:disabled,
|
||||
@@ -213,49 +232,48 @@
|
||||
#message-box-title {
|
||||
color: @text;
|
||||
}
|
||||
.svg-icon:hover {
|
||||
fill: @overlay1;
|
||||
}
|
||||
.svg-icon {
|
||||
fill: @overlay0;
|
||||
|
||||
&:hover {
|
||||
fill: @overlay1;
|
||||
}
|
||||
}
|
||||
.onoffswitch input:checked + span {
|
||||
background-color: fade(@accent-color, 25%);
|
||||
}
|
||||
.onoffswitch input:checked + span::before {
|
||||
background-color: @accent-color;
|
||||
|
||||
&::before {
|
||||
background-color: @accent-color;
|
||||
}
|
||||
}
|
||||
#options-title {
|
||||
color: @base;
|
||||
}
|
||||
#message-box.danger #message-box-title {
|
||||
background-color: @red;
|
||||
color: @base;
|
||||
}
|
||||
h2 {
|
||||
color: @accent-color !important;
|
||||
}
|
||||
.installed .configure-usercss svg {
|
||||
fill: @accent-color !important;
|
||||
}
|
||||
.installed .configure-usercss:hover svg {
|
||||
fill: @accent-color !important;
|
||||
}
|
||||
.cm-s-default .cm-variable {
|
||||
color: @text;
|
||||
}
|
||||
.CodeMirror-activeline-background {
|
||||
background: @mantle;
|
||||
.installed .configure-usercss {
|
||||
i {
|
||||
color: @accent-color;
|
||||
}
|
||||
|
||||
svg,
|
||||
&:hover svg {
|
||||
fill: @accent-color !important;
|
||||
}
|
||||
}
|
||||
#live-reload-install-hint {
|
||||
color: @teal;
|
||||
}
|
||||
#menu.delete header {
|
||||
background: fade(@red, 25%);
|
||||
}
|
||||
#menu.delete > div,
|
||||
#menu.delete [data-cmd="delete"] {
|
||||
border-color: @red;
|
||||
#menu.delete {
|
||||
header {
|
||||
background: fade(@red, 25%);
|
||||
}
|
||||
|
||||
> div,
|
||||
&[data-cmd="delete"] {
|
||||
border-color: @red;
|
||||
}
|
||||
}
|
||||
.entry.odd {
|
||||
background-color: fade(@surface0, 25%);
|
||||
@@ -266,9 +284,10 @@
|
||||
}
|
||||
.split-btn-menu {
|
||||
border-color: @accent-color;
|
||||
}
|
||||
.split-btn-menu > :hover {
|
||||
background: fade(@accent-color, 25%);
|
||||
|
||||
> :hover {
|
||||
background: fade(@accent-color, 25%);
|
||||
}
|
||||
}
|
||||
#help-popup .title {
|
||||
background: @mantle;
|
||||
|
||||
Reference in new issue
Block a user