Add support for ::picker, ::picker-icon and ::checkmark#957
Add support for ::picker, ::picker-icon and ::checkmark#957devongovett merged 2 commits intoparcel-bundler:masterfrom
::picker, ::picker-icon and ::checkmark#957Conversation
src/selector.rs
Outdated
| part.to_css(dest)?; | ||
| dest.write_char(')') | ||
| } | ||
| Picker => dest.write_str("::picker"), |
There was a problem hiding this comment.
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
| /// 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.
Is this actually supported? The spec seems to suggest that only the functional form is allowed.
There was a problem hiding this comment.
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