Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/perf-selectpanel-has-selector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@primer/react': patch
---

perf(SelectPanel): Document acceptable :has() selector usage

Added documentation explaining why the :has(input:placeholder-shown) selector is acceptable.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@
.TextInput {
padding-left: var(--base-size-8) !important;

/* stylelint-disable-next-line selector-class-pattern */
/*
* NOTE: Uses descendant :has() - input is not direct child of TextInputWrapper
* due to TextInputInnerVisualSlot wrappers. This is acceptable performance
* as the search is scoped to this single element's subtree.
*/
/* stylelint-disable-next-line selector-class-pattern -- global class from TextInput */
&:has(input:placeholder-shown) :global(.TextInput-action) {
display: none;
}
Expand Down
Loading