[Blueprint] Split the push and pull mixins into sub-mixins that separate the common styles from the ones that vary.
Added the following mixins: +push-base +push-margins +pull-base +pull-margins The generated css when using presentational class names will be smaller as a result.
This commit is contained in:
parent
5d4a885671
commit
3f16225556
@ -56,12 +56,16 @@
|
||||
+prepend(!n)
|
||||
// Use these classes on an element to push it into the
|
||||
// next column, or to pull it into the previous column.
|
||||
#{enumerate(".pull", 1, !blueprint_grid_columns)}
|
||||
+pull-base
|
||||
@for !n from 1 through !blueprint_grid_columns
|
||||
.pull-#{!n}
|
||||
+pull(!n)
|
||||
+pull-margins(!n)
|
||||
#{enumerate(".push", 1, !blueprint_grid_columns)}
|
||||
+push-base
|
||||
@for !n from 1 through !blueprint_grid_columns
|
||||
.push-#{!n}
|
||||
+push(!n)
|
||||
+push-margins(!n)
|
||||
|
||||
|
||||
// Columns
|
||||
@ -107,24 +111,32 @@
|
||||
=prepend(!n)
|
||||
:padding-left = (!blueprint_grid_outer_width) * !n
|
||||
|
||||
// mixin to a column to move it n columns to the left
|
||||
=pull(!n, !last = false)
|
||||
=pull-base
|
||||
+float-left
|
||||
:position relative
|
||||
|
||||
=pull-margins(!n, !last = false)
|
||||
@if !last
|
||||
:margin-left = (-!blueprint_grid_outer_width * !n) + !blueprint_grid_margin
|
||||
@else
|
||||
:margin-left = -!blueprint_grid_outer_width * !n
|
||||
|
||||
// mixin to a column to push it n columns to the right
|
||||
=push(!n)
|
||||
// mixin to a column to move it n columns to the left
|
||||
=pull(!n, !last = false)
|
||||
+pull-base
|
||||
+pull-margins(!n, !last)
|
||||
|
||||
=push-base
|
||||
+float-right
|
||||
:position relative
|
||||
:margin
|
||||
:top 0
|
||||
:right = -!blueprint_grid_outer_width * !n
|
||||
:bottom 1.5em
|
||||
:left = !blueprint_grid_outer_width * !n
|
||||
|
||||
=push-margins(!n)
|
||||
:margin= 0 (-!blueprint_grid_outer_width * !n) 1.5em (!blueprint_grid_outer_width * !n)
|
||||
|
||||
// mixin to a column to push it n columns to the right
|
||||
=push(!n)
|
||||
+push-base
|
||||
+push-margins(!n)
|
||||
|
||||
// Border on right hand side of a column.
|
||||
=border
|
||||
|
Loading…
Reference in New Issue
Block a user