refactor(mastodon): remove redundant css & use vars (#685)

Co-authored-by: uncenter <[email protected]>
Co-authored-by: nullishamy <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-04-18 19:24:40 +01:00
1 parent 3fdd0d8374
commit 76db600358
1 file changed
+153 -49
+153 -49
View File
@@ -2,7 +2,7 @@
@name Mastodon Catppuccin @name Mastodon Catppuccin
@namespace github.com/catppuccin/userstyles/styles/mastodon @namespace github.com/catppuccin/userstyles/styles/mastodon
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/mastodon @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/mastodon
@version 1.2.2 @version 1.3.0
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/mastodon/catppuccin.user.css @updateURL https://github.com/catppuccin/userstyles/raw/main/styles/mastodon/catppuccin.user.css
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Amastodon @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Amastodon
@description Soothing pastel theme for Mastodon @description Soothing pastel theme for Mastodon
@@ -19,8 +19,10 @@
domain("mstdn.social"), domain("mstdn.social"),
domain("fosstodon.org"), domain("fosstodon.org"),
domain("piaille.fr"), domain("piaille.fr"),
domain("meow.lgbt"),
domain("tech.lgbt"), domain("tech.lgbt"),
domain("wetdry.world") { domain("wetdry.world"),
domain("toot.wales") {
.theme-mastodon-light, .theme-mastodon-light,
.skin-modern-light, .skin-modern-light,
.skin-mastodon-light { .skin-mastodon-light {
@@ -75,7 +77,7 @@ domain("wetdry.world") {
@mantle: @catppuccin[@@lookup][@mantle]; @mantle: @catppuccin[@@lookup][@mantle];
@crust: @catppuccin[@@lookup][@crust]; @crust: @catppuccin[@@lookup][@crust];
@accent-color: @catppuccin[@@lookup][@@accent]; @accent-color: @catppuccin[@@lookup][@@accent];
color-scheme: if(@lookup = latte, light, dark); color-scheme: if(@lookup = latte, light, dark);
::selection { ::selection {
@@ -89,11 +91,22 @@ domain("wetdry.world") {
} }
} }
--background-color: @base;
--background-color-alt: @base;
--dropdown-border-color: @surface1; --dropdown-border-color: @surface1;
--dropdown-background-color: @surface0; --dropdown-background-color: @surface0;
--modal-background-color: @mantle; --modal-background-color: @mantle;
--modal-border-color: @crust; --modal-border-color: @crust;
&,
.column-header__wrapper,
.column > *:not(.loading-indicator),
body.flavour-glitch.skin-default .column-header__wrapper {
--background-border-color: @surface0 !important;
}
&, &,
.tabs-bar__wrapper, .tabs-bar__wrapper,
.admin-wrapper .sidebar-wrapper__inner, .admin-wrapper .sidebar-wrapper__inner,
@@ -123,6 +136,7 @@ domain("wetdry.world") {
.account__header__bio .account__header__content, .account__header__bio .account__header__content,
.navigation-bar, .navigation-bar,
.column-link__badge, .column-link__badge,
.display-name__html,
.column-subheading, .column-subheading,
.account__display-name strong, .account__display-name strong,
.status__display-name strong, .status__display-name strong,
@@ -130,7 +144,9 @@ domain("wetdry.world") {
.public-layout .public-account-bio .account__header__content, .public-layout .public-account-bio .account__header__content,
.reply-indicator__content, .reply-indicator__content,
.status__content, .status__content,
.card__bar .display-name strong { .status__content__text,
.card__bar .display-name strong
{
color: @text; color: @text;
} }
@@ -155,15 +171,7 @@ domain("wetdry.world") {
.compose-panel hr, .compose-panel hr,
.navigation-panel hr { .navigation-panel hr {
border-top-color: @subtext0; border-top-color: @surface2;
}
.trends__item,
.status,
.getting-started__trends h4,
.trends__item__name span,
.story {
border-color: @surface0;
} }
.mention, .mention,
@@ -188,10 +196,80 @@ domain("wetdry.world") {
color: @accent-color; color: @accent-color;
} }
.emoji-mart-anchor-selected { .display-name strong {
color: @text !important;
}
.boost-modal__action-bar {
span {
color: @subtext1;
}
background: @mantle;
}
.emoji-mart-anchor-selected,
.reply-indicator__content a {
color: @accent-color !important; color: @accent-color !important;
} }
.privacy-dropdown__option {
background: @surface0;
.privacy-dropdown__option__content,
strong,
i {
color: @text;
}
&:hover,
&.active {
background: @accent-color !important;
.privacy-dropdown__option__content,
strong,
i {
color: @crust;
}
}
}
.privacy-dropdown.active .privacy-dropdown__value {
background: @accent-color !important;
}
.privacy-dropdown.active .privacy-dropdown__value > button,
.privacy-dropdown__value-icon.active > i {
color: @crust !important;
}
.emoji-mart-search > input {
color: @text !important;
}
.emoji-mart-search,
.language-dropdown__dropdown__results {
background: @surface0;
}
.language-dropdown__dropdown {
background: @surface1 !important;
}
.language-dropdown__dropdown__results__item {
> span {
color: @text;
}
&:hover,
&.active {
background: @accent-color;
> span {
color: @crust;
}
}
}
.conversation__unread, .conversation__unread,
.emoji-mart-anchor-bar, .emoji-mart-anchor-bar,
.compose-form__actions .icon-button.active, .compose-form__actions .icon-button.active,
@@ -220,10 +298,6 @@ domain("wetdry.world") {
color: @surface2; color: @surface2;
} }
.icon-button.inverted.active {
color: @crust;
}
.icon-button:active, .icon-button:active,
.icon-button:focus, .icon-button:focus,
.icon-button:hover, .icon-button:hover,
@@ -234,14 +308,14 @@ domain("wetdry.world") {
color: @accent-color; color: @accent-color;
} }
.column-header, .account__domain-pill {
.column-header__button, color: @accent-color;
.column-header__back-button, background: fadeout(@accent-color, 80);
}
.column-back-button, .column-back-button,
.drawer__header, .drawer__header,
.notification__filter-bar,
.account__section-headline button, .account__section-headline button,
.notification__filter-bar button,
.account__header, .account__header,
.search__input, .search__input,
.search__input:focus, .search__input:focus,
@@ -250,7 +324,6 @@ domain("wetdry.world") {
.public-layout .header, .public-layout .header,
.public-layout .public-account-header__bar::before, .public-layout .public-account-header__bar::before,
.account__header__fields, .account__header__fields,
.account__header__fields dt,
.account__header__fields .account__header__fields
dd:not(.account__header__bio .account__header__fields dd), dd:not(.account__header__bio .account__header__fields dd),
.admin-wrapper .sidebar ul .simple-navigation-active-leaf .selected, .admin-wrapper .sidebar ul .simple-navigation-active-leaf .selected,
@@ -258,16 +331,13 @@ domain("wetdry.world") {
.column-inline-form, .column-inline-form,
.follow_requests-unlocked_explanation, .follow_requests-unlocked_explanation,
.conversation--unread, .conversation--unread,
.column-header__collapsible-inner,
.announcements, .announcements,
.status-card__image { .status-card__image {
border-color: @crust; background: @surface0 !important;
background: @surface0;
} }
.account__section-headline { .account__section-headline {
background: @mantle; background: @mantle;
border-color: @crust;
} }
.focusable:focus { .focusable:focus {
@@ -282,7 +352,6 @@ domain("wetdry.world") {
} }
.dismissable-banner { .dismissable-banner {
border-color: @surface1;
background: @base; background: @base;
} }
@@ -297,10 +366,9 @@ domain("wetdry.world") {
); );
} }
.theme-mastodon-light .account__header__bar,
.theme-mastodon-light .column-header__back-button,
.account__header__bio .account__header__fields dl, .account__header__bio .account__header__fields dl,
.account__header__bio .account__header__fields, .account__header__bio .account__header__fields,
.boost-modal__container,
.empty-column-indicator, .empty-column-indicator,
.column > .scrollable, .column > .scrollable,
.nothing-here, .nothing-here,
@@ -309,15 +377,9 @@ domain("wetdry.world") {
&.admin, &.admin,
.admin-wrapper .sidebar ul a.selected, .admin-wrapper .sidebar ul a.selected,
.admin-wrapper .sidebar ul ul { .admin-wrapper .sidebar ul ul {
border-color: @mantle;
background: @base; background: @base;
} }
.compose-form__highlightable {
background-color: @base;
border-color: @surface0;
}
.dropdown-button { .dropdown-button {
border-color: @accent-color; border-color: @accent-color;
color: @accent-color; color: @accent-color;
@@ -342,31 +404,31 @@ domain("wetdry.world") {
.account__section-headline a.active::before, .account__section-headline a.active::before,
.account__section-headline button.active::after, .account__section-headline button.active::after,
.account__section-headline button.active::before, .account__section-headline button.active::before {
.notification__filter-bar a.active::after,
.notification__filter-bar a.active::before,
.notification__filter-bar button.active::after,
.notification__filter-bar button.active::before {
border-color: transparent transparent @mantle; border-color: transparent transparent @mantle;
} }
.poll__chart {
background: @overlay0;
&.leading {
background: @accent-color;
}
}
.search-popout, .search-popout,
.drawer__header a:hover, .drawer__header a:hover,
.column-header__button:hover, .column-header__button:hover,
.account__section-headline button:hover, .account__section-headline button:hover,
.notification__filter-bar button:hover,
.account__section-headline a:hover { .account__section-headline a:hover {
background: @surface2; background: @surface2;
} }
.prose a,
.column-link .active, .column-link .active,
.compose-form__poll__select__value, .compose-form__poll__select__value,
.column-link--transparent.active, .column-link--transparent.active,
.column-link--transparent:focus, .column-link--transparent:focus,
.column-link:focus { .column-link:focus,
color: @accent-color;
}
.column-link--transparent:hover, .column-link--transparent:hover,
.column-link:hover { .column-link:hover {
color: @accent-color; color: @accent-color;
@@ -432,15 +494,47 @@ domain("wetdry.world") {
background: @accent-color; background: @accent-color;
} }
select {
background-color: @mantle;
color: @text;
}
.mute-modal__cancel-button {
background-color: @base;
color: @text;
&:hover {
background-color: @surface0;
}
}
.drawer__inner, .drawer__inner,
.drawer__inner__mastodon, .drawer__inner__mastodon,
.compose-form__highlightable,
.column-header,
.boost-modal,
.mute-modal,
.privacy-dropdown__dropdown,
.explore__search-header .search__input { .explore__search-header .search__input {
background-color: @base; background-color: @base;
} }
.mute-modal__action-bar {
background-color: @mantle;
}
.mute-modal__container {
background-color: @base;
color: @text;
}
.compose-form .autosuggest-textarea__textarea {
color: @text !important;
background-color: @surface1 !important;
}
.compose-form .compose-form__modifiers, .compose-form .compose-form__modifiers,
.compose-form .autosuggest-textarea__textarea,
.compose-form .compose-form__autosuggest-wrapper, .compose-form .compose-form__autosuggest-wrapper,
.autosuggest-textarea__suggestions,
.compose-form .spoiler-input__input { .compose-form .spoiler-input__input {
background: @surface1 !important; background: @surface1 !important;
color: @text !important; color: @text !important;
@@ -466,9 +560,13 @@ domain("wetdry.world") {
box-shadow: none; box-shadow: none;
} }
.dropdown-menu__item--dangerous a {
color: @red;
}
.search__popout, .search__popout,
.dropdown-menu__arrow::before, .dropdown-menu__arrow::before,
.dropdown-menu__item a,
.dropdown-menu__item button, .dropdown-menu__item button,
.dropdown-menu__container__list, .dropdown-menu__container__list,
.dropdown-menu.bottom { .dropdown-menu.bottom {
@@ -485,6 +583,7 @@ domain("wetdry.world") {
.simple_form input[type="text"], .simple_form input[type="text"],
.simple_form textarea, .simple_form textarea,
.simple_form .block-button, .simple_form .block-button,
.notification__filter-bar button,
.simple_form .button, .simple_form .button,
.simple_form button { .simple_form button {
background: @mantle; background: @mantle;
@@ -493,6 +592,7 @@ domain("wetdry.world") {
.simple_form .block-button:hover, .simple_form .block-button:hover,
.simple_form .button:hover, .simple_form .button:hover,
.notification__filter-bar button:hover,
.simple_form button:hover { .simple_form button:hover {
background: @surface0; background: @surface0;
} }
@@ -607,6 +707,10 @@ domain("wetdry.world") {
.card__bar { .card__bar {
background: @surface0; background: @surface0;
} }
.reply-indicator {
background: @surface1;
}
} }
} }