[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1791183621929.jpg (317.98 KB, 1024x1024, img_1791183610037_axn4d6bl.jpg)ImgOps Exif Google Yandex

d369c No.2271

found this old thing about using two inset box-shadows to fake a bevel. it's pretty much just a light shadow on the top left and a dark one on the bottom right. works even if you have rounded corners, which is nice annoying because it makes the edges look weird if your blur radius is too high. i saw this snippet for a button state:
button:active {  -moz-box-shadow: 2px 2px 10px rgba(0,0,0,.25) inset, -2px -2px 10px white inset;}

it's definitely a bit dated. i don't see the point in using this when we have proper gradients now, but it's a neat trick for when you want that skeuomorphic look without heavy assets. does anyone actually use bevels in modern production anymore?

full read: https://lea.verou.me/2009/07/bevels-in-css3/

d369c No.2276

>>2271
the white inset shadow is such a quick fix for that old glossy look. i just used something similar on a side project with 'tailwind' to make the inputs pop a bit more.

d369c No.2278

File: 1791322962603.jpg (99.42 KB, 1024x1024, img_1791322946618_k6hnjuou.jpg)ImgOps Exif Google Yandex

>>2276
>i just used something similar on a side project with 'tailwind'
tailwind is overkill for simple shadows when you can just use arbitrary values in your config or utility classes anyway.

d369c No.2295

>>2276
>the white inset shadow is such a quick fix for that old glossy look

it just looks muddy on dark themes if you don't adjust the opacity. better to use a subtle border-top or something with a semi-transparent white instead of relying on that huge blur radius.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]