#CSS trick not enough folks know about:
painting into the sub boxes of an element
- border
- padding
- content
you can paint into one, or all of them differently!
here's a gradient border, a solid padding fill, and a gradient content (inner) box
see fur yerself
https://codepen.io/argyleink/pen/NWQmxRj
painting into the sub boxes of an element
- border
- padding
- content
you can paint into one, or all of them differently!
here's a gradient border, a solid padding fill, and a gradient content (inner) box
see fur yerself
https://codepen.io/argyleink/pen/NWQmxRj
1 / 2
Comments
(Incidentally, saw this used in your latest YouTube video for some view transition tricky, @nerdy.dev.)
Box shadow can also paint forever outside an element, so cool
https://caniuse.com/?search=background-clip
https://caniuse.com/?search=background-origin