Skip to content

Commit

Permalink
Add some :where()
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaVerou committed Aug 13, 2024
1 parent 7143d5f commit dfe3149
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src-css/_defs.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$font-sans: 'Helvetica Neue', sans-serif;
$font-sans: system-ui, 'Helvetica Neue', sans-serif;
$font-mono: Consolas, Monaco, monospace;

@mixin highlight($color, $important: "") {
Expand Down
15 changes: 5 additions & 10 deletions src-css/mavo.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
@import 'defs';

// Polyfill
[mv-app] [hidden] {
display: none;
}

.mv-danger:enabled:hover {
box-shadow: 0 0 10em #b00 inset;
color: white;
Expand All @@ -14,7 +9,7 @@
@include highlight(hsla(58, 100%, 50%, .5));
}

.mv-item-bar.mv-ui {
.mv-item-bar:where(.mv-ui) {
all: initial;
position: absolute;
z-index: 10;
Expand Down Expand Up @@ -192,7 +187,7 @@ button.mv-close {
}
}

[mv-app] {
:where([mv-app]) {
[property].mv-multiline {
white-space: pre-line;
}
Expand All @@ -203,7 +198,7 @@ button.mv-close {
}

// Is this really needed?!
&:not([mv-permissions~="add"]) button.mv-add {
&:where(:not([mv-permissions~="add"])) button.mv-add {
display: none;
}

Expand All @@ -212,7 +207,7 @@ button.mv-close {
}

// Looking to change the hiding logic? Perhaps Primitive#empty is a better place
.mv-empty:not([mv-mode="edit"]):not(td):not(th) {
.mv-empty:where(:not([mv-mode="edit"]):not(td):not(th)) {
display: none;
}

Expand All @@ -234,7 +229,7 @@ button.mv-close {
}
}

[mv-progress="Loading"]:not(.mv-no-hiding-during-loading) [mv-list-item] {
:where([mv-progress="Loading"]:not(.mv-no-hiding-during-loading)) [mv-list-item] {
display: none;
}

Expand Down

0 comments on commit dfe3149

Please sign in to comment.