Re:Web Components could replace frontend frameworks?
by dosy on Friday April 12, 2019 @01:48AM
(#19642303)
:is()
can make concise CSS of some of what nesting does in Sasshttps://developer.mozilla.org/en-US/docs/Web/CSS/:is
there's a lot New coming into web all the time. I watch chrome status for drops.
Re:Web Components could replace frontend frameworks?
by zaphar on Friday April 12, 2019 @09:25AM
(#19644559)
Very early ShadowDom had worse performance, but the major browsers have been hard at work improving it for a while now. I haven't benchmarked in several years but I wouldn't be surprised to find that it is now a boost in many cases.
Re:Web Components could replace frontend frameworks?
by westbrookjo on Friday April 12, 2019 @11:10PM
(#19650869)
You might want to check out https://cssdb.org/#nesting-rules native nested CSS rules have hit stage 1!
Re:Web Components could replace frontend frameworks?
by lstamour on Saturday April 13, 2019 @12:22AM
(#19651113)
I checked the spec earlier and it’s impossible to make it backwards compatible with Sass without some slight edits, at least according to their GH issue on it. It’s worth watching though I suspect <style type=“text/scss”> or something like it will be added before we see broad adoption! :)
Re:Web Components could replace frontend frameworks?
by westbrookjo on Saturday April 13, 2019 @06:26PM
(#19656138)
Possibly. I think the extra `&`s are something that could wash out with one-time tooling, and that the desire for `@nest .parent &` would bump the conversion rate, but it's always fun to watch the comings and going of standards.
I wasn’t aware of this because this stuff is being developed and released so dang quickly! (I do worry that APIs developed in relative haste might be replaced or iterated on in relative haste, especially if they aren’t adopted widely first...)