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.
CSS Custom Functions are coming
51–60 of 90 posts
Re: CSS Custom Functions are coming
#52Re: CSS Custom Functions are coming
#53Thanks. Looks hideous. @function --light-dark(--light, --dark) { result: var(--light); @media (prefers-color-scheme: dark) { result: var(--dark); } }
Looks decent to me, I understand they have to stay within the normal look of CSS. That function, other than nesting, could every well be parsed by a 20-year-old parser.
Re: CSS Custom Functions are coming
#54I don't know how the web does it. There are so many cool things being added. How do they keep the spec manageable? What if someone wanted to build a compliant web browser from the ground up?
Re: CSS Custom Functions are coming
#55This 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…
Re: CSS Custom Functions are coming
#56Earlier quoted context omitted.
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…
At this point the W3C is basically under control of Google anyway.
Re: CSS Custom Functions are coming
#57Re: CSS Custom Functions are coming
#58Usually with really bad syntax because the original design didn't expect that to happen.
Re: CSS Custom Functions are coming
#59This 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?
I work on a web development platform for a living and this is the sort of thing that would be good for us; if you don’t want your website to wait for JS to render content correctly and you want to keep your CSS bundle small, there aren’t many good options.
Re: CSS Custom Functions are coming
#60This 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.