Skip to content

Commit

Permalink
feat: add the top offset mixin and CSS variable (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Aug 25, 2023
1 parent a0b6dad commit 45337f1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions assets/hb/scss/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@mixin top-offset($position:"") {
@if $position != "" {
position: $position;
}

top: var(--#{$prefix}top-offset);
}
3 changes: 3 additions & 0 deletions assets/hb/scss/_root.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:root {
--#{$prefix}top-offset: 0;
}
3 changes: 3 additions & 0 deletions assets/hb/scss/_utilities.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.hb-top-offset {
top: var(--#{$prefix}top-offset);
}
3 changes: 3 additions & 0 deletions assets/hb/scss/index.tmpl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
@import "../../scss/bootstrap/variables-dark";
@import "../../scss/bootstrap/maps";
@import "mixins";
@import "../../scss/bootstrap/mixins";
@import "../../scss/bootstrap/utilities";
// Layout & components
@import "root";
@import "../../scss/bootstrap/root";
@import "../../scss/bootstrap/reboot";
@import "../../scss/bootstrap/type";
Expand Down Expand Up @@ -55,6 +57,7 @@
// Utilities
@import "../../scss/bootstrap/utilities/api";
@import "utilities";
// Modules
{{- range resources.Match "hb/modules/*/scss/index.scss" }}
Expand Down

0 comments on commit 45337f1

Please sign in to comment.