Live data from Hacker News

CSS Custom Functions are coming

bram.us

41–50 of 90 posts

Re: CSS Custom Functions are coming

#43
post #17

This is it. This is all I’ve wanted in CSS for the last decade. In fact, I just wanted basic mixins without function-like behavior, but this gets me there. The comments here indicate that the article doesn’t do much to explain what this does or why you’d want it, but basically this gives you a way to reuse blocks of styles without needing to resort to e.g. utility classes or other hacks that get around specificity is…

Can you expand with some examples of pressing use cases? To me, great complexity should bring even greater utility. I have no use for this, and I’m not sure who it’s for. Can we get rid of tailwind? Polyfills? Any UI libs?

Re: CSS Custom Functions are coming

#44
This is exactly the sort of propaganda which encourages making sites that don't work in any browser but Google's. If web developers would just focus on making simple and widely-accessible sites instead of churnful trendchasing, the browser monopoly wouldn't exist.

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google.

Exactly.

Re: CSS Custom Functions are coming

#45

This is exactly the sort of propaganda which encourages making sites that don't work in any browser but Google's. If web developers would just focus on making simple and widely-accessible sites instead of churnful trendchasing, the browser monopoly wouldn't exist. Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. Exactly.

Either it will be popular enough that other browsers will implement the open standard, or it will not be popular and no one will implement it in other browsers and few sites will use it.

Mozilla has a revenue of like $600M. They should have no problem keeping up with popular w3c standards. Hell, even opera, with only a tiny fraction of users can keep up.

Re: CSS Custom Functions are coming

#47

This is exactly the sort of propaganda which encourages making sites that don't work in any browser but Google's. If web developers would just focus on making simple and widely-accessible sites instead of churnful trendchasing, the browser monopoly wouldn't exist. Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. Exactly.

I agree Google has too much market share and sway over plenty of browser features.

However… CSS features are a W3C specification and are an early stage [1]. It’s a process that vendors draft and agree on and can terminate.

On top of that I wouldn’t characterise improving css with functions isn’t a _churnful trendchasing_. If anything this will improve accessibility because it’ll be easier to manage size, colour, and motion preferences with better abstractions than media queries everywhere.

[1] https://drafts.csswg.org/css-mixins/

Re: CSS Custom Functions are coming

#48
post #27

Oh man, and I thought the current JS status-quo was already full of vulnerabilities and privacy risks. If I had mind-boggling amounts of money, one of the things I would do is start an organization to name and shame and give anti-awards to websites that most abuse javascript and whatever-this-will-be. Or a dang mutual fund: "Like an index fund except we don't support companies with websites that require a ridiculous…

Pointed out well!!!

Re: CSS Custom Functions are coming

#49

This is exactly the sort of propaganda which encourages making sites that don't work in any browser but Google's. If web developers would just focus on making simple and widely-accessible sites instead of churnful trendchasing, the browser monopoly wouldn't exist. Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. Exactly.

Sorry, this is a ridiculous claim. This spec has been worked on for years in the CSSWG with participation from multiple browser implementers, Igalia, and other community members.

Custom functions have been a huge web developer request for a long, long time and is one of the remaining gaps between standard CSS and Sass/LESS, after variables and nesting shipped. Mixins are next, and they'll be good too.

Not every advancement in the web platform needs to be some kind of conspiracy.

Post reply on HN