#css-custom-properties

[ follow ]
fromDEV Community
3 days ago

String3D: Forcing 3D to Obey CSS

Let's kill the magic expectations right now: String3D is not "CSS 3D". There are no tricks here where the browser suddenly learned to render meshes natively. Under the hood, it's a standard 3D renderer in a canvas living above the page. The difference lies elsewhere. String3D synchronizes 3D objects with DOM elements every frame, but it takes its behavioral instructions from CSS custom properties. The DOM remains the DOM:
Web development
fromCSS-Tricks
1 month ago

On Inheriting and Sharing Property Values | CSS-Tricks

Sometimes I want to set the value of a CSS property to that of a different property, even if I don't know what that value is, and even if it changes later. Unfortunately though, that's not possible (at least, there isn't a CSS function that specifically does that). In my opinion, it'd be super useful to have something like this (for interpolation, maybe you'd throw in there as well): /* Totally hypothetical */ button { border-radius: compute(height, self); border-radius: compute(height, inherit); border-radius: compute(height, #this); }
Web development
Web development
fromPiccalilli
3 months ago

A workaround for using custom properties in media queries

Use container style queries plus @property and vi units to emulate media queries using custom properties and computed length comparisons.
Web design
fromPiccalilli
5 months ago

A revisit of the Every Layout sidebar with :has() and selector performance

The Sidebar layout provides adaptability without requiring @media queries.
UX design
fromAlways Twisted
8 months ago

CSS Custom Properties vs. Sass Variables: A Pragmatic Guide Always Twisted

Sass variables are for compile-time constants; CSS custom properties offer runtime flexibility for theming.
[ Load more ]