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

Declare & Use CSS Custom Properties #3146

Merged
merged 20 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
a few more color variables
  • Loading branch information
SychO9 committed Oct 31, 2021
commit 8f700c3f1ccd781278db1afd6067467484085795
4 changes: 2 additions & 2 deletions less/admin/AdminNav.less
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@
}

.ExtensionListItem-Dot.enabled {
background-color: #2ECC40;
background-color: var(--enabled-color);
}
.ExtensionListItem-Dot.disabled {
border: 2px solid #FF4136;
border: 2px solid var(--disabled-color);
box-sizing: border-box;
}
2 changes: 1 addition & 1 deletion less/common/Badge.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
}

.Badge--hidden {
background: #888;
--badge-bg: var(--badge-hidden-bg);
SychO9 marked this conversation as resolved.
Show resolved Hide resolved
}
6 changes: 3 additions & 3 deletions less/common/Checkbox.less
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}

.on& {
background: #58a400;
background: var(--switch-on-color);

.LoadingIndicator-container {
// Show loading indicator over the switch button
Expand Down Expand Up @@ -98,10 +98,10 @@
font-size: 14px;

.on & {
color: #58a400;
color: var(--switch-on-color);
}
.off & {
color: #d0021b;
color:var(--switch-off-color);
}
.disabled & {
color: var(--muted-more-color) !important;
Expand Down
16 changes: 11 additions & 5 deletions less/common/root.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
--control-bg: @control-bg;
--control-bg-light: lighten(@control-bg, 3%);
--control-bg-dark: darken(@control-bg, 4%);
--control-color: @control-color; // <--
--control-color: @control-color;
--control-danger-bg: @control-danger-bg;
--control-danger-color: @control-danger-color;

Expand All @@ -37,13 +37,19 @@
--alert-success-bg: @alert-success-bg;
--alert-success-color: @alert-success-color;

--switch-on-color: #58a400;
--switch-off-color: #d0021b;

--enabled-color: #2ECC40;
--disabled-color: #FF4136;

--validation-error-color: @validation-error-color;

// Component colors
--avatar-bg: @control-bg;
--badge-bg: @muted-color;
--avatar-bg: var(--control-bg);
--badge-bg: var(--muted-color);
--badge-color: #fff;
--usercard-bg: @control-bg;
--badge-hidden-bg: #888;
--usercard-bg: var(--control-bg);
--hero-bg: @hero-bg;
--hero-color: @hero-color;

Expand Down
2 changes: 1 addition & 1 deletion less/forum/Post.less
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
border: 0;
padding: 0;
background: var(--code-bg);
color: #666;
color: var(--code-color);
font-size: 90%;
border-radius: @border-radius;
overflow-wrap: normal;
Expand Down