Last active
April 24, 2024 17:31
-
-
Save LeaVerou/7d15728036b6008f0fa7acf4a275adad to your computer and use it in GitHub Desktop.
none-containing values as intermediate stops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* none-containing values as intermediate stops | |
*/ | |
div:nth-of-type(1) { | |
background: linear-gradient(to right in oklch, oklch(80% 0.1 0), oklch(80% 0.1 170)); | |
} | |
div:nth-of-type(2) { | |
background: linear-gradient(to right in oklch, oklch(80% 0.1 0), oklch(50% none none), oklch(80% 0.1 170)); | |
} | |
div:nth-of-type(3) { | |
background: linear-gradient(to right in oklch, oklch(80% 0.1 0), oklch(50% 0.1 calc((0 + 170) / 2)), oklch(80% 0.1 170)); | |
} | |
/* Demo styling */ | |
div { | |
padding: 1em; | |
flex: 1; | |
} | |
body { | |
padding: 2em; | |
display: flex; | |
flex-flow: column; | |
gap: 1em; | |
height: 100vh; | |
} | |
* { | |
margin: 0; | |
box-sizing: border-box; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>Without none: | |
<div></div> | |
<p>With an intermediate <code>oklch(50% none none)</code> stop: | |
<div></div> | |
<p>Was this the expectation? | |
<div></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment