Live data from Hacker News

CSS Custom Functions are coming

bram.us

71–80 of 90 posts

Re: CSS Custom Functions are coming

#71

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.

- Developers: Ask for something for decades

- Google: It's implemented

- People: Screw Google and their monopolistic tactics

> If web developers would just focus on making simple

That boat is long gone. The people with money don't want that, they want a platform on which to shove ads down your throat. It's successful.

Re: CSS Custom Functions are coming

#72

Earlier quoted context omitted.

Non sense. Read the reply: this is a feature that is coming to all major browsers

coming to all major browsers Chrome, Chrome, Chrome, and Chrome?

Too many on HN seem to forget that Safari exists and has a large market share. If you break Safari then no one on an iPhone or iPad can use your site. That's an unacceptable level of breakage for almost every site, and is enough to ensure that if Apple doesn't implement it it won't be used.

Ironically, Apple's walled garden is the last thing standing between Google and total web dominance.

Re: CSS Custom Functions are coming

#73
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…

How do you replace mixins with those functions?

Re: CSS Custom Functions are coming

#74
I'm confused at all the negativity? I am personally very excited for this feature, it's going to enable one to use less JavaScript,and CSS to accomplish things that should be easy.

Re: CSS Custom Functions are coming

#76
Why not just use CSS-in-JS at this point? With functions and if statements, you now have two full Turing-complete programming languages in the browser.

Why? If the problem is JS bundle parse time, couldn't you just have a special kind of tag that opts out of compilation and runs in interpreted mode only, and stick your layout JS in there? Having two entirely separate languages seems like such a waste of effort both on the platform side, and on the web developer side having to learn so many things.

Re: CSS Custom Functions are coming

#77
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 these be used as mixins? I looks like there’s only a single return value.

Edit: Looks like mixins are planned: https://github.com/w3c/csswg-drafts/issues/9350#issuecomment...

Re: CSS Custom Functions are coming

#79

Earlier quoted context omitted.

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.

isn't opera just chrome now? that would obviously let them keep up

Yeah Opera uses Blink just like Chrome. Vivaldi browser, created by Opera's original team does as well.
Post reply on HN