Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overflow responsive variants #1157

Merged
merged 3 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/utilities/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Overflow utilities can also target x- and y-axes independently via:
* `.overflow-y-scroll`
* `.overflow-y-visible`

Overflow utilities can be applied or changed per [breakpoint](/objects/grid#breakpoints). Each **responsive** overflow utility is applied to the specified breakpoint and up, using the following formula: `overflow-[breakpoint]-[axis]-[property]`. For example: `overflow-x-scroll` or `overflow-md-x-visible`.

## Floats
Use `.float-left` and `.float-right` to set floats, and `.clearfix` to clear.
```html live
Expand Down
12 changes: 8 additions & 4 deletions src/utilities/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@
.v-align-baseline { vertical-align: baseline !important; }

// Overflow utilities
@each $overflow in (visible, hidden, auto, scroll) {
.overflow-#{$overflow} { overflow: $overflow !important; }
.overflow-x-#{$overflow} { overflow-x: $overflow !important; }
.overflow-y-#{$overflow} { overflow-y: $overflow !important; }
@each $breakpoint, $variant in $responsive-variants {
@include breakpoint($breakpoint) {
@each $overflow in (visible, hidden, auto, scroll) {
.overflow#{$variant}-#{$overflow} { overflow: $overflow !important; }
.overflow#{$variant}-x-#{$overflow} { overflow-x: $overflow !important; }
.overflow#{$variant}-y-#{$overflow} { overflow-y: $overflow !important; }
}
}
}

// Clear floats
Expand Down