Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
efd3b0c1
Commit
efd3b0c1
authored
Apr 26, 2013
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Back to two grid classes, .col and .col-lg-*
parent
8ae9c6ab
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
240 additions
and
235 deletions
+240
-235
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+35
-38
docs/assets/css/docs.css
docs/assets/css/docs.css
+2
-2
docs/docs.html
docs/docs.html
+153
-153
less/grid.less
less/grid.less
+18
-12
less/mixins.less
less/mixins.less
+32
-30
No files found.
docs/assets/css/bootstrap.css
View file @
efd3b0c1
...
@@ -784,107 +784,98 @@ pre code {
...
@@ -784,107 +784,98 @@ pre code {
margin-left
:
-15px
;
margin-left
:
-15px
;
}
}
[
class
*=
"col-span-"
],
.col
{
[
class
*=
"col-small-"
]
{
position
:
relative
;
position
:
relative
;
float
:
left
;
width
:
100%
;
min-height
:
1px
;
min-height
:
1px
;
padding-right
:
15px
;
padding-right
:
15px
;
padding-left
:
15px
;
padding-left
:
15px
;
}
}
[
class
*=
"col-small-"
]
{
.col-sm-12
{
float
:
left
;
}
.col-small-span-12
{
width
:
100%
;
width
:
100%
;
}
}
.col-sm
all-span
-11
{
.col-sm-11
{
width
:
91.66666666666666%
;
width
:
91.66666666666666%
;
}
}
.col-sm
all-span
-10
{
.col-sm-10
{
width
:
83.33333333333334%
;
width
:
83.33333333333334%
;
}
}
.col-sm
all-span
-9
{
.col-sm-9
{
width
:
75%
;
width
:
75%
;
}
}
.col-sm
all-span
-8
{
.col-sm-8
{
width
:
66.66666666666666%
;
width
:
66.66666666666666%
;
}
}
.col-sm
all-span
-7
{
.col-sm-7
{
width
:
58.333333333333336%
;
width
:
58.333333333333336%
;
}
}
.col-sm
all-span
-6
{
.col-sm-6
{
width
:
50%
;
width
:
50%
;
}
}
.col-sm
all-span
-5
{
.col-sm-5
{
width
:
41.66666666666667%
;
width
:
41.66666666666667%
;
}
}
.col-sm
all-span
-4
{
.col-sm-4
{
width
:
33.33333333333333%
;
width
:
33.33333333333333%
;
}
}
.col-sm
all-span
-3
{
.col-sm-3
{
width
:
25%
;
width
:
25%
;
}
}
.col-sm
all-span
-2
{
.col-sm-2
{
width
:
16.666666666666664%
;
width
:
16.666666666666664%
;
}
}
.col-sm
all-span
-1
{
.col-sm-1
{
width
:
8.333333333333332%
;
width
:
8.333333333333332%
;
}
}
@media
screen
and
(
min-width
:
768px
)
{
@media
screen
and
(
min-width
:
768px
)
{
.container
{
.col-lg-12
{
max-width
:
728px
;
}
[
class
*=
"col-span-"
]
{
float
:
left
;
}
.col-span-12
{
width
:
100%
;
width
:
100%
;
}
}
.col-
span
-11
{
.col-
lg
-11
{
width
:
91.66666666666666%
;
width
:
91.66666666666666%
;
}
}
.col-
span
-10
{
.col-
lg
-10
{
width
:
83.33333333333334%
;
width
:
83.33333333333334%
;
}
}
.col-
span
-9
{
.col-
lg
-9
{
width
:
75%
;
width
:
75%
;
}
}
.col-
span
-8
{
.col-
lg
-8
{
width
:
66.66666666666666%
;
width
:
66.66666666666666%
;
}
}
.col-
span
-7
{
.col-
lg
-7
{
width
:
58.333333333333336%
;
width
:
58.333333333333336%
;
}
}
.col-
span
-6
{
.col-
lg
-6
{
width
:
50%
;
width
:
50%
;
}
}
.col-
span
-5
{
.col-
lg
-5
{
width
:
41.66666666666667%
;
width
:
41.66666666666667%
;
}
}
.col-
span
-4
{
.col-
lg
-4
{
width
:
33.33333333333333%
;
width
:
33.33333333333333%
;
}
}
.col-
span
-3
{
.col-
lg
-3
{
width
:
25%
;
width
:
25%
;
}
}
.col-
span
-2
{
.col-
lg
-2
{
width
:
16.666666666666664%
;
width
:
16.666666666666664%
;
}
}
.col-
span
-1
{
.col-
lg
-1
{
width
:
8.333333333333332%
;
width
:
8.333333333333332%
;
}
}
.col-offset-12
{
.col-offset-12
{
...
@@ -997,6 +988,12 @@ pre code {
...
@@ -997,6 +988,12 @@ pre code {
}
}
}
}
@media
screen
and
(
min-width
:
768px
)
{
.container
{
max-width
:
728px
;
}
}
@media
screen
and
(
min-width
:
992px
)
{
@media
screen
and
(
min-width
:
992px
)
{
.container
{
.container
{
max-width
:
940px
;
max-width
:
940px
;
...
@@ -1009,9 +1006,9 @@ pre code {
...
@@ -1009,9 +1006,9 @@ pre code {
}
}
}
}
[
class
*=
"col-span-"
]
.pull-right
{
/*
[class*="col-span-"].pull-right {
float: right;
float: right;
}
}
*/
table
{
table
{
max-width
:
100%
;
max-width
:
100%
;
...
...
docs/assets/css/docs.css
View file @
efd3b0c1
...
@@ -124,13 +124,13 @@ section > ul li {
...
@@ -124,13 +124,13 @@ section > ul li {
.show-grid
{
.show-grid
{
margin-bottom
:
15px
;
margin-bottom
:
15px
;
}
}
.show-grid
[
class
*=
"col-span-"
]
{
.show-grid
.col
{
padding-top
:
10px
;
padding-top
:
10px
;
padding-bottom
:
10px
;
padding-bottom
:
10px
;
background-color
:
#eee
;
background-color
:
#eee
;
border
:
1px
solid
#ddd
;
border
:
1px
solid
#ddd
;
}
}
.show-grid
[
class
*=
"col-span-"
]
:hover
{
.show-grid
.col
:hover
{
background-color
:
#ddd
;
background-color
:
#ddd
;
}
}
...
...
docs/docs.html
View file @
efd3b0c1
This diff is collapsed.
Click to expand it.
less/grid.less
View file @
efd3b0c1
...
@@ -12,29 +12,35 @@
...
@@ -12,29 +12,35 @@
.row {
.row {
.make-row();
.make-row();
}
}
[class*="col-span-"],
[class*="col-small-"] {
// Common styles for small and large grid columns
.col {
position: relative;
position: relative;
// Float and set width: 100%; for easy stacking on mobile devices
float: left;
width: 100%;
// Prevent columns from collapsing when empty
min-height: 1px;
min-height: 1px;
// Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
}
[class*="col-small-"] {
// Generate small grid classes first
float: left;
.generate-grid-columns(@grid-columns);
// Then generate the larger grid classes via media query
@media screen and (min-width: 768px) {
.generate-large-grid-columns(@grid-columns);
}
}
.generate-small-grid-columns(@grid-columns);
// Responsive: Tablets and up
// Responsive: Tablets and up
@media screen and (min-width: 768px) {
@media screen and (min-width: 768px) {
.container {
.container {
max-width: 728px;
max-width: 728px;
}
}
// Generate the grid columns and offsets
[class*="col-span-"] {
float: left;
}
.generate-grid-columns(@grid-columns);
}
}
// Responsive: Desktops and up
// Responsive: Desktops and up
...
@@ -52,6 +58,6 @@
...
@@ -52,6 +58,6 @@
}
}
// Reset utility classes due to specificity
// Reset utility classes due to specificity
[class*="col-span-"].pull-right {
/*
[class*="col-span-"].pull-right {
float: right;
float: right;
}
}
*/
less/mixins.less
View file @
efd3b0c1
...
@@ -412,13 +412,12 @@
...
@@ -412,13 +412,12 @@
// Generate the columns
// Generate the columns
.make-column(@columns) {
.make-column(@columns) {
@media (min-width: @grid-float-breakpoint) {
@media (min-width: @grid-float-breakpoint) {
float: left;
// Calculate width based on number of columns available
// Calculate width based on number of columns available
width: percentage((@columns / @grid-columns));
width: percentage((@columns / @grid-columns));
}
}
// Prevent columns from collapsing when empty
// Prevent columns from collapsing when empty
min-height: 1px;
min-height: 1px;
//
Set inner padding as gutters instead of margin
//
Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
}
...
@@ -451,15 +450,40 @@
...
@@ -451,15 +450,40 @@
//
The Grid
//
Small grid columns
.generate-grid-columns(@grid-columns) {
.generate-grid-columns(@grid-columns) {
// Default columns
.col-sm-X (@index) when (@index > 0) {
.col-span-X (@index) when (@index > 0) {
.col-sm-@{index} { .col-sm-(@index); }
.col-span-@{index} { .col-span-(@index); }
.col-sm-X((@index - 1));
.col-span-X((@index - 1));
}
.col-sm-X (0) {}
// Generate columns
.col-sm-X(@grid-columns);
// Apply the styles
.col-sm-(@columns) {
width: percentage((@columns / @grid-columns));
}
}
// Large grid columns
.generate-large-grid-columns(@grid-columns) {
.col-lg-X (@index) when (@index > 0) {
.col-lg-@{index} { .col-lg-(@index); }
.col-lg-X((@index - 1));
}
.col-lg-X (0) {}
// Generate the columns
.col-lg-X(@grid-columns);
// Apply the styles
.col-lg-(@columns) {
width: percentage((@columns / @grid-columns));
}
}
.col-span-X(0) {}
// Offsets (gaps between columns)
// Offsets (gaps between columns)
.col-offset-X (@index) when (@index > 0) {
.col-offset-X (@index) when (@index > 0) {
...
@@ -483,9 +507,6 @@
...
@@ -483,9 +507,6 @@
.col-pull-X (0) {}
.col-pull-X (0) {}
// Apply the styles
// Apply the styles
.col-span-(@columns) {
width: percentage((@columns / @grid-columns));
}
.col-offset-(@columns) {
.col-offset-(@columns) {
margin-left: percentage((@columns / @grid-columns));
margin-left: percentage((@columns / @grid-columns));
}
}
...
@@ -497,30 +518,11 @@
...
@@ -497,30 +518,11 @@
}
}
// Generate .spanX and .offsetX
// Generate .spanX and .offsetX
.col-span-X(@grid-columns);
.col-offset-X(@grid-columns);
.col-offset-X(@grid-columns);
.col-push-X(@grid-columns);
.col-push-X(@grid-columns);
.col-pull-X(@grid-columns);
.col-pull-X(@grid-columns);
}
}
// Small device grid
.generate-small-grid-columns(@grid-columns) {
// Deterimine the classes
.col-small-span-X (@index) when (@index > 0) {
.col-small-span-@{index} { .col-small-span-(@index); }
.col-small-span-X((@index - 1));
}
.col-small-span-X(0) {}
// Specify widths
.col-small-span-(@columns) {
width: percentage((@columns / @grid-columns));
}
// Generate the CSS
.col-small-span-X(@grid-columns);
}
// Framework mixins
// Framework mixins
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment