- From: Jonas via GitHub <sysbot+gh@w3.org>
- Date: Thu, 21 Jul 2016 13:04:08 +0000
- To: public-css-archive@w3.org
About *simple*: About `@prepend` could you explain how leakage from outside is stopped in that proposal? Would you care to elaborate? Ref: https://github.com/w3c/csswg-drafts/issues/270#issuecomment-231999279 * * * One of the core issues I was trying to solve is that the basic identifiers are just tags, classes and ids. Aside ids these identifiers can be re-used. For every use, the selectors matching apply their property declarations. Now the custom attribute I am suggesting tries to work around that: * It is like a class, thus unlike an id in so far that you can set it multiple times within one dom tree. * It is like ids in so far that it stops leaking up the tree. * It is much stronger than ids in terms of leaking down the tree: By default there is none. How do you propose `@pretend` solves these issues? In terms of simplicity: The proposal I setup above could be separated into 3 implementation levels to keep it simple. Level 1 would be basic namespaces, Level 2 would allow explicit inheriting, Level 3 would allow finalization (e.g. marking a namespace to be read-only from then on). * * * I read through @tabatkins css-nesting - thanks for linking. I don't - however - see why it would not leak - so it is a different concept, but none that fixes separation of concerns / leakage. Did I miss something? * * * I took a look at https://drafts.csswg.org/css-scoping/: > "Why is the shadow host so weird?" Maybe this should be solved instead of worked around with `:host-context`? > It would not be very good if a component used a particular class name internally in a shadow tree stylesheet, and the page author using the component accidentally also used the the same class name and put it on the shadow host. Such a situation would result in accidental styling that is impossible for the component author to predict, and confusing for the page author to debug. In my proposal above, as soon as you declare a `namespace` attribute that element and all its children are part of that namespace. It is both, the host and the root of the `shadow-tree`. Why is that so bad? And then two more questions: - What is the purpose of the slotted feature https://drafts.csswg.org/css-scoping/#selectordef-slotted - It seems to make things unreasonably difficult to use (and implement). - What is the reason to include things like `shadow piercing` selector operand? Again this, IMHO, defeats the whole purpose of having clean separations. The only thing that IMHO SHOULD be possibly is inheriting style declarations from the context. https://drafts.csswg.org/css-scoping/#host-selector -- GitHub Notification of comment by ionas Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/270#issuecomment-234246784 using your GitHub account
Received on Thursday, 21 July 2016 13:04:16 UTC