Skip to content

Upstream parser quirks to syntax #6100

Closed

Description

@annevk

https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk and https://quirks.spec.whatwg.org/#the-unitless-length-quirk should really be defined in the CSS parser.

This will also clarify that the parser entry points need more arguments.

Activity

  1. tabatkins commented on Mar 15, 2021

    @tabatkins
    Member

    These belong in V&U, rather - the concepts are already well-defined in terms of the CSS parser's output, and in any case the parser isn't aware of specific grammars when it produces its structures, until the very last step when it :handwaves: turns blocks and declarations into rules and properties.

    I've retagged, but otherwise I agree that we should upstream these.

  2. annevk commented on Mar 16, 2021

    @annevk
    MemberAuthor

    Shouldn't the parser at least have the necessary context for that last step though? It seems misleading to suggest the parser only needs bytes. Or am I missing something?

  3. tabatkins commented on Mar 16, 2021

    @tabatkins
    Member

    Hm, yes, I suppose passing in the fact that you're doing quirks-mode parsing is relevant.

  4. css-meeting-bot commented on Mar 24, 2021

    @css-meeting-bot
    Member

    The CSS Working Group just discussed Upstream parser quirks to syntax, and agreed to the following:

    • RESOLVED: Add quicky hex color and quirky lengths to V&U
    • RESOLVED: Add a quirks mode flag to parsing algo and syntax which is passed to property specific parsers
    The full IRC log of that discussion <dael> Topic: Upstream parser quirks to syntax
    <dael> github: https://github.com//issues/6100
    <dael> TabAtkins: 2 simple bits
    <dael> TabAtkins: Ana pointed out there's parser quirks for hashless and unitless
    <dael> TabAtkins: In quirks spec
    <dael> TabAtkins: agreed in past we should try and upstream to relevant specs
    <dael> TabAtkins: agree can move in. Don't need to do anything in syntax b/c don't parse normally so should be in V&U where we define hashless hex and unitless length production
    <dael> TabAtkins: Notes about when in quirks mode we accept these
    <florian> q+
    <dael> TabAtkins: One syntax change is let you pass in that you're parsing in quirks mode into syntax parse. Parsing algo gneerically evokes do what you need to parse and that should get quirks mode flag explicitly so it knows to accept quirky hex and length
    <dael> TabAtkins: Asking for 2 resoltions. Add quicky hex color and quirky lengths to V&U
    <dael> TabAtkins: Add an explicit quirk flag for parsing algo in syntax that is invoked at point syntax spec asks you to parse these
    <astearns> ack florian
    <dael> florian: I believe I know answer, none of these quirks could disappear?
    <dael> TabAtkins: No, have been around for forever. As long as quirks mode exists, they will
    <dael> fantasai: Fine, but shove into an appendix
    <dael> TabAtkins: Happy to do that
    <dael> astearns: Other comments?
    <dael> RESOLVED: Add quicky hex color and quirky lengths to V&U
    <dael> TabAtkins: Add a quirks mode flag to parsing algo and syntax which is passed to property specific parsers
    <dael> astearns: Obj?
    <dael> florian: Questions - what passes it to parsing algo?
    <dael> TabAtkins: Collars. Things don't generally invoke those, but now they exist they can if necessary pass a quirks mode flag
    <dael> astearns: Objections
    <TabAtkins> s/Collars/Callers/
    <dael> RESOLVED: Add a quirks mode flag to parsing algo and syntax which is passed to property specific parsers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions