Skip to content

Commit 2f53d72

Browse files
committed
Use OKLCH for color
- Auto fallbacks! - Nicer gradients!
1 parent b4716dc commit 2f53d72

File tree

4 files changed

+14
-26
lines changed

4 files changed

+14
-26
lines changed

_sass/_global.scss

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $mq-breakpoints: (
4343
// Assorted SASS Variables
4444

4545
$hovertransition: 0.2s;
46-
$brandgradient: linear-gradient(90deg, var(--purple), var(--pink));
46+
$brandgradient: linear-gradient(in oklch shorter hue to right, var(--purple), var(--pink));
4747
$hoverglow: var(--hoverglow);
4848
$borderradius: 0.5rem;
4949

@@ -52,27 +52,15 @@ $borderradius: 0.5rem;
5252
:root
5353
{
5454
--hoverglow: 0 0 2px var(--white), 0 0 5px var(--white), 0 0 5px var(--white), 0 0 10px var(--white), 0 0 40px var(--pink), 0 0 50px var(--purple);
55-
--pink: #ff5868;
56-
--purple: #7848ff;
57-
--linkblue: #4295f3;
55+
--pink: oklch(72.18% 0.222 17.93);
56+
--purple: oklch(57.61% 0.263 285.89);
57+
--linkblue: oklch(66.38% 0.161 253.7);
5858
--offwhite: #fbfcfc;
5959
--grey: #d9d9e0;
60-
--white: #ffffff;
61-
--offblack: #08090a;
62-
--desatpurple: #1e1830;
63-
--textwhite: #ECEFF4;
64-
}
65-
66-
// P3 Colors (when supported)
67-
68-
@supports (color: color(display-p3 1 1 1 / 1)) {
69-
:root
70-
{
71-
--pink: color(display-p3 1.00 0.40 0.45 / 1);
72-
--purple: color(display-p3 0.44 0.29 1 / 1);
73-
--linkblue: color(display-p3 0.346 0.577 0.925/ 1);
74-
--white: color(display-p3 1 1 1 / 1);
75-
}
60+
--white: oklch(100% 0 0);
61+
--offblack: oklch(13.9% 0.003 246.26);
62+
--desatpurple: oklch(21.22% 0.0609 293.97);
63+
--textwhite: oklch(95.13% 0.007 260.73);
7664
}
7765

7866
// Styles you can apply individually with classes
@@ -137,7 +125,7 @@ $borderradius: 0.5rem;
137125
z-index: 0;
138126
width: 100%;
139127
min-height: inherit;
140-
background-image: linear-gradient(var(--desatpurple) 10%, rgba(0, 0, 0, 0.2) 50%, var(--offblack) 100%);
128+
background-image: linear-gradient(in oklch, var(--desatpurple) 10%, rgba(0, 0, 0, 0.2) 50%, var(--offblack) 100%);
141129
background-size: cover;
142130
}
143131

_sass/_news.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
z-index: 0;
66
width: 100%;
77
min-height: inherit;
8-
background: linear-gradient(var(--desatpurple) 10%, rgba(0, 0, 0, 0.2) 65%, var(--offblack));
8+
background: linear-gradient(in oklch, var(--desatpurple) 10%, rgba(0, 0, 0, 0.2) 65%, var(--offblack));
99
}
1010

1111
.newshero {
@@ -132,4 +132,4 @@
132132
p {
133133
color: var(--grey);
134134
}
135-
}
135+
}

_sass/_textpost.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
.textpost {
6464
min-height: 50rem;
6565
padding: 6rem 0 2rem;
66-
background: linear-gradient(var(--desatpurple) 3rem, var(--offblack) 60%);
66+
background: linear-gradient(in oklch, var(--desatpurple) 3rem, var(--offblack) 60%);
6767
color: var(--textwhite);
6868

6969
article {
@@ -190,4 +190,4 @@
190190
line-height: 175%;
191191
}
192192
}
193-
}
193+
}

img/index-feature-cards/dopesheet.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)