-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<ol>/<li> behavior and shadow DOM #2432
Comments
What if you replace |
In that case it's indeed 1-2-3. The question is should distributing the |
Ah, I had missed the Overall it seems reasonable to make this work though. |
Also created an issue here. |
There's a bit of issue with the markup itself. The HTML parser would automatically yank the second and the third See the section "A start tag whose tag name is 'li'" I don't know how you'd fix this short of modifying the parser itself. |
See also WICG/webcomponents#404. This issue is not specific to I don't think the current behavior of Blink is intentional one. I guess that we had implemented these without any clear idea or standards. |
That's a good point. (Here's a quick repro that makes it easy to visually see: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=4944 .) So in this example Given that I am now less optimistic about fixing this, since we decided against such parsing in WICG/webcomponents#59 (which despite its title eventually extended to both slot and template). I guess |
@rniwa That seems like surprising behavior. Were did that historically come from? Is it from the desire to allow |
Yes, using I agree with @domenic that fixing this won't be useful / possible without modifying the parser. I'm open to the idea of adding special token or special parser behavior in a limited case to address that though since the HTML parser seems to be causing a lot of pains for custom element use cases. |
I'm interested in both sides:
|
I don't think there's any wart in the standard here. Can you clarify what you're referring to? |
@domenic Of course. I was referring to usage of the |
Oh, no, that's a feature; we use it within most WHATWG specs in fact. The Google style guide even mandates it. Tag omission (not just We have no intention of ever removing or changing such a useful feature. (Another example: the Google HTML style guide used to explicitly recommend it, and now doesn't do that but does give an example of best practices that omits end tags.) |
@domenic I can see why tag omission should be ok, but the rules for |
Well, it would probably involve changes to custom element parsing, as has been discussed in WICG/webcomponents#59, WICG/webcomponents#113, and WICG/webcomponents#624. |
@tomberek we don't do backwards incompatible changes. Breaking the web is not an option. (We also don't do versioning. The HTML Standard just keeps getting new features and you're participating in its development right here.) |
@annevk I'm still working my way through the spec, learning about how things are done. Thanks.
@rniwa Would a way ahead be to use the |
The issue is more fundamental than that. The HTML parser needs to be modified for this to work, and a naive approach won't be backwards compatible. |
A little bit earlier, yes ^_^ - tag omission dates back to very early HTML, in the mid-90s, while custom elements are only a few years old, beginning around 2011 or so. |
Closing as this isn't fixable without parser changes, which isn't worth it. |
Via https://bugs.chromium.org/p/chromium/issues/detail?id=700785. Given the code
should the resulting list be nested or not? Currently Chrome treats it as
But it seems like a reasonable author expectation for this to be
This has something to do with flat trees vs. not and so on, but I'm not familiar with the details. @hayatoito @rniwa @kochi @smaug---- @annevk?
The current spec for the ol/li part of this is the definitions of list owner and ordinal value. I'm not sure how those would be updated. Currently they use the term "parent", "ancestor", "closest inclusive ancestor", and "tree order"; maybe they should be using more shadow DOM-related versions of those?
The text was updated successfully, but these errors were encountered: