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

at-breakpoint #13519

Closed
wants to merge 1 commit into from
Closed
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
27 changes: 27 additions & 0 deletions less/mixins/grid.less
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,30 @@
right: percentage((@columns / @grid-columns));
}
}

// Apply styles to elements when breakpoints are hit
.at-breakpoint(@break, @rules) {
@media (min-width: @break) {
@rules();
}
}

// Apply styles when extra small column size
.at-xs(@rules) {
.at-breakpoint(@screen-xs-min, @rules);
}

// Apply styles when small column size
.at-sm(@rules) {
.at-breakpoint(@screen-sm-min, @rules);
}

// Apply styles when medium column size
.at-md(@rules) {
.at-breakpoint(@screen-md-min, @rules);
}

// Apply styles when large column size
.at-lg(@rules) {
.at-breakpoint(@screen-lg-min, @rules);
}