Skip to content

Commit

Permalink
Fix pillbar buttons in light theme (glitch-soc#1972)
Browse files Browse the repository at this point in the history
* Simplify pillbar button design and make it more consistent with toggles

* Fix pillbar buttons in light theme

Fixes glitch-soc#1970
  • Loading branch information
ClearlyClaire authored Nov 25, 2022
1 parent 43dbc62 commit 6517b7b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 29 deletions.
35 changes: 6 additions & 29 deletions app/javascript/flavours/glitch/styles/components/columns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,14 @@ $ui-header-height: 55px;
border-radius: 4px;
margin-bottom: 10px;
align-items: stretch;
gap: 2px;
}

.pillbar-button {
border: 0;
color: #fafafa;
padding: 2px;
margin: 0;
margin-left: 2px;
font-size: inherit;
flex: auto;
background-color: $ui-base-color;
Expand All @@ -578,43 +578,20 @@ $ui-header-height: 55px;
}

&:not([disabled]) {
&:hover {
background-color: darken($ui-base-color, 10%);
}

&:hover,
&:focus {
background-color: darken($ui-base-color, 15%);
}

&:active {
background-color: darken($ui-base-color, 20%);
background-color: darken($ui-base-color, 10%);
}

&.active {
background-color: $ui-highlight-color;
box-shadow: inset 0 5px darken($ui-highlight-color, 20%);

&:hover {
background-color: lighten($ui-highlight-color, 10%);
box-shadow: inset 0 5px darken($ui-highlight-color, 10%);
}
background-color: darken($ui-highlight-color, 2%);

&:hover,
&:focus {
background-color: lighten($ui-highlight-color, 15%);
box-shadow: inset 0 5px darken($ui-highlight-color, 5%);
}

&:active {
background-color: lighten($ui-highlight-color, 20%);
box-shadow: inset 0 5px $ui-highlight-color;
background-color: $ui-highlight-color;
}
}
}

/* TODO: check RTL? */
&:first-child {
margin-left: 0;
}
}

.limited-account-hint {
Expand Down
20 changes: 20 additions & 0 deletions app/javascript/flavours/glitch/styles/mastodon-light/diff.scss
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,26 @@ html {

// Glitch-soc-specific changes

.pillbar-button {
background: $ui-secondary-color;

&:not([disabled]) {
&:hover,
&:focus {
background: darken($ui-secondary-color, 10%);
}

&.active {
background-color: darken($ui-highlight-color, 2%);

&:hover,
&:focus {
background: lighten($ui-highlight-color, 10%);
}
}
}
}

.glitch.local-settings {
background: $ui-base-color;
border: 1px solid lighten($ui-base-color, 8%);
Expand Down

0 comments on commit 6517b7b

Please sign in to comment.