Last active
June 12, 2017 16:05
-
-
Save khromov/5342a374772c042816bc to your computer and use it in GitHub Desktop.
Bootstrap 3 Grid (Without the rest of the framework).
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
| /*! | |
| * Grid portion of Bootstrap under sc- namespace. | |
| * Classes: | |
| * sc-container-fluid, sc-row, sc-col-X-Y (like regular B3) | |
| * | |
| * For more info, see: | |
| * http://snippets.khromov.se/decoupled-bootstrap-3-grid/ | |
| * | |
| * Bootstrap v3.2.0 (http://getbootstrap.com) | |
| * Copyright 2011-2014 Twitter, Inc. | |
| * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
| */ | |
| /** Add box sizing **/ | |
| .sc-container-fluid * { | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| .sc-container-fluid *:before, | |
| .sc-container-fluid *:after { | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| .sc-container-fluid { | |
| /* | |
| padding-right: 15px; | |
| padding-left: 15px; | |
| */ | |
| margin-right: auto; | |
| margin-left: auto; | |
| overflow: hidden; | |
| } | |
| .sc-row { | |
| margin-right: -15px; | |
| margin-left: -15px; | |
| display: block; | |
| clear: both; | |
| } | |
| .sc-col-xs-1, .sc-col-sm-1, .sc-col-md-1, .sc-col-lg-1, .sc-col-xs-2, .sc-col-sm-2, .sc-col-md-2, .sc-col-lg-2, .sc-col-xs-3, .sc-col-sm-3, .sc-col-md-3, .sc-col-lg-3, .sc-col-xs-4, .sc-col-sm-4, .sc-col-md-4, .sc-col-lg-4, .sc-col-xs-5, .sc-col-sm-5, .sc-col-md-5, .sc-col-lg-5, .sc-col-xs-6, .sc-col-sm-6, .sc-col-md-6, .sc-col-lg-6, .sc-col-xs-7, .sc-col-sm-7, .sc-col-md-7, .sc-col-lg-7, .sc-col-xs-8, .sc-col-sm-8, .sc-col-md-8, .sc-col-lg-8, .sc-col-xs-9, .sc-col-sm-9, .sc-col-md-9, .sc-col-lg-9, .sc-col-xs-10, .sc-col-sm-10, .sc-col-md-10, .sc-col-lg-10, .sc-col-xs-11, .sc-col-sm-11, .sc-col-md-11, .sc-col-lg-11, .sc-col-xs-12, .sc-col-sm-12, .sc-col-md-12, .sc-col-lg-12 { | |
| position: relative; | |
| min-height: 1px; | |
| padding-right: 15px; | |
| padding-left: 15px; | |
| } | |
| .sc-col-xs-1, .sc-col-xs-2, .sc-col-xs-3, .sc-col-xs-4, .sc-col-xs-5, .sc-col-xs-6, .sc-col-xs-7, .sc-col-xs-8, .sc-col-xs-9, .sc-col-xs-10, .sc-col-xs-11, .sc-col-xs-12 { | |
| float: left; | |
| } | |
| .sc-col-xs-12 { | |
| width: 100%; | |
| } | |
| .sc-col-xs-11 { | |
| width: 91.66666667%; | |
| } | |
| .sc-col-xs-10 { | |
| width: 83.33333333%; | |
| } | |
| .sc-col-xs-9 { | |
| width: 75%; | |
| } | |
| .sc-col-xs-8 { | |
| width: 66.66666667%; | |
| } | |
| .sc-col-xs-7 { | |
| width: 58.33333333%; | |
| } | |
| .sc-col-xs-6 { | |
| width: 50%; | |
| } | |
| .sc-col-xs-5 { | |
| width: 41.66666667%; | |
| } | |
| .sc-col-xs-4 { | |
| width: 33.33333333%; | |
| } | |
| .sc-col-xs-3 { | |
| width: 25%; | |
| } | |
| .sc-col-xs-2 { | |
| width: 16.66666667%; | |
| } | |
| .sc-col-xs-1 { | |
| width: 8.33333333%; | |
| } | |
| .sc-col-xs-pull-12 { | |
| right: 100%; | |
| } | |
| .sc-col-xs-pull-11 { | |
| right: 91.66666667%; | |
| } | |
| .sc-col-xs-pull-10 { | |
| right: 83.33333333%; | |
| } | |
| .sc-col-xs-pull-9 { | |
| right: 75%; | |
| } | |
| .sc-col-xs-pull-8 { | |
| right: 66.66666667%; | |
| } | |
| .sc-col-xs-pull-7 { | |
| right: 58.33333333%; | |
| } | |
| .sc-col-xs-pull-6 { | |
| right: 50%; | |
| } | |
| .sc-col-xs-pull-5 { | |
| right: 41.66666667%; | |
| } | |
| .sc-col-xs-pull-4 { | |
| right: 33.33333333%; | |
| } | |
| .sc-col-xs-pull-3 { | |
| right: 25%; | |
| } | |
| .sc-col-xs-pull-2 { | |
| right: 16.66666667%; | |
| } | |
| .sc-col-xs-pull-1 { | |
| right: 8.33333333%; | |
| } | |
| .sc-col-xs-pull-0 { | |
| right: auto; | |
| } | |
| .sc-col-xs-push-12 { | |
| left: 100%; | |
| } | |
| .sc-col-xs-push-11 { | |
| left: 91.66666667%; | |
| } | |
| .sc-col-xs-push-10 { | |
| left: 83.33333333%; | |
| } | |
| .sc-col-xs-push-9 { | |
| left: 75%; | |
| } | |
| .sc-col-xs-push-8 { | |
| left: 66.66666667%; | |
| } | |
| .sc-col-xs-push-7 { | |
| left: 58.33333333%; | |
| } | |
| .sc-col-xs-push-6 { | |
| left: 50%; | |
| } | |
| .sc-col-xs-push-5 { | |
| left: 41.66666667%; | |
| } | |
| .sc-col-xs-push-4 { | |
| left: 33.33333333%; | |
| } | |
| .sc-col-xs-push-3 { | |
| left: 25%; | |
| } | |
| .sc-col-xs-push-2 { | |
| left: 16.66666667%; | |
| } | |
| .sc-col-xs-push-1 { | |
| left: 8.33333333%; | |
| } | |
| .sc-col-xs-push-0 { | |
| left: auto; | |
| } | |
| .sc-col-xs-offset-12 { | |
| margin-left: 100%; | |
| } | |
| .sc-col-xs-offset-11 { | |
| margin-left: 91.66666667%; | |
| } | |
| .sc-col-xs-offset-10 { | |
| margin-left: 83.33333333%; | |
| } | |
| .sc-col-xs-offset-9 { | |
| margin-left: 75%; | |
| } | |
| .sc-col-xs-offset-8 { | |
| margin-left: 66.66666667%; | |
| } | |
| .sc-col-xs-offset-7 { | |
| margin-left: 58.33333333%; | |
| } | |
| .sc-col-xs-offset-6 { | |
| margin-left: 50%; | |
| } | |
| .sc-col-xs-offset-5 { | |
| margin-left: 41.66666667%; | |
| } | |
| .sc-col-xs-offset-4 { | |
| margin-left: 33.33333333%; | |
| } | |
| .sc-col-xs-offset-3 { | |
| margin-left: 25%; | |
| } | |
| .sc-col-xs-offset-2 { | |
| margin-left: 16.66666667%; | |
| } | |
| .sc-col-xs-offset-1 { | |
| margin-left: 8.33333333%; | |
| } | |
| .sc-col-xs-offset-0 { | |
| margin-left: 0; | |
| } | |
| @media (min-width: 768px) { | |
| .sc-col-sm-1, .sc-col-sm-2, .sc-col-sm-3, .sc-col-sm-4, .sc-col-sm-5, .sc-col-sm-6, .sc-col-sm-7, .sc-col-sm-8, .sc-col-sm-9, .sc-col-sm-10, .sc-col-sm-11, .sc-col-sm-12 { | |
| float: left; | |
| } | |
| .sc-col-sm-12 { | |
| width: 100%; | |
| } | |
| .sc-col-sm-11 { | |
| width: 91.66666667%; | |
| } | |
| .sc-col-sm-10 { | |
| width: 83.33333333%; | |
| } | |
| .sc-col-sm-9 { | |
| width: 75%; | |
| } | |
| .sc-col-sm-8 { | |
| width: 66.66666667%; | |
| } | |
| .sc-col-sm-7 { | |
| width: 58.33333333%; | |
| } | |
| .sc-col-sm-6 { | |
| width: 50%; | |
| } | |
| .sc-col-sm-5 { | |
| width: 41.66666667%; | |
| } | |
| .sc-col-sm-4 { | |
| width: 33.33333333%; | |
| } | |
| .sc-col-sm-3 { | |
| width: 25%; | |
| } | |
| .sc-col-sm-2 { | |
| width: 16.66666667%; | |
| } | |
| .sc-col-sm-1 { | |
| width: 8.33333333%; | |
| } | |
| .sc-col-sm-pull-12 { | |
| right: 100%; | |
| } | |
| .sc-col-sm-pull-11 { | |
| right: 91.66666667%; | |
| } | |
| .sc-col-sm-pull-10 { | |
| right: 83.33333333%; | |
| } | |
| .sc-col-sm-pull-9 { | |
| right: 75%; | |
| } | |
| .sc-col-sm-pull-8 { | |
| right: 66.66666667%; | |
| } | |
| .sc-col-sm-pull-7 { | |
| right: 58.33333333%; | |
| } | |
| .sc-col-sm-pull-6 { | |
| right: 50%; | |
| } | |
| .sc-col-sm-pull-5 { | |
| right: 41.66666667%; | |
| } | |
| .sc-col-sm-pull-4 { | |
| right: 33.33333333%; | |
| } | |
| .sc-col-sm-pull-3 { | |
| right: 25%; | |
| } | |
| .sc-col-sm-pull-2 { | |
| right: 16.66666667%; | |
| } | |
| .sc-col-sm-pull-1 { | |
| right: 8.33333333%; | |
| } | |
| .sc-col-sm-pull-0 { | |
| right: auto; | |
| } | |
| .sc-col-sm-push-12 { | |
| left: 100%; | |
| } | |
| .sc-col-sm-push-11 { | |
| left: 91.66666667%; | |
| } | |
| .sc-col-sm-push-10 { | |
| left: 83.33333333%; | |
| } | |
| .sc-col-sm-push-9 { | |
| left: 75%; | |
| } | |
| .sc-col-sm-push-8 { | |
| left: 66.66666667%; | |
| } | |
| .sc-col-sm-push-7 { | |
| left: 58.33333333%; | |
| } | |
| .sc-col-sm-push-6 { | |
| left: 50%; | |
| } | |
| .sc-col-sm-push-5 { | |
| left: 41.66666667%; | |
| } | |
| .sc-col-sm-push-4 { | |
| left: 33.33333333%; | |
| } | |
| .sc-col-sm-push-3 { | |
| left: 25%; | |
| } | |
| .sc-col-sm-push-2 { | |
| left: 16.66666667%; | |
| } | |
| .sc-col-sm-push-1 { | |
| left: 8.33333333%; | |
| } | |
| .sc-col-sm-push-0 { | |
| left: auto; | |
| } | |
| .sc-col-sm-offset-12 { | |
| margin-left: 100%; | |
| } | |
| .sc-col-sm-offset-11 { | |
| margin-left: 91.66666667%; | |
| } | |
| .sc-col-sm-offset-10 { | |
| margin-left: 83.33333333%; | |
| } | |
| .sc-col-sm-offset-9 { | |
| margin-left: 75%; | |
| } | |
| .sc-col-sm-offset-8 { | |
| margin-left: 66.66666667%; | |
| } | |
| .sc-col-sm-offset-7 { | |
| margin-left: 58.33333333%; | |
| } | |
| .sc-col-sm-offset-6 { | |
| margin-left: 50%; | |
| } | |
| .sc-col-sm-offset-5 { | |
| margin-left: 41.66666667%; | |
| } | |
| .sc-col-sm-offset-4 { | |
| margin-left: 33.33333333%; | |
| } | |
| .sc-col-sm-offset-3 { | |
| margin-left: 25%; | |
| } | |
| .sc-col-sm-offset-2 { | |
| margin-left: 16.66666667%; | |
| } | |
| .sc-col-sm-offset-1 { | |
| margin-left: 8.33333333%; | |
| } | |
| .sc-col-sm-offset-0 { | |
| margin-left: 0; | |
| } | |
| } | |
| @media (min-width: 992px) { | |
| .sc-col-md-1, .sc-col-md-2, .sc-col-md-3, .sc-col-md-4, .sc-col-md-5, .sc-col-md-6, .sc-col-md-7, .sc-col-md-8, .sc-col-md-9, .sc-col-md-10, .sc-col-md-11, .sc-col-md-12 { | |
| float: left; | |
| } | |
| .sc-col-md-12 { | |
| width: 100%; | |
| } | |
| .sc-col-md-11 { | |
| width: 91.66666667%; | |
| } | |
| .sc-col-md-10 { | |
| width: 83.33333333%; | |
| } | |
| .sc-col-md-9 { | |
| width: 75%; | |
| } | |
| .sc-col-md-8 { | |
| width: 66.66666667%; | |
| } | |
| .sc-col-md-7 { | |
| width: 58.33333333%; | |
| } | |
| .sc-col-md-6 { | |
| width: 50%; | |
| } | |
| .sc-col-md-5 { | |
| width: 41.66666667%; | |
| } | |
| .sc-col-md-4 { | |
| width: 33.33333333%; | |
| } | |
| .sc-col-md-3 { | |
| width: 25%; | |
| } | |
| .sc-col-md-2 { | |
| width: 16.66666667%; | |
| } | |
| .sc-col-md-1 { | |
| width: 8.33333333%; | |
| } | |
| .sc-col-md-pull-12 { | |
| right: 100%; | |
| } | |
| .sc-col-md-pull-11 { | |
| right: 91.66666667%; | |
| } | |
| .sc-col-md-pull-10 { | |
| right: 83.33333333%; | |
| } | |
| .sc-col-md-pull-9 { | |
| right: 75%; | |
| } | |
| .sc-col-md-pull-8 { | |
| right: 66.66666667%; | |
| } | |
| .sc-col-md-pull-7 { | |
| right: 58.33333333%; | |
| } | |
| .sc-col-md-pull-6 { | |
| right: 50%; | |
| } | |
| .sc-col-md-pull-5 { | |
| right: 41.66666667%; | |
| } | |
| .sc-col-md-pull-4 { | |
| right: 33.33333333%; | |
| } | |
| .sc-col-md-pull-3 { | |
| right: 25%; | |
| } | |
| .sc-col-md-pull-2 { | |
| right: 16.66666667%; | |
| } | |
| .sc-col-md-pull-1 { | |
| right: 8.33333333%; | |
| } | |
| .sc-col-md-pull-0 { | |
| right: auto; | |
| } | |
| .sc-col-md-push-12 { | |
| left: 100%; | |
| } | |
| .sc-col-md-push-11 { | |
| left: 91.66666667%; | |
| } | |
| .sc-col-md-push-10 { | |
| left: 83.33333333%; | |
| } | |
| .sc-col-md-push-9 { | |
| left: 75%; | |
| } | |
| .sc-col-md-push-8 { | |
| left: 66.66666667%; | |
| } | |
| .sc-col-md-push-7 { | |
| left: 58.33333333%; | |
| } | |
| .sc-col-md-push-6 { | |
| left: 50%; | |
| } | |
| .sc-col-md-push-5 { | |
| left: 41.66666667%; | |
| } | |
| .sc-col-md-push-4 { | |
| left: 33.33333333%; | |
| } | |
| .sc-col-md-push-3 { | |
| left: 25%; | |
| } | |
| .sc-col-md-push-2 { | |
| left: 16.66666667%; | |
| } | |
| .sc-col-md-push-1 { | |
| left: 8.33333333%; | |
| } | |
| .sc-col-md-push-0 { | |
| left: auto; | |
| } | |
| .sc-col-md-offset-12 { | |
| margin-left: 100%; | |
| } | |
| .sc-col-md-offset-11 { | |
| margin-left: 91.66666667%; | |
| } | |
| .sc-col-md-offset-10 { | |
| margin-left: 83.33333333%; | |
| } | |
| .sc-col-md-offset-9 { | |
| margin-left: 75%; | |
| } | |
| .sc-col-md-offset-8 { | |
| margin-left: 66.66666667%; | |
| } | |
| .sc-col-md-offset-7 { | |
| margin-left: 58.33333333%; | |
| } | |
| .sc-col-md-offset-6 { | |
| margin-left: 50%; | |
| } | |
| .sc-col-md-offset-5 { | |
| margin-left: 41.66666667%; | |
| } | |
| .sc-col-md-offset-4 { | |
| margin-left: 33.33333333%; | |
| } | |
| .sc-col-md-offset-3 { | |
| margin-left: 25%; | |
| } | |
| .sc-col-md-offset-2 { | |
| margin-left: 16.66666667%; | |
| } | |
| .sc-col-md-offset-1 { | |
| margin-left: 8.33333333%; | |
| } | |
| .sc-col-md-offset-0 { | |
| margin-left: 0; | |
| } | |
| } | |
| @media (min-width: 1200px) { | |
| .sc-col-lg-1, .sc-col-lg-2, .sc-col-lg-3, .sc-col-lg-4, .sc-col-lg-5, .sc-col-lg-6, .sc-col-lg-7, .sc-col-lg-8, .sc-col-lg-9, .sc-col-lg-10, .sc-col-lg-11, .sc-col-lg-12 { | |
| float: left; | |
| } | |
| .sc-col-lg-12 { | |
| width: 100%; | |
| } | |
| .sc-col-lg-11 { | |
| width: 91.66666667%; | |
| } | |
| .sc-col-lg-10 { | |
| width: 83.33333333%; | |
| } | |
| .sc-col-lg-9 { | |
| width: 75%; | |
| } | |
| .sc-col-lg-8 { | |
| width: 66.66666667%; | |
| } | |
| .sc-col-lg-7 { | |
| width: 58.33333333%; | |
| } | |
| .sc-col-lg-6 { | |
| width: 50%; | |
| } | |
| .sc-col-lg-5 { | |
| width: 41.66666667%; | |
| } | |
| .sc-col-lg-4 { | |
| width: 33.33333333%; | |
| } | |
| .sc-col-lg-3 { | |
| width: 25%; | |
| } | |
| .sc-col-lg-2 { | |
| width: 16.66666667%; | |
| } | |
| .sc-col-lg-1 { | |
| width: 8.33333333%; | |
| } | |
| .sc-col-lg-pull-12 { | |
| right: 100%; | |
| } | |
| .sc-col-lg-pull-11 { | |
| right: 91.66666667%; | |
| } | |
| .sc-col-lg-pull-10 { | |
| right: 83.33333333%; | |
| } | |
| .sc-col-lg-pull-9 { | |
| right: 75%; | |
| } | |
| .sc-col-lg-pull-8 { | |
| right: 66.66666667%; | |
| } | |
| .sc-col-lg-pull-7 { | |
| right: 58.33333333%; | |
| } | |
| .sc-col-lg-pull-6 { | |
| right: 50%; | |
| } | |
| .sc-col-lg-pull-5 { | |
| right: 41.66666667%; | |
| } | |
| .sc-col-lg-pull-4 { | |
| right: 33.33333333%; | |
| } | |
| .sc-col-lg-pull-3 { | |
| right: 25%; | |
| } | |
| .sc-col-lg-pull-2 { | |
| right: 16.66666667%; | |
| } | |
| .sc-col-lg-pull-1 { | |
| right: 8.33333333%; | |
| } | |
| .sc-col-lg-pull-0 { | |
| right: auto; | |
| } | |
| .sc-col-lg-push-12 { | |
| left: 100%; | |
| } | |
| .sc-col-lg-push-11 { | |
| left: 91.66666667%; | |
| } | |
| .sc-col-lg-push-10 { | |
| left: 83.33333333%; | |
| } | |
| .sc-col-lg-push-9 { | |
| left: 75%; | |
| } | |
| .sc-col-lg-push-8 { | |
| left: 66.66666667%; | |
| } | |
| .sc-col-lg-push-7 { | |
| left: 58.33333333%; | |
| } | |
| .sc-col-lg-push-6 { | |
| left: 50%; | |
| } | |
| .sc-col-lg-push-5 { | |
| left: 41.66666667%; | |
| } | |
| .sc-col-lg-push-4 { | |
| left: 33.33333333%; | |
| } | |
| .sc-col-lg-push-3 { | |
| left: 25%; | |
| } | |
| .sc-col-lg-push-2 { | |
| left: 16.66666667%; | |
| } | |
| .sc-col-lg-push-1 { | |
| left: 8.33333333%; | |
| } | |
| .sc-col-lg-push-0 { | |
| left: auto; | |
| } | |
| .sc-col-lg-offset-12 { | |
| margin-left: 100%; | |
| } | |
| .sc-col-lg-offset-11 { | |
| margin-left: 91.66666667%; | |
| } | |
| .sc-col-lg-offset-10 { | |
| margin-left: 83.33333333%; | |
| } | |
| .sc-col-lg-offset-9 { | |
| margin-left: 75%; | |
| } | |
| .sc-col-lg-offset-8 { | |
| margin-left: 66.66666667%; | |
| } | |
| .sc-col-lg-offset-7 { | |
| margin-left: 58.33333333%; | |
| } | |
| .sc-col-lg-offset-6 { | |
| margin-left: 50%; | |
| } | |
| .sc-col-lg-offset-5 { | |
| margin-left: 41.66666667%; | |
| } | |
| .sc-col-lg-offset-4 { | |
| margin-left: 33.33333333%; | |
| } | |
| .sc-col-lg-offset-3 { | |
| margin-left: 25%; | |
| } | |
| .sc-col-lg-offset-2 { | |
| margin-left: 16.66666667%; | |
| } | |
| .sc-col-lg-offset-1 { | |
| margin-left: 8.33333333%; | |
| } | |
| .sc-col-lg-offset-0 { | |
| margin-left: 0; | |
| } | |
| } |
@richiebee There is an example of a two column layout in the blog post:
https://snippets.khromov.se/decoupled-bootstrap-3-grid/
This is just the grid, but you can read some more info in the post on how to compile just parts of Bootstrap.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice idea
what about a nave bar?