Skip to content

Commit 1d2f12a

Browse files
committed
Deploying to gh-pages from @ 250ffa6 🚀
1 parent 9366f5c commit 1d2f12a

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

index.html

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>PostCSS Smooth Shadow demo</title>
6+
<style>
7+
body {
8+
margin: 0;
9+
padding: 2rem;
10+
background: oklch(0.97 0.003 264);
11+
min-height: 100vh;
12+
box-sizing: border-box;
13+
}
14+
.example {
15+
width: 15rem;
16+
border-radius: 6px;
17+
font-size: 10px;
18+
font-family: monospace;
19+
background: oklch(1 0 0);
20+
box-sizing: border-box;
21+
padding: 1rem 1rem;
22+
23+
& + & {
24+
margin-top: 3rem;
25+
}
26+
27+
&.is-1 {
28+
box-shadow: 0 calc(0.0625 * 32px) calc(0.0625 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 0.25)), 0 calc(0.25 * 32px) calc(0.25 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 0.5)), 0 calc(0.5625 * 32px) calc(0.5625 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 0.75)), 0 calc(1 * 32px) calc(1 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 1));
29+
}
30+
31+
&.is-2 {
32+
box-shadow: 0 calc(0.0625 * 32px) calc(0.0625 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 1)), 0 calc(0.25 * 32px) calc(0.25 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 0.75)), 0 calc(0.5625 * 32px) calc(0.5625 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 0.5)), 0 calc(1 * 32px) calc(1 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 0.25));
33+
}
34+
35+
&.is-3 {
36+
box-shadow: 0 calc(0.0625 * 32px) calc(0.0625 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 1)), 0 calc(0.25 * 32px) calc(0.25 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 1)), 0 calc(0.5625 * 32px) calc(0.5625 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 1)), 0 calc(1 * 32px) calc(1 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 1));
37+
}
38+
39+
&.is-4 {
40+
box-shadow: calc(0.0625 * 16px) calc(0.0625 * 32px) calc(0.0625 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 0.25)), calc(0.25 * 16px) calc(0.25 * 32px) calc(0.25 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 0.5)), calc(0.5625 * 16px) calc(0.5625 * 32px) calc(0.5625 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 0.75)), calc(1 * 16px) calc(1 * 32px) calc(1 * 24px) rgb(from oklch(0 0 0 / 8%) r g b / calc(alpha * 1));
41+
}
42+
43+
&.is-5 {
44+
box-shadow: 0 calc(1 * 1px) calc(1 * 2px) rgb(from oklch(0 0 0 / 20%) r g b / calc(alpha * 1));
45+
}
46+
47+
&.is-6 {
48+
box-shadow: inset 0 calc(1 * 2px) calc(1 * 5px) rgb(from oklch(0 0 0 / 20%) r g b / calc(alpha * 1));
49+
}
50+
}
51+
</style>
52+
</head>
53+
<body>
54+
<pre class="example is-1">
55+
--soft-shadow(
56+
0 32px 24px oklch(0 0 0 / 8%)
57+
)</pre
58+
>
59+
<pre class="example is-2">
60+
--sharp-shadow(
61+
0 32px 24px oklch(0 0 0 / 8%)
62+
)</pre
63+
>
64+
<pre class="example is-3">
65+
--linear-shadow(
66+
0 32px 24px oklch(0 0 0 / 8%)
67+
)</pre
68+
>
69+
<pre class="example is-4">
70+
--soft-shadow(
71+
16px 32px 24px oklch(0 0 0 / 8%)
72+
)</pre
73+
>
74+
<pre class="example is-5">
75+
--sharp-shadow(
76+
0 1px 2px oklch(0 0 0 / 15%)
77+
)</pre
78+
>
79+
<pre class="example is-6">
80+
--sharp-shadow(
81+
inset 0 1px 2px oklch(0 0 0 / 15%)
82+
)</pre
83+
>
84+
</body>
85+
</html>

0 commit comments

Comments
 (0)