Skip to content

Commit

Permalink
Added a screen offset utility class
Browse files Browse the repository at this point in the history
  • Loading branch information
extrabright committed Dec 8, 2022
1 parent 0a36dc8 commit fc9cd74
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions scss/utilities/static/_helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,38 @@
//

.scrollable-x {
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
-ms-overflow-style: -ms-autohiding-scrollbar;
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
-ms-overflow-style: -ms-autohiding-scrollbar;

&::-webkit-scrollbar {
display: none;
}
&::-webkit-scrollbar {
display: none;
}
}

.scrollable-y {
white-space: nowrap;
overflow-x: hidden;
overflow-y: auto;
-ms-overflow-style: -ms-autohiding-scrollbar;
white-space: nowrap;
overflow-x: hidden;
overflow-y: auto;
-ms-overflow-style: -ms-autohiding-scrollbar;

&::-webkit-scrollbar {
display: none;
}
&::-webkit-scrollbar {
display: none;
}
}


// Screen offset based on screen sizes
@each $size, $value in $screen-widths {
.offset-left-#{$size} {
padding-left: max($grid-gutter-width * 0.5, calc((100% - $value) / 2 + $grid-gutter-width * 0.5));
}
.offset-right-#{$size} {
padding-right: max($grid-gutter-width * 0.5, calc((100% - $value) / 2 + $grid-gutter-width * 0.5));
}
}

// Fading elements

[class*="faded"],
Expand Down

0 comments on commit fc9cd74

Please sign in to comment.