-
Notifications
You must be signed in to change notification settings - Fork 682
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
[css-shadow-parts] fully specify the parser for the forwarding micro-syntax #2412
Comments
Isn't this a duplicate of #2411 ? |
Not exactly. This one is for me to add a section to the spec with a grammar, it's just not worth doing until we have clearer agreement on #2411 |
13add36 adds a fully specified parser. I'd appreciate people sanity checking it. A couple of points:
|
Yes, you want to define this in terms of https://infra.spec.whatwg.org/ (Infra, not HTML). Since you're using Bikeshed you need to use Strict is good, but it seems you're not totally strict? Validity requires no whitespace, but you are stripping whitespace. You need to be clearer about what "space characters" means. I suspect you want to reference the ASCII whitespace definition. |
I think strict for everything except inter-token whitespace is what I wanted and matches most (all?) of the parsers in the HTML spec. I will update the links. Thanks. |
Yeah, but then you should incorporate that in the definition of what's valid and allow ASCII whitespace there. |
By the way, does this attribute only apply to HTML elements or to all elements? I guess only to HTML elements since shadow trees are restricted to them? |
Sorry for all the short thoughts, one other thing I think we want here is to eventually move this attribute definition into the HTML Standard. |
Makes total sense to me but e.g. look at Lists of floating-point numbers |
Valid is what is conforming for developers to write and what a validator would complain about. It has no effect on serialization (or parsing). I think HTML varies in where whitespace is allowed and examples in the HTML standard vary as to whether they are valid or not (there's some invalid examples to make a point). Here it probably makes sense to allow whitespace given the examples written thus far. |
Yeah, I'll change this spec to clearly allow whitespace. But just on the topic of the HTML, I'm not talking about examples, the spec itself is contradictory from one paragraph to the next E.g.
but then
So the parser for list of floats does not match the definition of "valid". Maybe I just picked a bad example to base my one on. |
Yeah, what you call "valid" is just "what should a validator check to see if it should complain about this?". It doesn't necessarily have any connection to what's actually accepted; there's often a lot of constraints there that make the set of accepted things much wider than the set of valid things. In this case, I think it's perfectly reasonable and good to have whitespace in your part mapping; I would be annoyed if a validator complained at me for it. So it should be included in the definition of validity. (Reviewing the spec now.) |
K, and reviewed. Lots of comments on the commit itself. |
@tabatkins Thanks. a0ec26c addresses lots of your comments. Still to do
|
One other commit that I didn't tag is b7893dc PTAL |
As discussed at Web Components F2F (2018-03, Tokyo) and in TAG issue update spec to include a fully specified parser.
The text was updated successfully, but these errors were encountered: