Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start process to move to using custom CSS properties for colors #2874

Merged
merged 2 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/alternate-login-prompt/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
display: flex;
justify-content: center;
align-items: center;
background: rgba($studio-black, 0.3);
background: var(--overlay-color);
}

.alternate-login__dismiss {
Expand Down Expand Up @@ -62,7 +62,7 @@
padding-right: 12px;
}
.button-borderless {
color: $studio-simplenote-blue-50;
color: var(--accent-color);
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/app-layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

&::before {
content: '';
background-color: rgba($studio-black, 0.2);
background-color: var(--overlay-color);
display: block;
height: 100%;
left: 0;
Expand Down Expand Up @@ -85,7 +85,7 @@
animation: pulse 2s infinite ease-in-out;

path {
fill: $studio-gray-5;
fill: var(--secondary-color);
}
}

Expand Down
40 changes: 20 additions & 20 deletions lib/auth/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@

input,
button[type='submit'] {
background-color: $studio-white;
background-color: var(--background-color);
border: solid 1px $studio-gray-10;
border-radius: 4px;
box-sizing: border-box;
color: $studio-gray-80;
color: var(--primary-color);
display: block;
height: 40px;
padding: 11px 15px;
Expand All @@ -65,8 +65,8 @@
}

input:disabled {
border-color: $studio-gray-5;
color: $studio-gray-20;
border-color: var(--secondary-color);
color: var(--tertiary-color);
}

input:read-only {
Expand All @@ -75,8 +75,8 @@
}

input:focus {
border-color: $studio-simplenote-blue-50;
box-shadow: 0 0 0 1px $studio-simplenote-blue-50;
border-color: var(--accent-color);
box-shadow: 0 0 0 1px var(--accent-color);
outline: none;
}

Expand All @@ -85,23 +85,23 @@
}

button[type='submit'] {
background-color: $studio-simplenote-blue-50;
background-color: var(--accent-color);
border: none;
color: $studio-white;
color: var(--background-color);
font-weight: 500;
margin: 16px auto 8px;
padding: 0 15px 2px;
}

a.login__forgot {
color: $studio-gray-50;
color: var(--foreground-color);
text-decoration: none;
}

.login__forgot,
.login__signup,
.terms {
color: $studio-gray-50;
color: var(--foreground-color);
display: block;
font-size: 14px;
margin: 16px auto;
Expand All @@ -112,15 +112,15 @@
.login__signup a,
.login__auth-message a,
.terms a {
color: $studio-simplenote-blue-50;
color: var(--accent-color);
margin-left: 5px;
text-decoration: none;
white-space: nowrap;
}

.or {
background: $studio-white;
color: $studio-gray-50;
background: var(--background-color);
color: var(--foreground-color);
display: block;
font-size: 15px;
font-style: italic;
Expand All @@ -133,7 +133,7 @@
}

.or-line {
border-bottom: 1px solid $studio-gray-5;
border-bottom: 1px solid var(--secondary-color);
margin: -20px auto;
max-width: 320px;
text-align: center;
Expand All @@ -146,7 +146,7 @@
background-color: $studio-wordpress-blue-50;
border-radius: 4px;
box-sizing: border-box;
color: $studio-white;
color: var(--background-color);
display: block;
font-size: 16px;
font-weight: 500;
Expand All @@ -167,7 +167,7 @@
width: 320px;

svg.icon-mail {
color: $studio-gray-50;
color: var(--foreground-color);
width: 60px;
height: 60px;
}
Expand Down Expand Up @@ -206,22 +206,22 @@ body[data-theme='dark'] .login {
color: $studio-gray-20;
}
.or-line {
border-color: $studio-gray-80;
border-color: var(--primary-color);
}

svg.icon-mail {
color: $studio-gray-30;
}
input {
border-color: $studio-gray-50;
border-color: var(--foreground-color);

&:disabled {
color: $studio-gray-50;
color: var(--foreground-color);
border-color: $studio-gray-70;
}

&:read-only {
border-color: $studio-gray-50;
border-color: var(--foreground-color);
background-color: rgba(255, 255, 255, 0.07);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/components/dev-badge/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
right: 12px;
bottom: 12px;
padding: 2px 4px;
background: $studio-gray-5;
color: $studio-gray-80;
background: var(--secondary-color);
color: var(--primary-color);
font-size: 0.75rem;
line-height: 1;
}
4 changes: 2 additions & 2 deletions lib/components/progress-bar/style.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.progress-bar {
@at-root body[data-theme='light'] & {
background-color: $studio-gray-5;
background-color: var(--secondary-color);
}
@at-root body[data-theme='dark'] & {
background-color: $studio-gray-80;
}
}

.progress-bar__bar {
background-color: $studio-gray-50 !important;
background-color: var(--foreground-color) !important;
}
28 changes: 14 additions & 14 deletions lib/components/slider/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,36 +108,36 @@ body[data-theme='light'] {
.slider {
// Track
&::-webkit-slider-runnable-track {
background: $studio-gray-5;
background: var(--secondary-color);
}
&::-moz-range-track {
background: $studio-gray-5;
background: var(--secondary-color);
}
&::-ms-track {
border-color: $studio-gray-5;
border-color: var(--secondary-color);
}
&::-ms-fill-lower {
background: $studio-white;
background: var(--background-color);
}
&::-ms-fill-upper {
background: $studio-white;
background: var(--background-color);
}

// Thumb
&::-webkit-slider-thumb {
border-color: $studio-gray-5;
background: $studio-white;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
border-color: var(--secondary-color);
background: var(--background-color);
box-shadow: 0 1px 3px 0 var(--overlay-color);
}
&::-moz-range-thumb {
background: $studio-white;
border-color: $studio-gray-5;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
background: var(--background-color);
border-color: var(--secondary-color);
box-shadow: 0 1px 3px 0 var(--overlay-color);
}
&::-ms-thumb {
border-color: $studio-gray-5;
background: $studio-white;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
border-color: var(--secondary-color);
background: var(--background-color);
box-shadow: 0 1px 3px 0 var(--overlay-color);
}
}
}
4 changes: 2 additions & 2 deletions lib/components/spinner/style.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.spinner__circle {
@at-root body[data-theme='light'] & {
color: $studio-gray-5;
color: var(--secondary-color);
}
@at-root body[data-theme='dark'] & {
color: $studio-gray-80;
}

&.is-white {
color: $studio-white;
color: var(--background-color);
}
}
8 changes: 6 additions & 2 deletions lib/components/tab-panels/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@
margin: 0 0.5em;
border-bottom: 2px solid;
padding: 0.75em;
color: $studio-gray-80;
color: var(--primary-color);
text-transform: capitalize;
border-radius: 0;

&.button {
border-bottom-color: transparent;
}

&.is-active {
color: var(--accent-color);
border-bottom-color: var(--accent-color);
}
&:active {
color: $studio-white;
color: var(--background-color);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/components/tag-chip/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
border-radius: 16px;
line-height: 1.25em;
white-space: nowrap;
background: $studio-gray-5;
background: var(--secondary-color);
text-decoration: none;
font-size: 14px;
position: relative;
Expand All @@ -29,8 +29,8 @@
.remove-tag-icon {
display: none;
position: absolute;
background-color: $studio-gray-50;
color: $studio-white;
background-color: var(--foreground-color);
color: var(--background-color);
border-radius: 50%;
top: -8px;
width: 16px;
Expand Down
4 changes: 2 additions & 2 deletions lib/controls/checkbox/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $checkbox-sprite: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5
pointer-events: none;
border-radius: 50%;
overflow: hidden;
border: 1px solid $studio-gray-5;
border: 1px solid var(--secondary-color);
}

.checkbox-control-checked {
Expand Down Expand Up @@ -73,7 +73,7 @@ $checkbox-sprite: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5
background-size: 36px 36px;
border-radius: 0;
border: 0;
fill: $studio-gray-50;
fill: var(--foreground-color);
}
.checkbox-control-base {
background-position: 0 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/controls/toggle/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $toggle-control-knob-size: $toggle-control-height - $toggle-control-knob-margin
display: block;
width: $toggle-control-knob-size;
height: $toggle-control-knob-size;
background: white;
background: var(--background-color);
border-radius: $toggle-control-height * 0.5;
transform: translate(
$toggle-control-knob-margin,
Expand Down
2 changes: 1 addition & 1 deletion lib/dialog-renderer/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
display: flex;
justify-content: center;
align-items: center;
background: rgba($studio-black, 0.2);
background: var(--overlay-color);
}

.dialog-renderer__content {
Expand Down
4 changes: 2 additions & 2 deletions lib/dialog/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $dialog-title-height: 56px;
display: flex;
flex-direction: column;
width: calc(100vw - 2rem);
background: white;
background: var(--background-color);
border-radius: 8px;
max-height: $dialog-max-height;

Expand All @@ -16,7 +16,7 @@ $dialog-title-height: 56px;

.dialog-title-bar {
display: flex;
border-bottom: 1px solid $studio-gray-5;
border-bottom: 1px solid var(--secondary-color);
height: $dialog-title-height;

.button {
Expand Down
10 changes: 5 additions & 5 deletions lib/dialogs/about/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// For overriding theme settings.
// TODO: Improve theme management so this isn't necessary

background: $studio-simplenote-blue-50 !important;
color: $studio-white !important;
background: var(--accent-color) !important;
color: var(--background-color) !important;
a {
color: $studio-white;
color: var(--background-color);
}
}

Expand All @@ -20,7 +20,7 @@
}

a {
color: white;
color: var(--background-color);
text-decoration: none;
}
}
Expand Down Expand Up @@ -95,6 +95,6 @@

& svg,
&:active svg {
fill: white;
fill: var(--background-color);
}
}
Loading