Add compact/comfortable utility mixins

This commit is contained in:
Abe Jellinek 2023-10-20 12:05:57 -04:00 committed by Dan Stillman
parent c6ad31ca0a
commit 8b9d8b1be5
2 changed files with 34 additions and 0 deletions

View file

@ -3,6 +3,7 @@
@import "abstracts/variables"; @import "abstracts/variables";
@import "abstracts/functions"; @import "abstracts/functions";
@import "abstracts/mixins";
@import "abstracts/placeholders"; @import "abstracts/placeholders";
@import "abstracts/utilities"; @import "abstracts/utilities";
@import "abstracts/split-button"; @import "abstracts/split-button";

View file

@ -0,0 +1,33 @@
//
// Mixins
// --------------------------------------------------
@mixin compact {
$selector: &;
@at-root [zoteroUIDensity="compact"] {
@if $selector {
#{$selector} {
@content;
}
}
@else {
@content;
}
}
}
@mixin comfortable {
$selector: &;
@at-root [zoteroUIDensity="comfortable"] {
@if $selector {
#{$selector} {
@content;
}
}
@else {
@content;
}
}
}