<div>Primary</div>
<pre class="language-css">
<code>
:root {
--primary-hue: 250;
--primary-saturation: 100%;
--primary-lightness: 90%;
--primary-light: hsl(
var(--primary-hue) var(--primary-saturation) var(--primary-lightness)
);
--on-primary-light: hsl(var(--primary-hue) var(--primary-saturation) 10%);
--surface1-light: hsl(var(--primary-hue) 40% 90%);
--surface2-light: hsl(var(--primary-hue) 30% 99%);
--surface3-light: hsl(var(--primary-hue) 30% 92%);
--surface4-light: hsl(var(--primary-hue) 30% 85%);
--primary-light: hsl(
var(--primary-hue) var(--primary-saturation) var(--primary-lightness)
);
--surface-shadow-light: var(--primary-hue) 40% 10%;
--shadow-strength-light: 0.02;
}
div {
background-color: var(--primary-light);
color: var(--on-primary-light);
box-shadow: 0 2.8px 2.2px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.03)
),
0 6.7px 5.3px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.01)
),
0 12.5px 10px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.02)
),
0 22.3px 17.9px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.02)
),
0 41.8px 33.4px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.03)
),
0 100px 80px hsl(var(--surface-shadow-light) / var(--shadow-strength-light));
}
</code>
</pre>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100vw;
min-height: 100vh;
font-family: "Exo", Arial, sans-serif;
background-color: #f9f9f9;
padding: 20px;
display: grid;
gap: 10px;
place-content: center;
}
:root {
--primary-hue: 250;
--primary-saturation: 100%;
--primary-lightness: 90%;
--primary-light: hsl(
var(--primary-hue) var(--primary-saturation) var(--primary-lightness)
);
--on-primary-light: hsl(var(--primary-hue) var(--primary-saturation) 10%);
--surface1-light: hsl(var(--primary-hue) 40% 90%);
--surface2-light: hsl(var(--primary-hue) 30% 99%);
--surface3-light: hsl(var(--primary-hue) 30% 92%);
--surface4-light: hsl(var(--primary-hue) 30% 85%);
--surface-shadow-light: var(--primary-hue) 40% 10%;
--shadow-strength-light: 0.02;
}
div {
width: 30vmin;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
aspect-ratio: 1 / 1;
border-radius: 10px;
background-color: var(--primary-light);
color: var(--on-primary-light);
box-shadow: 0 2.8px 2.2px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.03)
),
0 6.7px 5.3px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.01)
),
0 12.5px 10px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.02)
),
0 22.3px 17.9px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.02)
),
0 41.8px 33.4px
hsl(
var(--surface-shadow-light) / calc(var(--shadow-strength-light) + 0.03)
),
0 100px 80px hsl(var(--surface-shadow-light) / var(--shadow-strength-light));
}