Skip to content

Commit

Permalink
fix(Search): mini simplification of selectors (#2790)
Browse files Browse the repository at this point in the history
Minor missed tweak making the button-selectors a little bitt easier, and
a little bit smarter as they now also handle `button` without `type` set
πŸ˜‡
  • Loading branch information
eirikbacker authored Nov 17, 2024
1 parent 436b876 commit a0852fc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/css/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@

/* Render magnifier icon when no submit button, or submit button is empty */
&:not(:has(button:not([type='reset'])))::before,
& button[type='submit']:empty::before,
& button[type='button']:empty::before {
& button:not([type='reset']):empty::before {
background: currentcolor;
content: '';
height: var(--dsc-search-icon-size);
Expand Down Expand Up @@ -78,8 +77,7 @@
}
}

& button[type='submit'],
& button[type='button'] {
& button:not([type='reset']) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;

Expand All @@ -88,7 +86,7 @@
}
}

&:has(button[type='submit'], button[type='button']) {
&:has(button:not([type='reset'])) {
&::before {
display: none;
}
Expand Down

0 comments on commit a0852fc

Please sign in to comment.