Skip to content

Commit 93a4cf6

Browse files
authored
fix: remove unnecessary where selectors (#273)
### i removed ":where" selectors that were not adding value ## Checklist <!-- Example how to mark a checkbox:- - [x] I have performed a self-review of my own code. --> - [x] I have performed a self-review of my own code. - [x] I have commented on my code, particularly wherever it was hard to understand. - [x] I have made corresponding changes to the documentation. - [x] I have followed the code style of the project - [x] I have tested my code, and it works without errors ## Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/krshoss/gardevoir/blob/main/CODE_OF_CONDUCT.md) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Style Enhancements** - Streamlined button styling for improved consistency across button types, enhancing user interaction feedback with updated cursor styles. - Consolidated `font-family` declaration for better readability in global styles without affecting functionality. - Improved specificity in dialog element display rules, ensuring better control over visibility for dialogs that are not open. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 9865f44 commit 93a4cf6

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

src/components/forms.scss

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@
33
border: 1px solid currentColor;
44
}
55

6+
:where(button, [type="button"], [type="reset"], [type="submit"]) {
7+
-webkit-appearance: button;
8+
padding: 1px 6px;
9+
}
10+
611
:where(button) {
712
overflow: visible;
813
text-transform: none;
914
}
1015

11-
:where(button, [type="button"], [type="reset"], [type="submit"]) {
12-
-webkit-appearance: button;
13-
padding: 1px 6px;
14-
&:not(:disabled) {
15-
cursor: pointer;
16-
}
16+
:where(button):not(:disabled),
17+
:where([type="button"]):not(:disabled),
18+
:where([type="reset"]):not(:disabled),
19+
:where([type="submit"]):not(:disabled) {
20+
cursor: pointer;
1721
}
1822

1923
:where(input) {

src/components/global.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
:where(:root) {
1010
line-height: 1.5;
1111
box-sizing: border-box;
12-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
13-
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
12+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
1413
}
1514

1615
:where(main) {

src/components/other.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
position: absolute;
5656
right: 0;
5757
width: fit-content;
58+
}
5859

59-
&:not([open]) {
60-
display: none;
61-
}
60+
:where(dialog):not([open]) {
61+
display: none;
6262
}
6363

6464
:where(summary) {

0 commit comments

Comments
 (0)