Missing pseudo-class functions #1

Closed
NiedziolkaMichal wants to merge 1 commit from patch-1 into main
NiedziolkaMichal commented 2022-09-30 14:38:42 +02:00 (Migrated from github.com)

I added missing pseudo-classes which are supposed to be used with an argument.
Pseudo-class :host can be used with or without them.

I added missing pseudo-classes which are supposed to be used with an argument. Pseudo-class :host can be used [with](https://developer.mozilla.org/en-US/docs/Web/CSS/:host) or [without](https://developer.mozilla.org/en-US/docs/Web/CSS/:host_function) them.
marijnh commented 2022-10-07 08:39:35 +02:00 (Migrated from github.com)

host doesn't seem to accept arguments, so it doesn't need to be explicitly handled. where and is expect a selector, so they should be handled in UnaryQuery. not is already handled there. Does attached patch work for you?

`host` doesn't seem to accept arguments, so it doesn't need to be explicitly handled. `where` and `is` expect a selector, so they should be handled in `UnaryQuery`. `not` is already handled there. Does attached patch work for you?
NiedziolkaMichal commented 2022-10-07 14:02:11 +02:00 (Migrated from github.com)

UnaryQuery { @specialize[@name=UnaryQueryOp]<identifier, "not" | "only" | "is" | "where"> query } | doesn't seem to be right place for is or where, because UnaryQuery handles following case:

@media only not (width: 20px)

In this context keywords only and not are acceptable, but is and where are not. Also keyword only is acceptable only in media queries, there is no such pseudo-class or pseudo-element.

`UnaryQuery { @specialize[@name=UnaryQueryOp]<identifier, "not" | "only" | "is" | "where"> query } |` doesn't seem to be right place for `is` or `where`, because UnaryQuery handles following case: ```css @media only not (width: 20px) ``` In this context keywords `only` and `not` are acceptable, but `is` and `where` are not. Also keyword `only` is acceptable only in media queries, there is no such pseudo-class or pseudo-element.
marijnh commented 2022-10-09 19:00:39 +02:00 (Migrated from github.com)

You are right, those don't belong there (and were in fact already parsed correctly by the existing code).

You are right, those don't belong there (and were in fact already parsed correctly by the existing code).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/css!1
No description provided.