<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://preset-env.cssdb.org/">
	<title>PostCSS Preset Env - CSS Tools</title>
	<subtitle>PostCSS Preset Env lets you transform modern CSS so most browsers can understand, determining the polyfills you need based on the browsers you want.</subtitle>
	<link href="https://preset-env.cssdb.org/feed/feed.xml" rel="self"/>
	<link href="https://preset-env.cssdb.org/"/>
	<updated>2026-11-17T14:40:00Z</updated>
	<id>https://preset-env.cssdb.org/</id>
	<author>
		<name>Antonio Laguna and Romain Menke</name>
	</author>
		<entry>
			<title>PostCSS Mixins And PostCSS Custom Functions</title>
			<link href="https://preset-env.cssdb.org/blog/postcss-mixins-and-custom-functions/"/>
			<updated>2026-10-03T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/postcss-mixins-and-custom-functions/</id>
			<content xml:lang="en" type="html">&lt;p&gt;We are happy to announce the release of &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-mixins#readme&quot;&gt;&lt;code&gt;@csstools/postcss-mixins&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-custom-functions#readme&quot;&gt;&lt;code&gt;@csstools/postcss-custom-functions&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If you are using &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env#readme&quot;&gt;&lt;code&gt;postcss-preset-env&lt;/code&gt;&lt;/a&gt; you will already have this plugin when using the latest version. Otherwise now is a great time to upgrade 🎉&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;&lt;code&gt;@function&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Custom functions work at the value level and allow you to abstract complex bits of logic into a shared function.&lt;/p&gt;
&lt;p&gt;For example, in a columns system you sometimes still need to compute the size of a number of columns:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;--columns-size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--span &amp;lt;integer&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; --columns &amp;lt;integer&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; --container-size &amp;lt;length&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100px&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; --gutter-size &amp;lt;length&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--container-size&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--gutter-size&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--columns&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--columns&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--span&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--gutter-size&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--span&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;--columns-size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;5&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 12&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;100vw - 40px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 8px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Typed arguments and a typed return can&#39;t be fully transpiled by a build tool. But we think there is still enough here to make a PostCSS plugin.&lt;/p&gt;
&lt;p&gt;Try it out in &lt;a href=&quot;https://preset-env.cssdb.org/playground/#JTdCJTIyc291cmNlJTIyJTNBJTIyJTQwZnVuY3Rpb24lMjAtLWNvbHVtbnMtc2l6ZSgtLXNwYW4lMjAlM0NpbnRlZ2VyJTNFJTNBJTIwMSUyQyUyMC0tY29sdW1ucyUyMCUzQ2ludGVnZXIlM0UlM0ElMjAxJTJDJTIwLS1jb250YWluZXItc2l6ZSUyMCUzQ2xlbmd0aCUzRSUzQSUyMDEwMHB4JTJDJTIwLS1ndXR0ZXItc2l6ZSUyMCUzQ2xlbmd0aCUzRSUzQSUyMDBweCklMjAlN0IlNUNuJTVDdHJlc3VsdCUzQSUyMGNhbGMoKCh2YXIoLS1jb250YWluZXItc2l6ZSklMjAtJTIwKHZhcigtLWd1dHRlci1zaXplKSUyMColMjAodmFyKC0tY29sdW1ucyklMjAtJTIwMSkpKSUyMCUyRiUyMHZhcigtLWNvbHVtbnMpJTIwKiUyMHZhcigtLXNwYW4pKSUyMCUyQiUyMCh2YXIoLS1ndXR0ZXItc2l6ZSklMjAqJTIwKHZhcigtLXNwYW4pJTIwLSUyMDEpKSklM0IlNUNuJTdEJTVDbiU1Q24uZm9vJTIwJTdCJTVDbiU1Q3R3aWR0aCUzQSUyMC0tY29sdW1ucy1zaXplKDUlMkMlMjAxMiUyQyUyMGNhbGMoMTAwdnclMjAtJTIwNDBweCklMkMlMjA4cHgpJTNCJTVDbiU3RCUyMiUyQyUyMmNvbmZpZyUyMiUzQSU3QiUyMmJyb3dzZXJzJTIyJTNBJTVCJTIyJTNFJTIwMC4yJTI1JTIwYW5kJTIwbm90JTIwZGVhZCUyMiU1RCUyQyUyMm1pbmltdW1WZW5kb3JJbXBsZW1lbnRhdGlvbnMlMjIlM0EwJTJDJTIyc3RhZ2UlMjIlM0EyJTJDJTIyZW5hYmxlQ2xpZW50U2lkZVBvbHlmaWxscyUyMiUzQWZhbHNlJTJDJTIybG9naWNhbCUyMiUzQSU3QiUyMmlubGluZURpcmVjdGlvbiUyMiUzQSUyMmxlZnQtdG8tcmlnaHQlMjIlMkMlMjJibG9ja0RpcmVjdGlvbiUyMiUzQSUyMnRvcC10by1ib3R0b20lMjIlN0QlN0QlN0Q=&quot;&gt;the playground&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Another example is a gamut-mapped version of &lt;code&gt;oklch()&lt;/code&gt; with the ray tracing algorithm:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;--oklch-in-srgb-gamut&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l &amp;lt;number&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; --c &amp;lt;number&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; --h &amp;lt;number&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--angle&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--h&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * 1deg&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--ca&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--angle&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--sa&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--angle&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--oka&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--c&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--ca&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--okb&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--c&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--sa&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--lr0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.3963377773761749 * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--oka&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.2158037573099136 * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--okb&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--mr0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 0.1055613458156586 * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--oka&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 0.0638541728258133 * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--okb&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--sr0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 0.0894841775298119 * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--oka&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 1.2914855480194092 * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--okb&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--or&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;4.076741636 * &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--lr0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + -3.307711539 * &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--mr0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.2309699032 * &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--sr0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--og&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;-1.268437973 * &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--lr0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 2.609757349 * &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--mr0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + -0.341319376 * &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--sr0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--ob&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;-0.004196076139 * &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--lr0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + -0.7034186179 * &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--mr0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 1.707614694 * &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--sr0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--inr&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--or&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;1 - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--or&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 1&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--ing&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--og&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;1 - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--og&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 1&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--inb&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--ob&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;1 - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--ob&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 1&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--mask&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--inr&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--ing&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--inb&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--low&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0.000001 - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--high&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - 0.999999&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--anchor&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--origin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--c&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--h&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--p0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--origin&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; srgb-linear &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--k1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--p0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; c &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--h&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--p1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--k1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; srgb-linear &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--k2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--p1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; c &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--h&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--p2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--k2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; srgb-linear &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--k3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--p2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; c &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--h&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--p3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--k3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; srgb-linear &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;r - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;g - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;b - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--anchor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.000000000001&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--p3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;c * &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;1 - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--mask&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--c&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--mask&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;1 - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--high&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;1 - &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--low&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--h&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.example&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2px solid red&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0.99 0.99 0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.example-mapped&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2px solid red&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;--oklch-in-srgb-gamut&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0.99&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 0.99&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;See it &lt;a href=&quot;https://codepen.io/romainmenke/pen/WbpZLoR&quot;&gt;in action here&lt;/a&gt;, and with &lt;a href=&quot;https://preset-env.cssdb.org/playground/#JTdCJTIyc291cmNlJTIyJTNBJTIyJTQwZnVuY3Rpb24lMjAtLW9rbGNoLWluLXNyZ2ItZ2FtdXQoLS1sJTIwJTNDbnVtYmVyJTNFJTNBJTIwMCUyQyUyMC0tYyUyMCUzQ251bWJlciUzRSUzQSUyMDAlMkMlMjAtLWglMjAlM0NudW1iZXIlM0UlM0ElMjAwKSUyMCU3QiU1Q24lNUN0LS1hbmdsZSUzQSUyMGNhbGModmFyKC0taCklMjAqJTIwMWRlZyklM0IlNUNuJTVDdC0tY2ElM0ElMjBjb3ModmFyKC0tYW5nbGUpKSUzQiU1Q24lNUN0LS1zYSUzQSUyMHNpbih2YXIoLS1hbmdsZSkpJTNCJTVDbiU1Q3QtLW9rYSUzQSUyMGNhbGModmFyKC0tYyklMjAqJTIwdmFyKC0tY2EpKSUzQiU1Q24lNUN0LS1va2IlM0ElMjBjYWxjKHZhcigtLWMpJTIwKiUyMHZhcigtLXNhKSklM0IlNUNuJTVDdC0tbHIwJTNBJTIwY2FsYyh2YXIoLS1sKSUyMCUyQiUyMDAuMzk2MzM3Nzc3Mzc2MTc0OSUyMColMjB2YXIoLS1va2EpJTIwJTJCJTIwMC4yMTU4MDM3NTczMDk5MTM2JTIwKiUyMHZhcigtLW9rYikpJTNCJTVDbiU1Q3QtLW1yMCUzQSUyMGNhbGModmFyKC0tbCklMjAtJTIwMC4xMDU1NjEzNDU4MTU2NTg2JTIwKiUyMHZhcigtLW9rYSklMjAtJTIwMC4wNjM4NTQxNzI4MjU4MTMzJTIwKiUyMHZhcigtLW9rYikpJTNCJTVDbiU1Q3QtLXNyMCUzQSUyMGNhbGModmFyKC0tbCklMjAtJTIwMC4wODk0ODQxNzc1Mjk4MTE5JTIwKiUyMHZhcigtLW9rYSklMjAtJTIwMS4yOTE0ODU1NDgwMTk0MDkyJTIwKiUyMHZhcigtLW9rYikpJTNCJTVDbiU1Q3QtLW9yJTNBJTIwY2FsYyg0LjA3Njc0MTYzNiUyMColMjBwb3codmFyKC0tbHIwKSUyQzMpJTIwJTJCJTIwLTMuMzA3NzExNTM5JTIwKiUyMHBvdyh2YXIoLS1tcjApJTJDMyklMjAlMkIlMjAwLjIzMDk2OTkwMzIlMjAqJTIwcG93KHZhcigtLXNyMCklMkMzKSklM0IlNUNuJTVDdC0tb2clM0ElMjBjYWxjKC0xLjI2ODQzNzk3MyUyMColMjBwb3codmFyKC0tbHIwKSUyQzMpJTIwJTJCJTIwMi42MDk3NTczNDklMjAqJTIwcG93KHZhcigtLW1yMCklMkMzKSUyMCUyQiUyMC0wLjM0MTMxOTM3NiUyMColMjBwb3codmFyKC0tc3IwKSUyQzMpKSUzQiU1Q24lNUN0LS1vYiUzQSUyMGNhbGMoLTAuMDA0MTk2MDc2MTM5JTIwKiUyMHBvdyh2YXIoLS1scjApJTJDMyklMjAlMkIlMjAtMC43MDM0MTg2MTc5JTIwKiUyMHBvdyh2YXIoLS1tcjApJTJDMyklMjAlMkIlMjAxLjcwNzYxNDY5NCUyMColMjBwb3codmFyKC0tc3IwKSUyQzMpKSUzQiU1Q24lNUN0LS1pbnIlM0ElMjBjbGFtcCgwJTJDJTIwc2lnbih2YXIoLS1vcikpJTIwJTJCJTIwc2lnbigxJTIwLSUyMHZhcigtLW9yKSklMjAtJTIwMSUyQyUyMDEpJTNCJTVDbiU1Q3QtLWluZyUzQSUyMGNsYW1wKDAlMkMlMjBzaWduKHZhcigtLW9nKSklMjAlMkIlMjBzaWduKDElMjAtJTIwdmFyKC0tb2cpKSUyMC0lMjAxJTJDJTIwMSklM0IlNUNuJTVDdC0taW5iJTNBJTIwY2xhbXAoMCUyQyUyMHNpZ24odmFyKC0tb2IpKSUyMCUyQiUyMHNpZ24oMSUyMC0lMjB2YXIoLS1vYikpJTIwLSUyMDElMkMlMjAxKSUzQiU1Q24lNUN0LS1tYXNrJTNBJTIwY2FsYyh2YXIoLS1pbnIpJTIwKiUyMHZhcigtLWluZyklMjAqJTIwdmFyKC0taW5iKSklM0IlNUNuJTVDdC0tbG93JTNBJTIwY2xhbXAoMCUyQyUyMHNpZ24oMC4wMDAwMDElMjAtJTIwdmFyKC0tbCkpJTJDJTIwMSklM0IlNUNuJTVDdC0taGlnaCUzQSUyMGNsYW1wKDAlMkMlMjBzaWduKHZhcigtLWwpJTIwLSUyMDAuOTk5OTk5KSUyQyUyMDEpJTNCJTVDbiU1Q3QtLWFuY2hvciUzQSUyMHBvdyh2YXIoLS1sKSUyQzMpJTNCJTVDbiU1Q3QtLW9yaWdpbiUzQSUyMG9rbGNoKHZhcigtLWwpJTIwdmFyKC0tYyklMjB2YXIoLS1oKSklM0IlNUNuJTVDdC0tcDAlM0ElMjBjb2xvcihmcm9tJTIwdmFyKC0tb3JpZ2luKSUyMHNyZ2ItbGluZWFyJTIwY2FsYyh2YXIoLS1hbmNob3IpJTIwJTJCJTIwKHIlMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAqJTIwbWluKChtYXgoMCUyQyUyMHNpZ24ociUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAociUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpJTJDKG1heCgwJTJDJTIwc2lnbihnJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChnJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSklMkMobWF4KDAlMkMlMjBzaWduKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSkpJTIwY2FsYyh2YXIoLS1hbmNob3IpJTIwJTJCJTIwKGclMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAqJTIwbWluKChtYXgoMCUyQyUyMHNpZ24ociUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAociUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpJTJDKG1heCgwJTJDJTIwc2lnbihnJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChnJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSklMkMobWF4KDAlMkMlMjBzaWduKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSkpJTIwY2FsYyh2YXIoLS1hbmNob3IpJTIwJTJCJTIwKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAqJTIwbWluKChtYXgoMCUyQyUyMHNpZ24ociUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAociUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpJTJDKG1heCgwJTJDJTIwc2lnbihnJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChnJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSklMkMobWF4KDAlMkMlMjBzaWduKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSkpKSUzQiU1Q24lNUN0LS1rMSUzQSUyMG9rbGNoKGZyb20lMjB2YXIoLS1wMCklMjB2YXIoLS1sKSUyMGMlMjB2YXIoLS1oKSklM0IlNUNuJTVDdC0tcDElM0ElMjBjb2xvcihmcm9tJTIwdmFyKC0tazEpJTIwc3JnYi1saW5lYXIlMjBjYWxjKHZhcigtLWFuY2hvciklMjAlMkIlMjAociUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMColMjBtaW4oKG1heCgwJTJDJTIwc2lnbihyJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChyJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSklMkMobWF4KDAlMkMlMjBzaWduKGclMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKGclMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSUyQyhtYXgoMCUyQyUyMHNpZ24oYiUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAoYiUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpKSklMjBjYWxjKHZhcigtLWFuY2hvciklMjAlMkIlMjAoZyUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMColMjBtaW4oKG1heCgwJTJDJTIwc2lnbihyJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChyJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSklMkMobWF4KDAlMkMlMjBzaWduKGclMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKGclMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSUyQyhtYXgoMCUyQyUyMHNpZ24oYiUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAoYiUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpKSklMjBjYWxjKHZhcigtLWFuY2hvciklMjAlMkIlMjAoYiUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMColMjBtaW4oKG1heCgwJTJDJTIwc2lnbihyJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChyJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSklMkMobWF4KDAlMkMlMjBzaWduKGclMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKGclMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSUyQyhtYXgoMCUyQyUyMHNpZ24oYiUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAoYiUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpKSkpJTNCJTVDbiU1Q3QtLWsyJTNBJTIwb2tsY2goZnJvbSUyMHZhcigtLXAxKSUyMHZhcigtLWwpJTIwYyUyMHZhcigtLWgpKSUzQiU1Q24lNUN0LS1wMiUzQSUyMGNvbG9yKGZyb20lMjB2YXIoLS1rMiklMjBzcmdiLWxpbmVhciUyMGNhbGModmFyKC0tYW5jaG9yKSUyMCUyQiUyMChyJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwKiUyMG1pbigobWF4KDAlMkMlMjBzaWduKHIlMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKHIlMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSUyQyhtYXgoMCUyQyUyMHNpZ24oZyUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAoZyUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpJTJDKG1heCgwJTJDJTIwc2lnbihiJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChiJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSkpKSUyMGNhbGModmFyKC0tYW5jaG9yKSUyMCUyQiUyMChnJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwKiUyMG1pbigobWF4KDAlMkMlMjBzaWduKHIlMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKHIlMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSUyQyhtYXgoMCUyQyUyMHNpZ24oZyUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAoZyUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpJTJDKG1heCgwJTJDJTIwc2lnbihiJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChiJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSkpKSUyMGNhbGModmFyKC0tYW5jaG9yKSUyMCUyQiUyMChiJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwKiUyMG1pbigobWF4KDAlMkMlMjBzaWduKHIlMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKHIlMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSUyQyhtYXgoMCUyQyUyMHNpZ24oZyUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAoZyUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpJTJDKG1heCgwJTJDJTIwc2lnbihiJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChiJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSkpKSklM0IlNUNuJTVDdC0tazMlM0ElMjBva2xjaChmcm9tJTIwdmFyKC0tcDIpJTIwdmFyKC0tbCklMjBjJTIwdmFyKC0taCkpJTNCJTVDbiU1Q3QtLXAzJTNBJTIwY29sb3IoZnJvbSUyMHZhcigtLWszKSUyMHNyZ2ItbGluZWFyJTIwY2FsYyh2YXIoLS1hbmNob3IpJTIwJTJCJTIwKHIlMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAqJTIwbWluKChtYXgoMCUyQyUyMHNpZ24ociUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAociUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpJTJDKG1heCgwJTJDJTIwc2lnbihnJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChnJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSklMkMobWF4KDAlMkMlMjBzaWduKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSkpJTIwY2FsYyh2YXIoLS1hbmNob3IpJTIwJTJCJTIwKGclMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAqJTIwbWluKChtYXgoMCUyQyUyMHNpZ24ociUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAociUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpJTJDKG1heCgwJTJDJTIwc2lnbihnJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChnJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSklMkMobWF4KDAlMkMlMjBzaWduKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSkpJTIwY2FsYyh2YXIoLS1hbmNob3IpJTIwJTJCJTIwKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAqJTIwbWluKChtYXgoMCUyQyUyMHNpZ24ociUyMC0lMjB2YXIoLS1hbmNob3IpKSklMjAtJTIwdmFyKC0tYW5jaG9yKSklMjAlMkYlMjAociUyMC0lMjB2YXIoLS1hbmNob3IpJTIwJTJCJTIwMC4wMDAwMDAwMDAwMDEpJTJDKG1heCgwJTJDJTIwc2lnbihnJTIwLSUyMHZhcigtLWFuY2hvcikpKSUyMC0lMjB2YXIoLS1hbmNob3IpKSUyMCUyRiUyMChnJTIwLSUyMHZhcigtLWFuY2hvciklMjAlMkIlMjAwLjAwMDAwMDAwMDAwMSklMkMobWF4KDAlMkMlMjBzaWduKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSkpJTIwLSUyMHZhcigtLWFuY2hvcikpJTIwJTJGJTIwKGIlMjAtJTIwdmFyKC0tYW5jaG9yKSUyMCUyQiUyMDAuMDAwMDAwMDAwMDAxKSkpKSUzQiU1Q24lNUN0cmVzdWx0JTNBJTIwb2tsY2goZnJvbSUyMHZhcigtLXAzKSUyMGNsYW1wKDAlMkMlMjB2YXIoLS1sKSUyQyUyMDEpJTIwY2FsYygoYyUyMColMjAoMSUyMC0lMjB2YXIoLS1tYXNrKSklMjAlMkIlMjB2YXIoLS1jKSUyMColMjB2YXIoLS1tYXNrKSklMjAqJTIwKDElMjAtJTIwdmFyKC0taGlnaCkpJTIwKiUyMCgxJTIwLSUyMHZhcigtLWxvdykpKSUyMHZhcigtLWgpKSUzQiU1Q24lN0QlNUNuJTVDbi5leGFtcGxlJTIwJTdCJTVDbiUyMCUyMG91dGxpbmUlM0ElMjAycHglMjBzb2xpZCUyMHJlZCUzQiU1Q24lMjAlMjB3aWR0aCUzQSUyMDEwMHB4JTNCJTVDbiUyMCUyMGhlaWdodCUzQSUyMDEwMHB4JTNCJTVDbiU1Q3RiYWNrZ3JvdW5kLWNvbG9yJTNBJTIwb2tsY2goMC45OSUyMDAuOTklMjAwKSUzQiU1Q24lN0QlNUNuJTVDbi5leGFtcGxlLW1hcHBlZCUyMCU3QiU1Q24lMjAlMjBvdXRsaW5lJTNBJTIwMnB4JTIwc29saWQlMjByZWQlM0IlNUNuJTIwJTIwd2lkdGglM0ElMjAxMDBweCUzQiU1Q24lMjAlMjBoZWlnaHQlM0ElMjAxMDBweCUzQiU1Q24lNUN0YmFja2dyb3VuZC1jb2xvciUzQSUyMC0tb2tsY2gtaW4tc3JnYi1nYW11dCgwLjk5JTJDJTIwMC45OSUyQyUyMDApJTNCJTVDbiU3RCU1Q24lMjIlMkMlMjJjb25maWclMjIlM0ElN0IlMjJicm93c2VycyUyMiUzQSU1QiUyMiUzRSUyMDAuMiUyNSUyMGFuZCUyMG5vdCUyMGRlYWQlMjIlNUQlMkMlMjJtaW5pbXVtVmVuZG9ySW1wbGVtZW50YXRpb25zJTIyJTNBMCUyQyUyMnN0YWdlJTIyJTNBMiUyQyUyMmVuYWJsZUNsaWVudFNpZGVQb2x5ZmlsbHMlMjIlM0FmYWxzZSUyQyUyMmxvZ2ljYWwlMjIlM0ElN0IlMjJpbmxpbmVEaXJlY3Rpb24lMjIlM0ElMjJsZWZ0LXRvLXJpZ2h0JTIyJTJDJTIyYmxvY2tEaXJlY3Rpb24lMjIlM0ElMjJ0b3AtdG8tYm90dG9tJTIyJTdEJTdEJTdE&quot;&gt;the transpiled code in the playground&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;code&gt;@mixin&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Mixins make larger chunks of CSS reusable.&lt;br /&gt;
We like to use mixins for typography:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;card.html&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;card&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;card__title&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
		Hello!
	&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;typography.css&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@mixin&lt;/span&gt; --type-a&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; monospace&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2rem&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;font-weight&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 500&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;card.css&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.card&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 20px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; #ffd7f8&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.card__title&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; #410633&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

	&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@apply&lt;/span&gt; --type-a&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Try it out in &lt;a href=&quot;https://preset-env.cssdb.org/playground/#JTdCJTIyc291cmNlJTIyJTNBJTIyJTQwbWl4aW4lMjAtLXR5cGUtYSUyMCU3QiU1Q24lNUN0Zm9udC1mYW1pbHklM0ElMjBtb25vc3BhY2UlM0IlNUNuJTVDdGZvbnQtc2l6ZSUzQSUyMDJyZW0lM0IlNUNuJTVDdGZvbnQtd2VpZ2h0JTNBJTIwNTAwJTNCJTVDbiU3RCU1Q24lNUNuLmNhcmQlMjAlN0IlNUNuJTVDdHBhZGRpbmclM0ElMjAyMHB4JTNCJTVDbiU1Q3RiYWNrZ3JvdW5kLWNvbG9yJTNBJTIwJTIzZmZkN2Y4JTNCJTVDbiU3RCU1Q24lNUNuLmNhcmRfX3RpdGxlJTIwJTdCJTVDbiU1Q3Rjb2xvciUzQSUyMCUyMzQxMDYzMyUzQiU1Q24lNUNuJTVDdCU0MGFwcGx5JTIwLS10eXBlLWElM0IlNUNuJTdEJTIyJTJDJTIyY29uZmlnJTIyJTNBJTdCJTIyYnJvd3NlcnMlMjIlM0ElNUIlMjIlM0UlMjAwLjIlMjUlMjBhbmQlMjBub3QlMjBkZWFkJTIyJTVEJTJDJTIybWluaW11bVZlbmRvckltcGxlbWVudGF0aW9ucyUyMiUzQTAlMkMlMjJzdGFnZSUyMiUzQTIlMkMlMjJlbmFibGVDbGllbnRTaWRlUG9seWZpbGxzJTIyJTNBZmFsc2UlMkMlMjJsb2dpY2FsJTIyJTNBJTdCJTIyaW5saW5lRGlyZWN0aW9uJTIyJTNBJTIybGVmdC10by1yaWdodCUyMiUyQyUyMmJsb2NrRGlyZWN0aW9uJTIyJTNBJTIydG9wLXRvLWJvdHRvbSUyMiU3RCU3RCU3RA==&quot;&gt;the playground&lt;/a&gt;.&lt;/p&gt;
</content>
		</entry>
		<entry>
			<title>Relative Color Syntax : Channel Values</title>
			<link href="https://preset-env.cssdb.org/blog/relative-color-syntax-channel-values/"/>
			<updated>2024-03-04T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/relative-color-syntax-channel-values/</id>
			<content xml:lang="en" type="html">&lt;p&gt;With relative color syntax it can become confusing what the exact values are at each step and how they can be used in math expressions.
This little tool aims to show the channel values at each step of the process.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;label id=&quot;color-input-label-1&quot; for=&quot;color-input-1&quot; style=&quot;--color: oklch(0.31398 0.268 29.2339);&quot;&gt;Channel values for:&lt;/label&gt;&lt;/p&gt;
&lt;textarea id=&quot;color-input-1&quot; class=&quot;color-input&quot; rows=&quot;2&quot;&gt;oklch(from red calc(l / 2) 0.268 h)&lt;/textarea&gt;
&lt;div class=&quot;channel-group&quot;&gt;
	&lt;div class=&quot;channel-group__label&quot;&gt;&lt;/div&gt;
	&lt;output class=&quot;color-output-channel-name&quot; channel=&quot;1 name&quot; for=&quot;color-input-1&quot;&gt;l &lt;sup&gt;0,1&lt;/sup&gt;&lt;/output&gt;
	&lt;output class=&quot;color-output-channel-name&quot; channel=&quot;2 name&quot; for=&quot;color-input-1&quot;&gt;c &lt;sup&gt;0,0.4&lt;/sup&gt;&lt;/output&gt;
	&lt;output class=&quot;color-output-channel-name&quot; channel=&quot;3 name&quot; for=&quot;color-input-1&quot;&gt;h &lt;sup&gt;0,360&lt;/sup&gt;&lt;/output&gt;
	&lt;output class=&quot;color-output-channel-name&quot; channel=&quot;4 name&quot; for=&quot;color-input-1&quot;&gt;alpha&lt;/output&gt;
&lt;/div&gt;
&lt;div class=&quot;channel-group&quot;&gt;
	&lt;p class=&quot;channel-group__label&quot;&gt;&lt;i&gt;Origin color&lt;/i&gt;&lt;/p&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;1 input&quot; for=&quot;color-input-1&quot;&gt;0.628&lt;/output&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;2 input&quot; for=&quot;color-input-1&quot;&gt;0.258&lt;/output&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;3 input&quot; for=&quot;color-input-1&quot;&gt;29.234&lt;/output&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;4 input&quot; for=&quot;color-input-1&quot;&gt;1.000&lt;/output&gt;
&lt;/div&gt;
&lt;div class=&quot;channel-group&quot;&gt;
	&lt;p class=&quot;channel-group__label&quot;&gt;&lt;i&gt;Expressions&lt;/i&gt;&lt;/p&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;1 calc&quot; for=&quot;color-input-1&quot;&gt;calc(l / 2)&lt;/output&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;2 calc&quot; for=&quot;color-input-1&quot;&gt;0.268&lt;/output&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;3 calc&quot; for=&quot;color-input-1&quot;&gt;h&lt;/output&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;4 calc&quot; for=&quot;color-input-1&quot;&gt;1.000&lt;/output&gt;
&lt;/div&gt;
&lt;div class=&quot;channel-group&quot;&gt;
	&lt;p class=&quot;channel-group__label&quot;&gt;&lt;i&gt;Output color&lt;/i&gt;&lt;/p&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;1 output&quot; for=&quot;color-input-1&quot;&gt;0.314&lt;/output&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;2 output&quot; for=&quot;color-input-1&quot;&gt;0.268&lt;/output&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;3 output&quot; for=&quot;color-input-1&quot;&gt;29.234&lt;/output&gt;
	&lt;output class=&quot;color-output-channel&quot; channel=&quot;4 output&quot; for=&quot;color-input-1&quot;&gt;1.000&lt;/output&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;p&gt;The indicated ranges of values correspond to 0% and 100% for each channel.&lt;br /&gt;
They are not the minimum and maximum allowed values, you can use values beyond these ranges.&lt;/p&gt;
&lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://preset-env.cssdb.org/static/js/blog_relative_color_syntax_channel_values_2024_03_02.js?hash=ad34e66fb7&quot;&gt;&lt;/script&gt;
&lt;style&gt;
	.color-input, .color-output-channel {
		background-color: #263238;
		border-radius: 3px;
		border: 1px solid grey;
		color: white;
		display: block;
		font-size: 0.875em;
		line-height: 2;
		padding: 2px 8px;
		position: relative;
		text-align: left;
	}

	.color-input {
		margin: 1rem 0 2rem auto;
		width: calc(80% - 2px);
	}

	.channel-group {
		align-items: start;
		display: flex;
		gap: 1rem;
		justify-content: space-between;
		margin: 0 0 1rem;
		max-width: 100%;
	}

	.color-output-channel, .channel-group__label {
		flex-basis: 200px;
		flex-grow: 1;
		font-family: monospace;
		font-size: 0.875rem;
		max-width: 20%;
		text-align: right;
	}

	.channel-group__label {
		text-align: left;
		margin-top: 0.25rem;
	}

	.color-output-channel-name {
		border-bottom: 1px solid currentColor;
		flex-basis: 200px;
		flex-grow: 1;
		font-family: monospace;
		font-size: 1rem;
		max-width: 20%;
		text-align: center;
	}

	.color-output-channel-name sup {
		display: inline-block;
		padding-left: 0.75rem;
	}

	.color-output-channel-name sup::before {
		content: &quot;[&quot;;
		content: &quot;[&quot; / &quot;&quot;;
	}

	.color-output-channel-name sup::after {
		content: &quot;]&quot;;
		content: &quot;]&quot; / &quot;&quot;;
	}

	#color-input-label-1 {
		position: relative;
		margin-left: calc(20% + 2px);
	}

	#color-input-label-1::after {
		background-color: var(--color);
		border-radius: 50%;
		content: &quot;&quot;;
		display: inline-block;
		height: calc(0.875em * 2);
		position: absolute;
		right: calc(-1 * ((0.875em * 2) + 1rem));
		top: -5px;
		width: calc(0.875em * 2);
	}
&lt;/style&gt;
</content>
		</entry>
		<entry>
			<title>PostCSS Bundler</title>
			<link href="https://preset-env.cssdb.org/blog/postcss-bundler/"/>
			<updated>2023-09-15T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/postcss-bundler/</id>
			<content xml:lang="en" type="html">&lt;p&gt;&lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler&quot;&gt;PostCSS Bundler&lt;/a&gt; is a standards compliant reference CSS bundler.&lt;/p&gt;
&lt;p&gt;It is built around &lt;code&gt;@import&lt;/code&gt; statements, similarly to how &lt;a href=&quot;https://esbuild.github.io/&quot;&gt;esbuild&lt;/a&gt;, &lt;a href=&quot;https://www.npmjs.com/package/postcss-import&quot;&gt;postcss-import&lt;/a&gt; or &lt;a href=&quot;https://lightningcss.dev/&quot;&gt;lightningcss&lt;/a&gt; bundle CSS.&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;token url&quot;&gt;&lt;span class=&quot;token function&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string url&quot;&gt;&#39;variables.css&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;token url&quot;&gt;&lt;span class=&quot;token function&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string url&quot;&gt;&#39;typography.css&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;token url&quot;&gt;&lt;span class=&quot;token function&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string url&quot;&gt;&#39;components/not-a-card.css&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Why this matters now&lt;/h2&gt;
&lt;p&gt;Previously bundling CSS based on &lt;code&gt;@import&lt;/code&gt; was relatively simple.&lt;/p&gt;
&lt;p&gt;There were always a few features (&lt;code&gt;@namespace&lt;/code&gt;, &lt;code&gt;@charset&lt;/code&gt;, ...) that weren&#39;t or couldn&#39;t be implemented correctly in bundlers but these also happened to be obscure and rarely used features.&lt;/p&gt;
&lt;p&gt;CSS Bundlers had the luxury of getting by with naive implementations.&lt;br /&gt;
Even with duplicate and cyclical imports it was largely invisible if a bundler incorrectly only included the first or the last import.&lt;/p&gt;
&lt;p&gt;Today however this is no longer true.&lt;/p&gt;
&lt;p&gt;We now have cascade layers, support conditions, and soon even scoping in &lt;code&gt;@import&lt;/code&gt; statements.&lt;br /&gt;
With the addition of these features, the source order is more important than ever and bundlers need to be updated so that you can use all of the features in CSS.&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;token url&quot;&gt;&lt;span class=&quot;token function&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string url&quot;&gt;&#39;all-the-styles.css&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;token function&quot;&gt;layer&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;base&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;token function&quot;&gt;supports&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token selector-function-argument selector&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;prefers-color-scheme&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; dark&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;code&gt;css-import-tests&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;We created an &lt;a href=&quot;https://github.com/romainmenke/css-import-tests&quot;&gt;extensive test suite&lt;/a&gt; for the behavior of &lt;code&gt;@import&lt;/code&gt; in browsers and how these can be mimicked by bundlers. It is not limited to testing what bundlers can do, it also tests some things that can not be implemented by bundlers.&lt;/p&gt;
&lt;p&gt;The goal of this test suite is not to score different bundlers against each other, but to &lt;strong&gt;promote interop.&lt;/strong&gt;&lt;br /&gt;
We reached out to the maintainers of &lt;a href=&quot;https://esbuild.github.io/&quot;&gt;esbuild&lt;/a&gt; and &lt;a href=&quot;https://lightningcss.dev/&quot;&gt;lightningcss&lt;/a&gt; so that they are aware of this effort and so that we can coordinate our efforts.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If there are other CSS bundlers that we haven&#39;t thought of, please let us know in a &lt;a href=&quot;https://github.com/csstools/postcss-plugins/issues&quot;&gt;GitHub issue&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In particular, we want to thank Evan from &lt;a href=&quot;https://esbuild.github.io/&quot;&gt;esbuild&lt;/a&gt; as they immediately jumped on this and also contributed back to the test suite. In a very short time they fixed a large number of small discrepancies in &lt;a href=&quot;https://esbuild.github.io/&quot;&gt;esbuild&lt;/a&gt;. They also provided insights and very neat tricks that made sub-features possible that we had already given up on.&lt;/p&gt;
&lt;p&gt;By sharing &lt;a href=&quot;https://github.com/romainmenke/css-import-tests&quot;&gt;&lt;code&gt;css-import-tests&lt;/code&gt;&lt;/a&gt; and working together with other tool creators we take away part of the workload of each maintainer.&lt;/p&gt;
&lt;h2&gt;&lt;code&gt;@csstools/postcss-bundler&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;a.k.a &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler&quot;&gt;PostCSS Bundler&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is our reference implementation of a bundler that passes as many tests from &lt;a href=&quot;https://github.com/romainmenke/css-import-tests&quot;&gt;&lt;code&gt;css-import-tests&lt;/code&gt;&lt;/a&gt; as possible.&lt;/p&gt;
&lt;p&gt;Our vision and goal for this package is that you should be able to turn it on or off and that your CSS should just work either way.&lt;/p&gt;
&lt;p&gt;To see more examples you can visit the &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler#readme&quot;&gt;general docs&lt;/a&gt; or you can experiment with the &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/postcss-recipes/minimal-setup&quot;&gt;minimal PostCSS setup recipe&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Url rewriting/rebasing&lt;/h3&gt;
&lt;p&gt;A feature currently unique to &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler&quot;&gt;PostCSS Bundler&lt;/a&gt; is that it also rebases url values.
You just write correct file paths in &lt;code&gt;url()&lt;/code&gt; functions and &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler&quot;&gt;PostCSS Bundler&lt;/a&gt; will update relative paths so that they still work from the bundled file.&lt;br /&gt;
This gives a better dev experience because your file links will actually work in your code editor.&lt;/p&gt;
&lt;h3&gt;imports of node modules&lt;/h3&gt;
&lt;p&gt;Importing npm packages is not a standard feature and we decided not to add magic for it.&lt;br /&gt;
Instead, we added an explicit and expressive API to reference packages found in &lt;code&gt;node_modules&lt;/code&gt; directories.&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@import&lt;/span&gt; &lt;span class=&quot;token url&quot;&gt;&lt;span class=&quot;token function&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string url&quot;&gt;&quot;node_modules:open-props/red&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By adding the &lt;code&gt;node_modules:&lt;/code&gt; url scheme you make it clear to &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler&quot;&gt;PostCSS Bundler&lt;/a&gt; that it should use the module resolution algorithms to find your CSS. This also supports conditional exports.&lt;/p&gt;
&lt;p&gt;We decided against the &lt;code&gt;npm:&lt;/code&gt; url scheme because this is already used in Deno.&lt;br /&gt;
In Deno, it also implies an automatic download which is not something we can or want to implement.&lt;br /&gt;
You still need to use your regular JavaScript tooling to download and manage npm packages even when they contain CSS files.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;node_modules:&lt;/code&gt; is a bit longer but it is absolutely clear in its meaning and purpose.&lt;/p&gt;
&lt;h3&gt;Going toolless&lt;/h3&gt;
&lt;p&gt;Ultimately we hope that &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler&quot;&gt;PostCSS Bundler&lt;/a&gt; is frictionless and that it gives you the option to go toolless.&lt;br /&gt;
You might still want to bundle for production to prevent a waterfall during load, but a bundler shouldn&#39;t be required during development.&lt;/p&gt;
&lt;h2&gt;Stylelint plugin&lt;/h2&gt;
&lt;p&gt;Not every valid &lt;code&gt;@import&lt;/code&gt; statement can be correctly processed by CSS bundlers.&lt;br /&gt;
Some aspects only make sense when interpreted by a real browser, not a build tool.&lt;/p&gt;
&lt;p&gt;To warn you about these cases we created a &lt;a href=&quot;https://stylelint.io/&quot;&gt;Stylelint&lt;/a&gt; plugin, &lt;a href=&quot;https://github.com/csstools/postcss-plugins/blob/main/plugins-stylelint/no-invalid-at-import-rules-when-bundling#readme&quot;&gt;&lt;code&gt;@csstools/stylelint-no-invalid-at-import-rules-when-bundling&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This &lt;a href=&quot;https://stylelint.io/&quot;&gt;Stylelint&lt;/a&gt; plugin can be used with any standards compliant CSS bundler as they will all have the same edge cases.&lt;/p&gt;
&lt;h2&gt;&lt;code&gt;postcss-import&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler&quot;&gt;PostCSS Bundler&lt;/a&gt; is partly based on &lt;a href=&quot;https://www.npmjs.com/package/postcss-import&quot;&gt;postcss-import&lt;/a&gt; and we have contributed many fixes to it during this process. We will continue to improve this plugin as it is a widely used bundler for PostCSS.&lt;/p&gt;
&lt;p&gt;There were however a few breaking changes we wanted to make and a new plugin makes this simpler and easier.&lt;/p&gt;
&lt;p&gt;The largest difference is that we want the default config to be standards compliant so that your config is simpler and smaller.&lt;/p&gt;
&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; postcss &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;postcss&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; postcssBundler &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;@csstools/postcss-bundler&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token function&quot;&gt;postcss&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
	&lt;span class=&quot;token comment&quot;&gt;/* this just works, no other config is needed */&lt;/span&gt;
	&lt;span class=&quot;token function&quot;&gt;postcssBundler&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;process&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token constant&quot;&gt;YOUR_CSS&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;/*, processOptions */&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Comparison with any other tool&lt;/h2&gt;
&lt;p&gt;Given the current state of &amp;quot;tech Twitter&amp;quot;, we feel the need to call out specifically that none of this effort is competitive.&lt;br /&gt;
We do not care about download numbers and we are not &amp;quot;disrupting&amp;quot; anything.&lt;/p&gt;
&lt;p&gt;Our only intention is to make all tools better for all CSS authors.&lt;br /&gt;
That is why we did not only create a new bundler but also created the means for all other bundlers to improve.&lt;br /&gt;
We care deeply about diversity in tooling and interop between those tools.&lt;/p&gt;
</content>
		</entry>
		<entry>
			<title>License change to MIT-0</title>
			<link href="https://preset-env.cssdb.org/blog/license-change/"/>
			<updated>2023-06-22T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/license-change/</id>
			<content xml:lang="en" type="html">&lt;p&gt;The &lt;code&gt;CC0-1.0&lt;/code&gt; license has been an issue for some users.&lt;br /&gt;
To resolve issues with &lt;code&gt;CC0-1.0&lt;/code&gt; we intend to change the license of &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env#readme&quot;&gt;&lt;code&gt;postcss-preset-env&lt;/code&gt;&lt;/a&gt; and related plugins to &lt;code&gt;MIT-0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;There is no internal motivation for this change and we do not benefit either way.&lt;br /&gt;
Our only goal with this change is to facilitate the use of &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env#readme&quot;&gt;&lt;code&gt;postcss-preset-env&lt;/code&gt;&lt;/a&gt; and related plugins.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/csstools/postcss-plugins/issues/new/choose&quot;&gt;Please let us know if this change has the opposite effect for you.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;At this time and from our perspective it seem as if this change will harm no one and will benefit some.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/csstools/postcss-plugins/issues/new/choose&quot;&gt;Please let us know if you have any concerns about this.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can read more about the thought process : &lt;a href=&quot;https://github.com/csstools/postcss-plugins/issues/965&quot;&gt;https://github.com/csstools/postcss-plugins/issues/965&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;What is MIT-0?&lt;/h2&gt;
&lt;p&gt;MIT-0 is a license that is functionally equivalent to the MIT License,
but without the requirement for licensees to include the license text itself in their products.&lt;/p&gt;
&lt;h2&gt;What is CC0-1.0?&lt;/h2&gt;
&lt;p&gt;CC0-1.0 is a public domain dedication.
Some legal systems do not recognize the concept of dedicating works to the public domain.&lt;/p&gt;
&lt;h2&gt;How will this change roll out?&lt;/h2&gt;
&lt;p&gt;We will create a new major version for each plugin that will include the license change.&lt;br /&gt;
We will hold off on feature work for a few weeks after this change.&lt;/p&gt;
&lt;p&gt;If any reports are made that this change has an unforeseen negative impact on the community, we will revert the change and publish another major version with the original license.&lt;/p&gt;
</content>
		</entry>
		<entry>
			<title>PostCSS Relative Color Syntax</title>
			<link href="https://preset-env.cssdb.org/blog/postcss-relative-color-syntax/"/>
			<updated>2023-05-22T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/postcss-relative-color-syntax/</id>
			<content xml:lang="en" type="html">&lt;p&gt;We are happy to announce the release of &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-relative-color-syntax#readme&quot;&gt;&lt;code&gt;@csstools/postcss-relative-color-syntax&lt;/code&gt;&lt;/a&gt;, a PostCSS plugin to use &lt;a href=&quot;https://drafts.csswg.org/css-color-5/#relative-colors&quot;&gt;&lt;code&gt;relative color syntax&lt;/code&gt;&lt;/a&gt; in any browser.&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.example&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklab&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
		from &lt;span class=&quot;token function&quot;&gt;oklab&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;54.3% -22.5% -5%&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
		&lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;1.0 - l&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
		&lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;a * 0.8&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
		b
	&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This plugin uses &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser#readme&quot;&gt;&lt;code&gt;@csstools/css-color-parser&lt;/code&gt;&lt;/a&gt; under the hood to parse the color values, checkout &lt;a href=&quot;https://preset-env.cssdb.org/blog/css-color-parser-v1.0.0/&quot;&gt;the blog post&lt;/a&gt; for all the technical details.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If you are using &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env#readme&quot;&gt;&lt;code&gt;postcss-preset-env&lt;/code&gt;&lt;/a&gt; you will already have this plugin when using the latest version.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Color palette demo&lt;/h2&gt;
&lt;p&gt;Relative color syntax is especially useful for creating color palettes.&lt;/p&gt;
&lt;p&gt;Use these controls to alter the center color swatch.&lt;br /&gt;
All surrounding colors are generated from that single color.&lt;/p&gt;
&lt;div class=&quot;relative-color-syntax-demo&quot;&gt;
	&lt;div class=&quot;relative-color-syntax-demo-controls&quot;&gt;
		&lt;label for=&quot;relative-color-syntax-main-hue&quot;&gt;Hue&lt;/label&gt;
		&lt;input name=&quot;relative-color-syntax-main-hue&quot; id=&quot;relative-color-syntax-main-hue&quot; type=&quot;range&quot; min=&quot;0&quot; max=&quot;360&quot; value=&quot;215&quot; /&gt;
&lt;p&gt;&lt;label for=&quot;relative-color-syntax-chroma-factor&quot;&gt;Chroma&lt;/label&gt;
&lt;input name=&quot;relative-color-syntax-chroma-factor&quot; id=&quot;relative-color-syntax-chroma-factor&quot; type=&quot;range&quot; min=&quot;0&quot; max=&quot;10&quot; value=&quot;5.4&quot; step=&quot;0.1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;label for=&quot;relative-color-syntax-hue-separation&quot;&gt;Distance to secondary colors&lt;/label&gt;
&lt;input name=&quot;relative-color-syntax-hue-separation&quot; id=&quot;relative-color-syntax-hue-separation&quot; type=&quot;range&quot; min=&quot;0&quot; max=&quot;180&quot; value=&quot;20&quot; /&gt;
&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;relative-color-syntax-palettes&quot;&gt;
&lt;div class=&quot;relative-color-syntax-palette&quot;&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-palette&quot;&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-palette&quot;&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;div class=&quot;relative-color-syntax-swatch&quot;&gt;◉&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;h3&gt;How the demo works :&lt;/h3&gt;
&lt;h4&gt;&lt;code&gt;sin&lt;/code&gt; curves&lt;/h4&gt;
&lt;p&gt;All the colors are generated from a single color by using &lt;code&gt;sin&lt;/code&gt;.&lt;br /&gt;
&lt;code&gt;sin&lt;/code&gt; curves go &lt;a href=&quot;https://www.wolframalpha.com/input?i=sin%28x%29&quot;&gt;up and down and up and down again&lt;/a&gt;.&lt;br /&gt;
They are not as nice as bell curves, or tailored cubic Bézier curves, but &lt;code&gt;sin&lt;/code&gt; is simple to work with in CSS.&lt;/p&gt;
&lt;p&gt;This effect can be used to smooth value progression or to create &amp;quot;toggles&amp;quot;.&lt;/p&gt;
&lt;h4&gt;controlling &lt;code&gt;chroma&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;We do not want to have a high chrome when nearing black or white as that would lead to excessive clamping in browsers without support for gamut mapping.
Using &lt;code&gt;sin&lt;/code&gt; to control the chroma, we can have a lower chroma when nearing black or white.&lt;/p&gt;
&lt;h4&gt;keeping contrast high&lt;/h4&gt;
&lt;p&gt;For the text color we actually want to use &lt;a href=&quot;https://drafts.csswg.org/css-color-6/#colorcontrast&quot;&gt;&lt;code&gt;contrast-color()&lt;/code&gt;&lt;/a&gt; but the specification isn&#39;t final yet.
So we use something simpler that will work often enough.&lt;/p&gt;
&lt;p&gt;When the color has a lightness over &lt;code&gt;0.5&lt;/code&gt; we toggle to black, when it is under &lt;code&gt;0.5&lt;/code&gt; we toggle to white.
We clamp the result a bit as pure white and black might be too harsh.&lt;/p&gt;
&lt;p&gt;All these values are able to be controlled with relative color syntax.
Without this new CSS feature it would not be possible to easily create derivative colors.&lt;/p&gt;
&lt;h4&gt;secondary colors&lt;/h4&gt;
&lt;p&gt;The secondary colors are generated by adding and subtracting a number of degrees from the primary hue.
Depending on the angle this gives a harmonic or more eclectic palette.&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.swatch&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token comment&quot;&gt;/* NOTE :
		postcss-preset-env and other plugins 
		can not generate fallback values when `var()` is used.

		But using custom properties in this example
		makes it clear which values change and which are static.
	*/&lt;/span&gt;

	&lt;span class=&quot;token comment&quot;&gt;/* Your starting color: */&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--palette-start-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; hotpink&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token comment&quot;&gt;/* The lightness of this swatch */&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--lightness&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 50%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token comment&quot;&gt;/* Chroma factor is inverted, higher number is less chroma */&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;--chroma-factor&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 10&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

	&lt;span class=&quot;token property&quot;&gt;--background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
		&lt;span class=&quot;token comment&quot;&gt;/* every swatch has the same start color */&lt;/span&gt;
		from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--palette-start-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
		&lt;span class=&quot;token comment&quot;&gt;/* the lightness is the variable */&lt;/span&gt;
		&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--lightness&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
		&lt;span class=&quot;token comment&quot;&gt;/* 
			the chroma is a function of the lightness,
			using a smooth curve that is lower when approaching white and black
		*/&lt;/span&gt;
		&lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;l * 2 * PI&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;-1 * &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;PI / 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; / &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--chroma-factor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
		&lt;span class=&quot;token comment&quot;&gt;/* hue is taken from the palette start color */&lt;/span&gt;
		h
	&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklab&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
		&lt;span class=&quot;token comment&quot;&gt;/* foreground color starts from the background color */&lt;/span&gt;
		from &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--background-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
		&lt;span class=&quot;token comment&quot;&gt;/*
			lightness is a function of the background color lightness:
			- any value over 0.5 will be clamped to 0.9
			- any value under 0.5 will be clamped to 0.2

			Clamp is used because sub pixel rendering with overly bright colors seems to be bugged.
		*/&lt;/span&gt;
		&lt;span class=&quot;token function&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0.2&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;l * PI&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;PI / 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; + 0.1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; * 9999&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 0.9&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
		0
		0
	&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--background-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://preset-env.cssdb.org/static/js/blog_relative_color_syntax_2023_05_22.js?hash=f935912abe&quot;&gt;&lt;/script&gt;
&lt;style&gt;
	.relative-color-syntax-demo-controls {
		max-width: 300px;
	}

	.relative-color-syntax-demo-controls label {
		color: #666;
		font-size: 14px;
		font-weight: bold;
		text-transform: uppercase;
		letter-spacing: 0.025em;
	}

	.relative-color-syntax-demo-controls input[type=range] {
		-webkit-appearance: none;
		width: 100%;
		height: 10px;
		border-radius: 5px;
		background-color: #ddd;
		margin-inline: 0;
		outline: none;
	}
	
	.relative-color-syntax-demo-controls input[type=range]::-webkit-slider-thumb {
		-webkit-appearance: none;
		appearance: none;
		width: 20px;
		height: 20px;
		border-radius: 50%;
		background-color: var(--color-brand);
		cursor: pointer;
	}

	.relative-color-syntax-demo {
		max-width: 100vw;
	}

	@media (min-width: 900px) {
		.relative-color-syntax-demo {
			max-width: 900px;
		}
	}

	.relative-color-syntax-palettes {
		display: flex;
		flex-direction: row;
		width: 100%;
	}

	@media (min-aspect-ratio: 1 / 1) {
		.relative-color-syntax-palettes {
			flex-direction: column;
		}
	}

	.relative-color-syntax-palette {
		display: flex;
		flex-direction: column-reverse;
	}

	@media (min-aspect-ratio: 1 / 1) {
		.relative-color-syntax-palette {
			flex-direction: row-reverse;
		}
	}

	.relative-color-syntax-swatch {
		width: 90px;
		height: 56px;
		padding: 2px 5px;
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(1) {
		background-color: var(--color-a-l-10-background);
		color: var(--color-a-l-10-foreground);
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(2) {
		background-color: var(--color-a-l-20-background);
		color: var(--color-a-l-20-foreground);
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(3) {
		background-color: var(--color-a-l-30-background);
		color: var(--color-a-l-30-foreground);
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(4) {
		background-color: var(--color-a-l-40-background);
		color: var(--color-a-l-40-foreground);
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(5) {
		background-color: var(--color-a-l-50-background);
		color: var(--color-a-l-50-foreground);
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(6) {
		background-color: var(--color-a-l-60-background);
		color: var(--color-a-l-60-foreground);
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(7) {
		background-color: var(--color-a-l-70-background);
		color: var(--color-a-l-70-foreground);
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(8) {
		background-color: var(--color-a-l-80-background);
		color: var(--color-a-l-80-foreground);
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(9) {
		background-color: var(--color-a-l-90-background);
		color: var(--color-a-l-90-foreground);
	}

	.relative-color-syntax-palette:nth-child(1) .relative-color-syntax-swatch:nth-child(10) {
		background-color: var(--color-a-l-95-background);
		color: var(--color-a-l-95-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(1) {
		background-color: var(--color-b-l-10-background);
		color: var(--color-b-l-10-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(2) {
		background-color: var(--color-b-l-20-background);
		color: var(--color-b-l-20-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(3) {
		background-color: var(--color-b-l-30-background);
		color: var(--color-b-l-30-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(4) {
		background-color: var(--color-b-l-40-background);
		color: var(--color-b-l-40-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(5) {
		background-color: var(--color-b-l-50-background);
		color: var(--color-b-l-50-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(6) {
		background-color: var(--color-b-l-60-background);
		color: var(--color-b-l-60-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(7) {
		background-color: var(--color-b-l-70-background);
		color: var(--color-b-l-70-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(8) {
		background-color: var(--color-b-l-80-background);
		color: var(--color-b-l-80-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(9) {
		background-color: var(--color-b-l-90-background);
		color: var(--color-b-l-90-foreground);
	}

	.relative-color-syntax-palette:nth-child(2) .relative-color-syntax-swatch:nth-child(10) {
		background-color: var(--color-b-l-95-background);
		color: var(--color-b-l-95-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(1) {
		background-color: var(--color-c-l-10-background);
		color: var(--color-c-l-10-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(2) {
		background-color: var(--color-c-l-20-background);
		color: var(--color-c-l-20-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(3) {
		background-color: var(--color-c-l-30-background);
		color: var(--color-c-l-30-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(4) {
		background-color: var(--color-c-l-40-background);
		color: var(--color-c-l-40-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(5) {
		background-color: var(--color-c-l-50-background);
		color: var(--color-c-l-50-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(6) {
		background-color: var(--color-c-l-60-background);
		color: var(--color-c-l-60-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(7) {
		background-color: var(--color-c-l-70-background);
		color: var(--color-c-l-70-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(8) {
		background-color: var(--color-c-l-80-background);
		color: var(--color-c-l-80-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(9) {
		background-color: var(--color-c-l-90-background);
		color: var(--color-c-l-90-foreground);
	}

	.relative-color-syntax-palette:nth-child(3) .relative-color-syntax-swatch:nth-child(10) {
		background-color: var(--color-c-l-95-background);
		color: var(--color-c-l-95-foreground);
	}
&lt;/style&gt;
&lt;style id=&quot;palette-styles&quot;&gt;
&lt;/style&gt;
</content>
		</entry>
		<entry>
			<title>PostCSS Color Mix Function</title>
			<link href="https://preset-env.cssdb.org/blog/postcss-color-mix-function/"/>
			<updated>2023-04-03T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/postcss-color-mix-function/</id>
			<content xml:lang="en" type="html">&lt;p&gt;We are happy to announce the release of &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-mix-function#readme&quot;&gt;&lt;code&gt;@csstools/postcss-color-mix-function&lt;/code&gt;&lt;/a&gt;, a PostCSS plugin to use the &lt;a href=&quot;https://drafts.csswg.org/css-color-5/#color-mix&quot;&gt;&lt;code&gt;color-mix()&lt;/code&gt;&lt;/a&gt; function in any browser.&lt;/p&gt;
&lt;p&gt;This plugin uses &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser#readme&quot;&gt;&lt;code&gt;@csstools/css-color-parser&lt;/code&gt;&lt;/a&gt; under the hood to parse the color values, checkout &lt;a href=&quot;https://preset-env.cssdb.org/blog/css-color-parser-v1.0.0/&quot;&gt;the blog post&lt;/a&gt; for all the technical details.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If you are using &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env#readme&quot;&gt;&lt;code&gt;postcss-preset-env&lt;/code&gt;&lt;/a&gt; you will already have this plugin when using the latest version.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Try it out in this interactive demo that showcases with a Venn diagram how colors are mixing together:&lt;/p&gt;
&lt;div class=&quot;color-mix-wrapper&quot;&gt;
	&lt;div class=&quot;color-mix-settings&quot;&gt;
		&lt;div class=&quot;color-mix-settings__selects&quot;&gt;
			&lt;div class=&quot;color-mix-settings__select&quot;&gt;
				&lt;label for=&quot;color-space&quot;&gt;Color Space&lt;/label&gt;
				&lt;select id=&quot;color-space&quot;&gt;
					&lt;option value=&quot;srgb&quot; selected=&quot;&quot;&gt;srgb&lt;/option&gt;
					&lt;option value=&quot;srgb-linear&quot;&gt;srgb-linear&lt;/option&gt;
					&lt;option value=&quot;lab&quot;&gt;lab&lt;/option&gt;
					&lt;option value=&quot;oklab&quot;&gt;oklab&lt;/option&gt;
					&lt;option value=&quot;xyz&quot;&gt;xyz&lt;/option&gt;
					&lt;option value=&quot;xyz-d50&quot;&gt;xyz-d50&lt;/option&gt;
					&lt;option value=&quot;xyz-d65&quot;&gt;xyz-d65&lt;/option&gt;
					&lt;option value=&quot;hsl&quot;&gt;hsl&lt;/option&gt;
					&lt;option value=&quot;hwb&quot;&gt;hwb&lt;/option&gt;
					&lt;option value=&quot;lch&quot;&gt;lch&lt;/option&gt;
					&lt;option value=&quot;oklch&quot;&gt;oklch&lt;/option&gt;
				&lt;/select&gt;
			&lt;/div&gt;
			&lt;div class=&quot;color-mix-settings__select&quot;&gt;
				&lt;label for=&quot;interpolation-method&quot; hidden=&quot;&quot;&gt;Interpolation Method&lt;/label&gt;
				&lt;select id=&quot;interpolation-method&quot; hidden=&quot;&quot;&gt;
					&lt;option value=&quot;shorter&quot; selected=&quot;&quot;&gt;shorter&lt;/option&gt;
					&lt;option value=&quot;longer&quot;&gt;longer&lt;/option&gt;
					&lt;option value=&quot;increasing&quot;&gt;increasing&lt;/option&gt;
					&lt;option value=&quot;decreasing&quot;&gt;decreasing&lt;/option&gt;
				&lt;/select&gt;
			&lt;/div&gt;
		&lt;/div&gt;
		&lt;div class=&quot;color-mix-settings__percent&quot;&gt;
			&lt;label for=&quot;color-mix-percentage&quot;&gt;Mix %&lt;/label&gt;
			&lt;input type=&quot;range&quot; id=&quot;color-mix-percentage&quot; value=&quot;50&quot; min=&quot;0&quot; max=&quot;100&quot; /&gt;
		&lt;/div&gt;
		&lt;div class=&quot;color-mix-settings__colors&quot;&gt;
			&lt;div class=&quot;color-mix-settings__color&quot;&gt;
				&lt;label for=&quot;color-a&quot;&gt;Left Color&lt;/label&gt;
				&lt;input type=&quot;color&quot; id=&quot;color-a&quot; value=&quot;#ff0000&quot; /&gt;
			&lt;/div&gt;
			&lt;div class=&quot;color-mix-settings__color&quot;&gt;
				&lt;label for=&quot;color-b&quot;&gt;Right Color&lt;/label&gt;
				&lt;input type=&quot;color&quot; id=&quot;color-b&quot; value=&quot;#0000ff&quot; /&gt;
			&lt;/div&gt;
		&lt;/div&gt;	
	&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;color-mix-results&quot;&gt;
	&lt;output id=&quot;output-color-a&quot; for=&quot;color-a&quot;&gt;&lt;/output&gt;
	&lt;output id=&quot;output-color-b&quot; for=&quot;color-b&quot;&gt;&lt;/output&gt;
	&lt;output id=&quot;output-color-mix&quot; for=&quot;color-b&quot;&gt;&lt;/output&gt;
&lt;/div&gt;
&lt;p&gt;&lt;output id=&quot;output-color-mix-css&quot; for=&quot;color-space interpolation-method color-mix-percentage color-a color-b&quot;&gt;color-mix(in srgb, #ff0000, #0000ff 50%)&lt;/output&gt;
&lt;output id=&quot;output-color-hex&quot; for=&quot;color-space interpolation-method color-mix-percentage color-a color-b&quot;&gt;#800080&lt;/output&gt;&lt;/p&gt;
&lt;p&gt;Definitely check out the &lt;a href=&quot;https://una.im/color-mix-opacity/&quot;&gt;awesome blog post by Una on color-mix&lt;/a&gt;. It showcases a similar widget but purely using native &lt;code&gt;color-mix()&lt;/code&gt;, so it&#39;s a great way to compare the two.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;After &lt;code&gt;color-mix()&lt;/code&gt; we will focus on bringing relative color syntax to PostCSS Preset Env, but we are still waiting for a few specification issues to be resolved. &lt;a href=&quot;https://github.com/csstools/postcss-plugins/issues/177&quot;&gt;Subscribe to this issue to follow along&lt;/a&gt;.&lt;/p&gt;
&lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://preset-env.cssdb.org/static/js/blog_color_mix_2023_03_27.js?hash=1bd6867e47&quot;&gt;&lt;/script&gt;
&lt;style&gt;
	.color-mix-wrapper {
		display: flex;
		flex-wrap: wrap;
	}

	.color-mix-settings {
		display: flex;
		flex-direction: column;
		max-width: 525px;
		margin: 0 auto 40px;
		width: 100%;
	}

	.color-mix-settings__colors {
		display:flex;
	}

	.color-mix-settings__percent,
	.color-mix-settings__colors {
		margin-top: 32px;
	}

	.color-mix-settings__color {
		align-items: center;
		display:flex;
		flex: 1;
		flex-direction: column;
	}

	label {
		color: #666;
		font-size: 14px;
		font-weight: bold;
		text-transform: uppercase;
		letter-spacing: 0.025em;
	}

	input, select {
		margin: 0.5rem 1rem;
	}

	#interpolation-method,
	#color-space {
		width: 150px;
	}

	.color-mix-results {
		display: flex;
		height: 150px;
		margin: 1rem auto;
		position: relative;
		width: 250px;
	}

	#output-color-a,
	#output-color-b,
	#output-color-mix {
		color: transparent; /* invisible text */
	}

	#output-color-a::after,
	#output-color-a::before,
	#output-color-b::after,
	#output-color-b::before,
	#output-color-mix::after,
	#output-color-mix::before {
		position: absolute;
		aspect-ratio: 1;
		border-radius: 50%;
		content: &quot;&quot;;
		display: block;
		width: 150px;
		left: 0;
		top: 0;
	}

	#output-color-a::before,
	#output-color-b::before,
	#output-color-mix::before {
		background-color: white;
	}

	#output-color-a::before {
		z-index: 1;
	}

	#output-color-a::after {
		background-color: var(--color, red);
		border: 2px solid black;
		z-index: 2;
	}

	#output-color-b::before {
		left: 100px;
		z-index: 3;
	}

	#output-color-b::after {
		background-color: var(--color, blue);
		border: 2px solid black;
		left: 100px;
		z-index: 4;
	}

	#output-color-mix {
		transition: background-color 0.5s ease;
	}

	#output-color-mix::before {
		clip-path: circle(75px at 175px 75px);
		z-index: 5;
	}

	#output-color-mix::after {
		background-color: var(--color, rgb(128, 0, 128));
		transition: inherit;
		clip-path: circle(75px at 175px 75px);
		z-index: 6;
	}

	#output-color-mix-css,
	#output-color-hex {
		background-color: #263238;
		border-radius: 3px;
		border: 1px solid grey;
		color: white;
		display: block;
		font-size: 0.875em;
		font-family: monospace;
		line-height: 2;
		margin: 1rem auto;
		max-width: 100%;
		padding: 2px 8px;
		position: relative;
		text-align: left;
		width: fit-content;
	}

	input[type=&quot;color&quot;] {
		-moz-appearance: none;
		-webkit-appearance: none;
		appearance: none;
		background-color: transparent;
		border: none;
		cursor: pointer;
		height: 50px;
		transition: opacity .3s;
		margin: 0;
		width: 50px;
	}
	
	input[type=&quot;color&quot;]::-webkit-color-swatch {
		border-radius: 50%;
		border: 2px solid #000000;
	}
	
	input[type=&quot;color&quot;]::-moz-color-swatch {
		border-radius: 50%;
		border: 2px solid #000000;
	}

	input[type=&quot;color&quot;]:is(:hover,:focus) {
		opacity: 0.8;
	}

	.color-mix-settings__selects {
		display:flex;
	}

	.color-mix-settings__select {
		display: flex;
		flex: 1;
		flex-direction: column;
		gap: 4px;
	}

	select {
		background-image: url(&quot;data:image/svg+xml;charset=utf-8,%3Csvg xmlns=&#39;http://www.w3.org/2000/svg&#39; fill=&#39;none&#39; viewBox=&#39;0 0 20 20&#39;%3E%3Cpath stroke=&#39;%236B7280&#39; stroke-linecap=&#39;round&#39; stroke-linejoin=&#39;round&#39; stroke-width=&#39;1.5&#39; d=&#39;m6 8 4 4 4-4&#39;/%3E%3C/svg%3E&quot;);
		background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
		font-size: 1rem;
		color: #333;
		padding: 10px;
		border: 2px solid #ccc;
		border-radius: 5px;
		background-color: #fff;
		appearance: none;
		-webkit-appearance: none;
		-moz-appearance: none;
		margin: 0;
		transition: border .3s;
	}

	select:hover {
		border-color: #666;
	}

	input[type=range] {
		-webkit-appearance: none;
		width: 100%;
		height: 10px;
		border-radius: 5px;
		background-color: #ddd;
		margin-inline: 0;
		outline: none;
	}
	
	input[type=range]::-webkit-slider-thumb {
		-webkit-appearance: none;
		appearance: none;
		width: 20px;
		height: 20px;
		border-radius: 50%;
		background-color: var(--color-brand);
		cursor: pointer;
	}
&lt;/style&gt;
</content>
		</entry>
		<entry>
			<title>CSS Color Parser</title>
			<link href="https://preset-env.cssdb.org/blog/css-color-parser-v1.0.0/"/>
			<updated>2023-03-27T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/css-color-parser-v1.0.0/</id>
			<content xml:lang="en" type="html">&lt;h2&gt;Try it out&lt;/h2&gt;
&lt;p&gt;&lt;label id=&quot;color-input-label-1&quot; for=&quot;color-input-1&quot;&gt;A new parser for CSS color notations:&lt;/label&gt;&lt;/p&gt;
&lt;textarea id=&quot;color-input-1&quot; class=&quot;color-input&quot; rows=&quot;2&quot;&gt;
oklch(calc(50% * 1.4) 0.268 134.568)
&lt;/textarea&gt;
&lt;p&gt;&lt;output id=&quot;color-output-rgb-1&quot; class=&quot;color-output-rgb&quot; for=&quot;color-input-1&quot; style=&quot;--color: rgb(88, 186, 0);&quot;&gt;rgb(88, 186, 0)&lt;/output&gt;
&lt;output id=&quot;color-output-p3-1&quot; class=&quot;color-output-p3&quot; for=&quot;color-input-1&quot; style=&quot;--color: color(display-p3 0.41387 0.73323 0);&quot;&gt;color(display-p3 0.41387 0.73323 0)&lt;/output&gt;
&lt;output id=&quot;color-output-oklch-1&quot; class=&quot;color-output-oklch&quot; for=&quot;color-input-1&quot; style=&quot;--color: oklch(0.7 0.268 134.568);&quot;&gt;oklch(0.7 0.268 134.568)&lt;/output&gt;&lt;/p&gt;
&lt;h2&gt;One more specialized parser&lt;/h2&gt;
&lt;p&gt;Plenty of plugins in &lt;code&gt;postcss-preset-env&lt;/code&gt; interact with CSS color values.
We provide fallbacks for modern notations like &lt;code&gt;rgb(255 0 255 / 50%)&lt;/code&gt; and new color functions like &lt;code&gt;color(display-p3 0.5 0 0.5 / 0.5)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In the past, each package had its own implementation of the needed conversion logic.
This was fine for a while, but as the number of plugins grew, so did the amount of duplicate code.
This was harder to maintain and plugins were larger than they needed to be.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;We had initially hoped to use an existing package (e.g. &lt;a href=&quot;https://colorjs.io/&quot;&gt;color.js&lt;/a&gt; or &lt;a href=&quot;https://culorijs.org/&quot;&gt;culori&lt;/a&gt;), but no package was designed specifically to parse and convert CSS colors exactly as a browser would. We hope that our modular approach allows others to reuse bits even if their use case is different.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://drafts.csswg.org/css-color-5/&quot;&gt;&lt;code&gt;css-color-5&lt;/code&gt;&lt;/a&gt; introduced recursive color functions which required a different class of tools.&lt;br /&gt;
Simple parsing algorithms or regular expressions were no longer sufficient.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A recursive example :&lt;/em&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.example&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;color-mix&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
		in lch&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
		#d20 50%&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
		&lt;span class=&quot;token function&quot;&gt;color-mix&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
			in srgb&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
			purple&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
			&lt;span class=&quot;token function&quot;&gt;rgb&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;230 10 15&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; 10%
		&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We started from our existing &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer&quot;&gt;tokenizer&lt;/a&gt; and &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms&quot;&gt;parsing algorithms&lt;/a&gt; and added &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc&quot;&gt;&lt;code&gt;@csstools/css-calc&lt;/code&gt;&lt;/a&gt; on on top of that.&lt;/p&gt;
&lt;p&gt;We also created and published the &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/packages/color-helpers&quot;&gt;&lt;code&gt;@csstools/color-helpers&lt;/code&gt; npm package&lt;/a&gt; with the color logic based on the sample code maintained by the CSS Working Group.
We are not the creators of most of the algorithms in this package but our users require something distributed through npm.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;@csstools/color-helpers&lt;/code&gt; contains all the parts needed to convert between color spaces and color notations, but it doesn&#39;t have any knowledge of CSS and isn&#39;t able to parse or serialize CSS color values.&lt;/p&gt;
&lt;p&gt;We brought all these building blocks together in a new package &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser&quot;&gt;&lt;code&gt;@csstools/css-color-parser&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This package is able to parse CSS color values like a browser would and convert them to fallback notations.&lt;/p&gt;
&lt;p&gt;Currently supported in the parser :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;color-mix&lt;/code&gt; from &lt;a href=&quot;https://drafts.csswg.org/css-color-5/&quot;&gt;CSS Color Module Level 5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;all color notations from &lt;a href=&quot;https://drafts.csswg.org/css-color-4/&quot;&gt;CSS Color Module Level 4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;named colors&lt;/li&gt;
&lt;li&gt;&lt;code&gt;transparent&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;hex colors&lt;/li&gt;
&lt;li&gt;&lt;code&gt;calc()&lt;/code&gt; expressions in color notations&lt;/li&gt;
&lt;li&gt;recursive color functions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Only two serialization formats are currently supported :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;rgb(...)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;color(display-p3 ...)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;If you require other formats, please &lt;a href=&quot;https://github.com/csstools/postcss-plugins/issues/new/choose&quot;&gt;open an issue&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;label id=&quot;color-input-label-2&quot; for=&quot;color-input-2&quot;&gt;Go nuts:&lt;/label&gt;&lt;/p&gt;
&lt;textarea id=&quot;color-input-2&quot; class=&quot;color-input&quot; rows=&quot;15&quot;&gt;
color-mix(
	in lch,
	purple calc(100% * sin(0.1)),
	color-mix(
		in oklch,
		#4fe calc(100% / 3),
		color(
			display-p3
			calc(33% * 3)
			calc(1 / 2) -0.1)
			calc(100% / 3 * 2
		)
	) calc(20% + 4%)
)
&lt;/textarea&gt;
&lt;p&gt;&lt;output id=&quot;color-output-rgb-2&quot; class=&quot;color-output-rgb&quot; for=&quot;color-input-2&quot; style=&quot;--color: rgba(255, 99, 0, 0.339833);&quot;&gt;rgba(255, 99, 0, 0.339833)&lt;/output&gt;
&lt;output id=&quot;color-output-p3-2&quot; class=&quot;color-output-p3&quot; for=&quot;color-input-2&quot; style=&quot;--color: color(display-p3 0.9361 0.42808 0.14191 / 0.339833);&quot;&gt;color(display-p3 0.9361 0.42808 0.14191 / 0.339833)&lt;/output&gt;&lt;/p&gt;
&lt;p&gt;&lt;output id=&quot;color-output-oklch-2&quot; class=&quot;color-output-oklch&quot; for=&quot;color-input-2&quot; style=&quot;--color: oklch(0.69433 0.21132 43.7908 / 0.34);&quot;&gt;oklch(0.69433 0.21132 43.7908 / 0.34)&lt;/output&gt;&lt;/p&gt;
&lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://preset-env.cssdb.org/static/js/blog_color_parser_2023_03_27.js?hash=7c49fbbd28&quot;&gt;&lt;/script&gt;
&lt;style&gt;
	.color-input, .color-output-rgb, .color-output-p3, .color-output-oklch {
		background-color: #263238;
		border-radius: 3px;
		border: 1px solid grey;
		color: white;
		display: block;
		font-size: 0.875em;
		line-height: 2;
		margin: 1rem 0 2rem;
		max-width: calc(100% - 3rem);
		padding: 2px 8px;
		position: relative;
		text-align: left;
		width: 650px;
	}

	.color-output-rgb::after,
	.color-output-p3::after,
	.color-output-oklch::after {
		background-color: var(--color);
		border-radius: 50%;
		content: &quot;&quot;;
		display: inline-block;
		height: calc(0.875em * 2);
		position: absolute;
		right: calc(-1 * ((0.875em * 2) + 1rem));
		top: 2px;
		width: calc(0.875em * 2);
	}

	#color-input-label {
		display: block;
		font-size: 0.875em;
		line-height: 2;
		margin: 1rem 0;
		max-width: 100%;
		padding: 2px 0;
		text-align: left;
		width: 450px;
	}
&lt;/style&gt;
</content>
		</entry>
		<entry>
			<title>CSS Calc</title>
			<link href="https://preset-env.cssdb.org/blog/css-calc-v1.0.0/"/>
			<updated>2023-02-21T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/css-calc-v1.0.0/</id>
			<content xml:lang="en" type="html">&lt;p&gt;In the past we have mostly ignored values that contain &lt;code&gt;calc()&lt;/code&gt; when generating fallbacks, but no more!&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token comment&quot;&gt;/* today this is ignored by postcss-oklab-function */&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;oklch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;20% * 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; 0.268 34.568&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc#readme&quot;&gt;CSS Calc&lt;/a&gt; is a calculator library that is based on the &lt;a href=&quot;https://drafts.csswg.org/css-values-4/&quot;&gt;CSS Values Specification&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It allows us to &amp;quot;solve&amp;quot; a &lt;code&gt;calc()&lt;/code&gt; expression and use the resulting numeric value in any PostCSS plugin.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc#readme&quot;&gt;CSS Calc&lt;/a&gt; will take &lt;code&gt;calc(20% * 2)&lt;/code&gt; and convert it to &lt;code&gt;40%&lt;/code&gt;.&lt;br /&gt;
The remaining &lt;code&gt;oklch(40% 0.268 34.568)&lt;/code&gt; is then easier to fallback to &lt;code&gt;rgb()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It can not do everything a browser would be able to, but it can still do enough to make it useful for specific features.
(e.g. &lt;code&gt;1rem + 4px&lt;/code&gt; is unsolvable)&lt;/p&gt;
&lt;p&gt;&lt;label id=&quot;calc-input-label&quot; for=&quot;calc-input&quot;&gt;Try it out:&lt;/label&gt;
&lt;input id=&quot;calc-input&quot; type=&quot;text&quot; value=&quot;10px * -2&quot; /&gt;
&lt;output id=&quot;calc-output&quot; for=&quot;calc-input&quot;&gt;-20px&lt;/output&gt;&lt;/p&gt;
&lt;p&gt;This new tool will enable us to create better PostCSS plugins for &lt;a href=&quot;https://css-tricks.com/new-css-color-features-preview/#aa-the-relative-color-syntax-is-super-useful&quot;&gt;Relative Color Syntax&lt;/a&gt;, &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix&quot;&gt;Color Mix&lt;/a&gt; and any other feature that interacts with &lt;code&gt;calc()&lt;/code&gt;.&lt;/p&gt;
&lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://preset-env.cssdb.org/static/js/blog_calc_2023_02_21.js?hash=cd3a697c19&quot;&gt;&lt;/script&gt;
&lt;style&gt;
	#calc-input, #calc-output {
		background-color: #263238;
		border-radius: 3px;
		border: 1px solid grey;
		color: white;
		display: block;
		font-size: 0.875em;
		line-height: 2;
		margin: 1rem 0 2rem;
		max-width: 100%;
		padding: 2px 8px;
		text-align: left;
		width: 450px;
	}

	#calc-input-label {
		display: block;
		font-size: 0.875em;
		line-height: 2;
		margin: 1rem 0;
		max-width: 100%;
		padding: 2px 0;
		text-align: left;
		width: 450px;
	}
&lt;/style&gt;
</content>
		</entry>
		<entry>
			<title>Upcoming changes to CSS Nesting</title>
			<link href="https://preset-env.cssdb.org/blog/upcoming-changes-css-nesting/"/>
			<updated>2023-02-10T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/upcoming-changes-css-nesting/</id>
			<content xml:lang="en" type="html">&lt;p&gt;Nesting in CSS has always been a desired feature. Sass did it first, and then every other preprocessor had it in one form or another. Tab Atkins proposed the spec for &lt;a href=&quot;https://tabatkins.github.io/specs/css-nesting/&quot;&gt;CSS Nesting Module Level 3&lt;/a&gt; back in 2015, and it wasn&#39;t until 2021 that it got to be picked as &lt;a href=&quot;https://www.w3.org/TR/css-nesting-1/&quot;&gt;an official spec&lt;/a&gt; by the CSS Working Group.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting#readme&quot;&gt;PostCSS Nesting&lt;/a&gt; has been around since the beginning, and we&#39;ve been following the spec closely. However, as it happens, the spec is evolving once it&#39;s finally ready to be implemented by browsers. This means that we will need to make some changes over time to keep up with the spec.&lt;/p&gt;
&lt;p&gt;In this post we&#39;ll outline what has changed from the plugin that you use today and that&#39;s bundled with &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env#readme&quot;&gt;PostCSS Preset Env&lt;/a&gt;, and what you can expect in the future along with some rough timelines.&lt;/p&gt;
&lt;h2&gt;What&#39;s changing?&lt;/h2&gt;
&lt;p&gt;In a nutshell there are three things that are changing.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;@nest&lt;/code&gt; is gone 👋&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;@nest&lt;/code&gt; was previously required for all selectors that didn&#39;t start with &lt;code&gt;&amp;amp;&lt;/code&gt;. This is now gone and &lt;code&gt;&amp;amp;&lt;/code&gt; can be placed anywhere, or &lt;em&gt;nowhere&lt;/em&gt; (more on this below).&lt;/p&gt;
&lt;p&gt;Let&#39;s see an example:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@nest&lt;/span&gt; .parent &amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; green&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Has to be written as:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;.parent &amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; green&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Making &lt;code&gt;&amp;amp;&lt;/code&gt; optional (sometimes)&lt;/h3&gt;
&lt;p&gt;One of the things that have been very different between CSS and Sass is the need for the &lt;code&gt;&amp;amp;&lt;/code&gt; symbol. This how it needed to look:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;&amp;amp; .bar&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; green&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
	
	&lt;span class=&quot;token selector&quot;&gt;&amp;amp; &gt; .baz&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; blue&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
	
	&lt;span class=&quot;token selector&quot;&gt;&amp;amp; + .qux&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; red&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
	
	&lt;span class=&quot;token selector&quot;&gt;&amp;amp; span&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; yellow&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After these changes, (simply put) you &lt;em&gt;can&lt;/em&gt; omit the &lt;code&gt;&amp;amp;&lt;/code&gt; symbol as long as the selector starts with a symbol. Either because it&#39;s a relative selector with an explicit combinator (&lt;code&gt;&amp;gt;&lt;/code&gt; or &lt;code&gt;+&lt;/code&gt;) or because it&#39;s a relative selector with an implicit descendant combinator.&lt;/p&gt;
&lt;p&gt;You &lt;em&gt;could&lt;/em&gt; write the above as follows:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;.bar&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; green&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
	
	&lt;span class=&quot;token selector&quot;&gt;&gt; .baz&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; blue&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
	
	&lt;span class=&quot;token selector&quot;&gt;+ .qux&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; red&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
	
	&lt;span class=&quot;token comment&quot;&gt;/* span does not start with a symbol */&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;&amp;amp; span&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; yellow&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
	
	&lt;span class=&quot;token comment&quot;&gt;/* You can also alter the selector to start with a symbol! */&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;:is(span)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; yellow&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We&#39;re emphasizing &lt;em&gt;can&lt;/em&gt; and &lt;em&gt;could&lt;/em&gt; because skipping the &lt;code&gt;&amp;amp;&lt;/code&gt; in some cases is not enforced, you can still write them and both are valid.&lt;/p&gt;
&lt;h4&gt;Non-relative selectors (parent nesting)&lt;/h4&gt;
&lt;p&gt;The same rule of thumb applies when we have non-relative selector (where &lt;code&gt;@nest&lt;/code&gt; used to be needed) though this will be a bit trickier.&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;span &amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; rebeccapurple&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This isn&#39;t valid &lt;strong&gt;because the selector does not start with a symbol&lt;/strong&gt;. You would need to write it as follows:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;:is(span) &amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; rebeccapurple&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that subsequent selectors that are comma separated don&#39;t need the symbol. These are all valid:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;:is(span), p &amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; rebeccapurple&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
	
	&lt;span class=&quot;token selector&quot;&gt;:is(span, p) &amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; rebeccapurple&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
	
	&lt;span class=&quot;token comment&quot;&gt;/* Even on separated lines */&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;:is(span) &amp;amp;,
	p &amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; rebeccapurple&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Obviously if you had a selector with a symbol in such list you could just place it first for the rest to work:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;.bar &amp;amp;,
	p &amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; rebeccapurple&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Defined order of declarations that come after nested rules&lt;/h3&gt;
&lt;p&gt;You can now write declarations after the nested CSS but this won&#39;t affect the order in which the cascade actually works.&lt;/p&gt;
&lt;p&gt;Let&#39;s see this strange (yet valid) example:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; pink&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

	&lt;span class=&quot;token selector&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; green&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

	&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; red&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Intuitively, you&#39;d think that an element &lt;code&gt;.foo&lt;/code&gt; with the above CSS should be &lt;code&gt;red&lt;/code&gt;. However it is actually &lt;code&gt;green&lt;/code&gt; as this is how the browsers will interpret it:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; pink&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; red&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

	&lt;span class=&quot;token selector&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; green&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that this is considered a bad practice given that it makes the code much harder to read and understand what&#39;s going on. Ideally, you should not place new declarations after nesting blocks so the intention is always clear.&lt;/p&gt;
&lt;h2&gt;When is this changing?&lt;/h2&gt;
&lt;p&gt;It already did! Since version &lt;a href=&quot;https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-nesting/CHANGELOG.md#1110-january-31-2023&quot;&gt;11.1.0&lt;/a&gt; we have implemented these changes in a non-breaking way. Using &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting#readme&quot;&gt;PostCSS Nesting&lt;/a&gt; on &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env#readme&quot;&gt;PostCSS Preset Env&lt;/a&gt; today will allow you to write the above syntax already. You can even try this in &lt;a href=&quot;https://preset-env.cssdb.org/playground&quot;&gt;the playground&lt;/a&gt; now!&lt;/p&gt;
&lt;p&gt;After the syntax is sufficiently stable (implemented by some vendors) we will release a new version that emit warnings if you use &lt;code&gt;@nest&lt;/code&gt;. This will be configurable, so you can silence the warnings, but it is advisable to use as a migration guide.&lt;/p&gt;
&lt;p&gt;In an upcoming major, &lt;code&gt;@nest&lt;/code&gt; will be removed completely.&lt;/p&gt;
&lt;h2&gt;Final words&lt;/h2&gt;
&lt;p&gt;We understand how this can be complicated, and we want to offer a sensible path that does not lead to many breaking versions so you have enough time to adapt but also we can catch any changes that might come from the vendor&#39;s implementation.&lt;/p&gt;
&lt;p&gt;We&#39;re very excited though that Nesting is finally coming to CSS!&lt;/p&gt;
&lt;p&gt;As usual, we welcome any feedback, concerns or bug fixes!&lt;/p&gt;
</content>
		</entry>
		<entry>
			<title>You can now use true and false in custom media queries!</title>
			<link href="https://preset-env.cssdb.org/blog/can-use-boolean-custom-media/"/>
			<updated>2023-01-25T00:00:00Z</updated>
			<id>https://preset-env.cssdb.org/blog/can-use-boolean-custom-media/</id>
			<content xml:lang="en" type="html">&lt;p&gt;Since the release of &lt;a href=&quot;https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-custom-media&quot;&gt;PostCSS Custom Media&lt;/a&gt; version 9, you can now use &lt;code&gt;true&lt;/code&gt; and &lt;code&gt;false&lt;/code&gt; in your custom media queries. This allows you to easily debug a condition without a major refactor.&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@custom-media&lt;/span&gt; --tablet &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;width &gt;= 48rem&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@custom-media&lt;/span&gt; --desktop &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;width &gt;= 90rem&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@custom-media&lt;/span&gt; --dark true&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--tablet&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--dark&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;body&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; cyan&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now you can easily test what the media query would look like if you were actually in Dark Mode. While there are developer tools that can help you with this, they lose the state if you close the for example or you might want to test another combination.&lt;/p&gt;
&lt;p&gt;Just remember to remove the &lt;code&gt;true&lt;/code&gt; and &lt;code&gt;false&lt;/code&gt; values before you ship your code!&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@custom-media&lt;/span&gt; --tablet &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;width &gt;= 48rem&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@custom-media&lt;/span&gt; --desktop &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;width &gt;= 90rem&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@custom-media&lt;/span&gt; --dark &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;prefers-color-scheme&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; dark&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--tablet&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--dark&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;body&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; cyan&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
		</entry>
</feed>
