W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2016

Re: [csswg-drafts] [css-scoping] Support for CSS namespaces

From: Jonas via GitHub <sysbot+gh@w3.org>
Date: Tue, 12 Jul 2016 00:51:07 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-231908239-1468284665-sysbot+gh@w3.org>
* I am 100% with you that leaking upwards is *almost* as an important 
issue as leaking downwards the DOM.
* Web components have about 0 to do with the feature you describe. It 
is just that with ReatJS/Elm/ShadowDOM/webcomponents the issue is a 
pressing matter. It affects non-web-component apps to the same degree 
and as they are much *much* more prevalent so is the relevancy.
* Also web components require JavaScript thus they are not a purely 
declarative approach, but declarative approaches make the web tech 
strong and accessible.

> unfilled niche of declarative web components when you only need some
 of the simpler parts of the tech, like style boundaries, that 
currently isn't being filled,

This hits it on the nail.

> The correct thing to do is wait for web components to settle down a 
bit and become well-implemented, so we can figure out what the best 
way to extend them to address our use-cases is.

I propose going the other way. Making scoping work in either or both 
ways.

A - maybe - naive thought: See you could put <html> in a namespace and
 you could say whenever you put something in a namespace it will not 
by default leak its definitions downwards, and a namespace will never 
leak them upwards. So you can say `<html stylespace="canvas">` and 
later on in your code `<footer stylespace="footer-component">`... 
and styles defined within @stylespace ('canvas') would not leak down 
UNLESS @stylespace('footer-component') extends upon 'canvas'.

I am just hoping that further discussions will make implementors wake 
up. 

It would be great if solutions are being prepped sooner than later, at
 least in theory. And if the feature is simple and extensible and 
there is a lot of social pressure - maybe implementors will agree that
 its a good way to go forward carrying with them the majority of the 
webs current state (like: wordpress, bootstrap, angular, reactjs  (and
 with the exception of reactjs I despise those techs but ALL of them 
would benefit greatly from having easy tools to stop leaking from 
outer scope and to outer scope)).

-- 
GitHub Notification of comment by ionas
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/270#issuecomment-231908239 
using your GitHub account
Received on Tuesday, 12 July 2016 00:51:14 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:00 UTC