Quick Hit #38
Chrome has delayed shipping @function
to Chrome 139! A wise choice, if you ask me; functions will set a before and after in CSS.…
Chrome has delayed shipping @function
to Chrome 139! A wise choice, if you ask me; functions will set a before and after in CSS.…
We’ve been able to get the length of the viewport in CSS since… checks notes… 2013! Surprisingly, that was more than a decade ago. Getting the viewport width is as easy these days as easy as writing 100vw
, but …
The random()
function in CSS is an experimental feature (i.e., not supported in any browser) that returns a random numeric value or random choice among multiple values from a range you specify. It works the same as JavaScript’s Math.random
function…
Adam’s got this idea for a CSS syntax based on functional notations. Some “hate” it (Sass baggage) but we’re already sorta moving that way. Perhaps shorthand properties become shorthand functions?…
Most days, I’m writing vanilla CSS. Thanks to CSS variables and nesting, I have fewer reasons to reach for Sass or any other preprocessor. The times I reach for Sass tend to be when I need a @mixin
to loop …
A way to calculate the viewport’s width and height without JavaScript, by way of Temani Afif over at CSS Tip:
@property --_w {
syntax: '<length';
inherits: true;
initial-value: 100vw;
}
@property --_h {
syntax: '<length';
inherits: true;
…