|
4 | 4 | title="Philosopher’s stone, logo of PostCSS" |
5 | 5 | src="https://postcss.org/logo-leftp.svg"> |
6 | 6 |
|
7 | | -[PostCSS](https://github.com/postcss/postcss) plugin to generate more realistic [“smooth” shadows](https://tobiasahlin.com/blog/layered-smooth-box-shadows/). |
| 7 | +[PostCSS](https://github.com/postcss/postcss) plugin to generate [more realistic smooth shadows](https://tobiasahlin.com/blog/layered-smooth-box-shadows/). See [demo](https://postcss.github.io/postcss-smooth-shadow/). |
8 | 8 |
|
9 | 9 | ```css |
10 | 10 | .card { |
11 | | - box-shadow: --soft-shadow(0 1rem 2rem oklch(0 0 0 / 10%)); |
| 11 | + box-shadow: --soft-shadow(0 0.5rem 1rem oklch(0 0 0 / 10%)); |
12 | 12 | } |
13 | 13 | ``` |
14 | 14 |
|
15 | 15 | ```css |
16 | 16 | .card { |
17 | 17 | box-shadow: |
18 | | - 0 calc(0.0278 * 1rem) calc(0.0278 * 2rem) rgb(from oklch(0 0 0 / 10%) r g b / calc(alpha * 0.167)), |
19 | | - 0 calc(0.1111 * 1rem) calc(0.1111 * 2rem) rgb(from oklch(0 0 0 / 10%) r g b / calc(alpha * 0.333)), |
20 | | - 0 calc(0.25 * 1rem) calc(0.25 * 2rem) rgb(from oklch(0 0 0 / 10%) r g b / calc(alpha * 0.5)), |
21 | | - 0 calc(0.4444 * 1rem) calc(0.4444 * 2rem) rgb(from oklch(0 0 0 / 10%) r g b / calc(alpha * 0.667)), |
22 | | - 0 calc(0.6944 * 1rem) calc(0.6944 * 2rem) rgb(from oklch(0 0 0 / 10%) r g b / calc(alpha * 0.833)), |
23 | | - 0 calc(1 * 1rem) calc(1 * 2rem) rgb(from oklch(0 0 0 / 10%) r g b / calc(alpha * 1)); |
| 18 | + 0 calc(0.1111 * 0.5rem) calc(0.1111 * 1rem) rgb(from oklch(0 0 0 / 10%) r g b / calc(alpha * 0.333)), |
| 19 | + 0 calc(0.4444 * 0.5rem) calc(0.4444 * 1rem) rgb(from oklch(0 0 0 / 10%) r g b / calc(alpha * 0.667)), |
| 20 | + 0 calc(1 * 0.5rem) calc(1 * 1rem) rgb(from oklch(0 0 0 / 10%) r g b / calc(alpha * 1)); |
24 | 21 | } |
25 | 22 | ``` |
26 | 23 |
|
27 | | -It supports non-px units like `rem`, 3 shadow types, inset shadows, and any color format (we recommends [`oklch()`](https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl)). |
| 24 | +It supports non-px units like `rem`, 3 shadow types, `inset` shadows, and any color format (we recommends [`oklch()`](https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl)). |
28 | 25 |
|
29 | 26 | --- |
30 | 27 |
|
|
0 commit comments