Last active
December 20, 2016 05:30
-
-
Save patorash/80dba4496a82da73429c4b1ac7f2e85a to your computer and use it in GitHub Desktop.
Bootstrap3でカラムを中央揃えにする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Bootstrap3でカラムを中央揃えにする | |
* | |
*/ | |
@for $i from 1 through ($grid-columns / 2) { | |
$columns: $i * 2; | |
$offset: ($grid-columns - $columns) / 2; | |
.col-xs-center-#{$columns} { | |
@include make-xs-column-offset($offset); | |
@include make-xs-column($columns); | |
} | |
} | |
@for $i from 1 through ($grid-columns / 2) { | |
$columns: $i * 2; | |
$offset: ($grid-columns - $columns) / 2; | |
.col-sm-center-#{$columns} { | |
@include make-sm-column-offset($offset); | |
@include make-sm-column($columns); | |
} | |
} | |
@for $i from 1 through ($grid-columns / 2) { | |
$columns: $i * 2; | |
$offset: ($grid-columns - $columns) / 2; | |
.col-md-center-#{$columns} { | |
@include make-md-column-offset($offset); | |
@include make-md-column($columns); | |
} | |
} | |
@for $i from 1 through ($grid-columns / 2) { | |
$columns: $i * 2; | |
$offset: ($grid-columns - $columns) / 2; | |
.col-lg-center-#{$columns} { | |
@include make-lg-column-offset($offset); | |
@include make-lg-column($columns); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment