Skip to content

Commit f743cc8

Browse files
committed
Auto merge of #3237 - Turbo87:color-vars, r=locks
styles: Use numeric darkness naming and HSL for color values This PR refactors our CSS color variables to use numeric darkness values in their names (e.g. `grey900` and `yellow500`), instead of "dark, darker, darkest, ...". It also switches those color values over to use HSL instead of RGB to make it easier to find good light/dark variants of the colors in the future. The actual colors did not change though, they were only converted to the other representation :) r? `@locks`
2 parents 09c292a + a01f488 commit f743cc8

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

app/components/header.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ input.search {
6262

6363
&:focus {
6464
outline: none;
65-
box-shadow: 0 0 0 4px var(--yellow);
65+
box-shadow: 0 0 0 4px var(--yellow500);
6666
}
6767
}
6868

app/components/progress-bar.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
top: 0;
55
height: 3px;
66
box-shadow: 0 0 10px rgba(0, 13, 41, 0.6);
7-
background: var(--yellow) !important;
7+
background: var(--yellow500) !important;
88
}

app/styles/application.module.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
:root {
2-
--violet: #2e2359;
3-
--dark-grey: #2a3439;
4-
--dark-green: #3b6837;
5-
--yellow: #ffc833;
2+
--violet800: hsl(252, 44%, 24%);
3+
--grey900: hsl(200, 15%, 19%);
4+
--green800: hsl(115, 31%, 31%);
5+
--yellow500: hsl(44, 100%, 60%);
66

7-
--header-bg-color: var(--dark-green);
8-
--footer-bg-color: var(--dark-green);
7+
--header-bg-color: var(--green800);
8+
--footer-bg-color: var(--green800);
99

1010
--font-family: "Fira Sans", sans-serif;
1111

@@ -20,9 +20,9 @@
2020
}
2121

2222
:global(.new-design) {
23-
--header-bg-color: var(--violet);
23+
--header-bg-color: var(--violet800);
2424
--main-bg: white;
25-
--footer-bg-color: var(--dark-grey);
25+
--footer-bg-color: var(--grey900);
2626
}
2727

2828
* {

0 commit comments

Comments
 (0)