From 3338d35990353cc7cc72607d723df95f07269c65 Mon Sep 17 00:00:00 2001 From: Dakuan Date: Tue, 6 May 2014 10:41:02 +0100 Subject: [PATCH] at-breakpoint --- less/mixins/grid.less | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/less/mixins/grid.less b/less/mixins/grid.less index c2c6f0e757ec..158edcd7a898 100644 --- a/less/mixins/grid.less +++ b/less/mixins/grid.less @@ -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); +}