-
Notifications
You must be signed in to change notification settings - Fork 204
Add support for ::picker
, ::picker-icon
and ::checkmark
#957
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
Conversation
src/selector.rs
Outdated
@@ -1213,6 +1229,14 @@ where | |||
part.to_css(dest)?; | |||
dest.write_char(')') | |||
} | |||
Picker => dest.write_str("::picker"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can support the non-functional form of ::picker
for now, though it won’t work until other form controls beyond <select>
support it per https://drafts.csswg.org/css-forms-1/#picker-pseudo.
Note
The non-functional form of ::picker() currently doesn’t work to prevent unintended styling of pickers as new pickers become supported. Once styling for all form control pickers is finalized, this non-functional form will work for all pickers.
@lucasweng thank you! |
src/selector.rs
Outdated
@@ -953,6 +958,17 @@ pub enum PseudoElement<'i> { | |||
/// A part name selector. | |||
part: ViewTransitionPartSelector<'i>, | |||
}, | |||
/// The [::picker](https://drafts.csswg.org/css-forms-1/#the-picker-pseudo-element) pseudo element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually supported? The spec seems to suggest that only the functional form is allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the non-functional form and added tests for ::picker
. Thanks! afac67a
Lightningcss shouldn’t add work in progress or non-standard spec. These pseudo selectors are experimental and might change in the future. Chrome isn’t the only web engine out there. |
It's in an official w3c spec, and one of the editors is from Apple so presumably they will support it in the future? I don't see any harm here. |
Just to clarify, even if a spec is officially recognized, it doesn’t mean that core editing and changes won’t happen. “official” doesn’t necessarily mean “standard.” In fact, many times in the past, CSS properties have been renamed just before becoming a standard and leaving the working draft stage. So, any spec document marked as Working Draft (WD) status is subject to change at any time without any prior notice. In this case, all the above specs are also pretty new and unstable. |
Closes #942
Adds support for