Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
adc2c779
Commit
adc2c779
authored
12 years ago
by
Mark Otto
Browse files
Options
Download
Email Patches
Plain Diff
grid vars updated
parent
b8b266ca
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
docs/customize.html
+7
-7
docs/customize.html
docs/templates/pages/customize.mustache
+7
-7
docs/templates/pages/customize.mustache
less/forms.less
+1
-1
less/forms.less
less/grid.less
+1
-1
less/grid.less
less/layouts.less
+2
-2
less/layouts.less
less/mixins.less
+20
-20
less/mixins.less
less/navbar.less
+1
-1
less/navbar.less
less/responsive-1200px-min.less
+2
-2
less/responsive-1200px-min.less
less/responsive-768px-979px.less
+1
-1
less/responsive-768px-979px.less
less/variables.less
+10
-10
less/variables.less
with
52 additions
and
52 deletions
+52
-52
docs/customize.html
+
7
-
7
View file @
adc2c779
...
...
@@ -249,19 +249,19 @@
<input
type=
"text"
class=
"span3"
placeholder=
"darken(@link-color, 15%)"
>
<h3>
Grid system
</h3>
<label>
@grid
C
olumns
</label>
<label>
@grid
-c
olumns
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"12"
>
<label>
@grid
C
olumn
W
idth
</label>
<label>
@grid
-c
olumn
-w
idth
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"60px"
>
<label>
@grid
G
utter
W
idth
</label>
<label>
@grid
-g
utter
-w
idth
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
<label>
@grid
C
olumn
W
idth1200
</label>
<label>
@grid
-c
olumn
-w
idth
-
1200
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"70px"
>
<label>
@grid
G
utter
W
idth1200
</label>
<label>
@grid
-g
utter
-w
idth
-
1200
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"30px"
>
<label>
@grid
C
olumn
W
idth768
</label>
<label>
@grid
-c
olumn
-w
idth
-
768
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"42px"
>
<label>
@grid
G
utter
W
idth768
</label>
<label>
@grid
-g
utter
-w
idth
-
768
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
</div>
<!-- /span -->
...
...
This diff is collapsed.
Click to expand it.
docs/templates/pages/customize.mustache
+
7
-
7
View file @
adc2c779
...
...
@@ -181,19 +181,19 @@
<input
type=
"text"
class=
"span3"
placeholder=
"darken(@link-color, 15%)"
>
<h3>
{{
_i
}}
Grid system
{{/
i
}}
</h3>
<label>
@grid
C
olumns
</label>
<label>
@grid
-c
olumns
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"12"
>
<label>
@grid
C
olumn
W
idth
</label>
<label>
@grid
-c
olumn
-w
idth
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"60px"
>
<label>
@grid
G
utter
W
idth
</label>
<label>
@grid
-g
utter
-w
idth
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
<label>
@grid
C
olumn
W
idth1200
</label>
<label>
@grid
-c
olumn
-w
idth
-
1200
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"70px"
>
<label>
@grid
G
utter
W
idth1200
</label>
<label>
@grid
-g
utter
-w
idth
-
1200
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"30px"
>
<label>
@grid
C
olumn
W
idth768
</label>
<label>
@grid
-c
olumn
-w
idth
-
768
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"42px"
>
<label>
@grid
G
utter
W
idth768
</label>
<label>
@grid
-g
utter
-w
idth
-
768
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
</div>
<!-- /span -->
...
...
This diff is collapsed.
Click to expand it.
less/forms.less
+
1
-
1
View file @
adc2c779
...
...
@@ -291,7 +291,7 @@ textarea[class*="span"],
}
.controls-row {
#grid > .input(@grid
C
olumn
W
idth, @grid
G
utter
W
idth, @grid
RowW
idth);
#grid > .input(@grid
-c
olumn
-w
idth, @grid
-g
utter
-w
idth, @grid
-row-w
idth);
}
// Ensure input-prepend/append never wraps
...
...
This diff is collapsed.
Click to expand it.
less/grid.less
+
1
-
1
View file @
adc2c779
...
...
@@ -9,7 +9,7 @@
}
// Fixed (940px)
#grid > .core(@grid
C
olumn
W
idth, @grid
G
utter
W
idth, @grid
RowW
idth);
#grid > .core(@grid
-c
olumn
-w
idth, @grid
-g
utter
-w
idth, @grid
-row-w
idth);
// Reset utility classes due to specificity
[class*="span"].hide {
...
...
This diff is collapsed.
Click to expand it.
less/layouts.less
+
2
-
2
View file @
adc2c779
...
...
@@ -10,7 +10,7 @@
// Fluid layouts (left aligned, with sidebar, min- & max-width content)
.container-fluid {
padding-right: @grid
G
utter
W
idth;
padding-left: @grid
G
utter
W
idth;
padding-right: @grid
-g
utter
-w
idth;
padding-left: @grid
-g
utter
-w
idth;
.clearfix();
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
less/mixins.less
+
20
-
20
View file @
adc2c779
...
...
@@ -319,7 +319,7 @@
}
// CSS3 Content Columns
.content-columns(@columnCount, @columnGap: @grid
G
utter
W
idth) {
.content-columns(@columnCount, @columnGap: @grid
-g
utter
-w
idth) {
-webkit-column-count: @columnCount;
-moz-column-count: @columnCount;
column-count: @columnCount;
...
...
@@ -474,19 +474,19 @@
// Make a Grid
// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
.makeRow() {
margin-left: @grid
G
utter
W
idth * -1;
margin-left: @grid
-g
utter
-w
idth * -1;
.clearfix();
}
.makeColumn(@columns: 1, @offset: 0) {
float: left;
margin-left: (@grid
C
olumn
W
idth * @offset) + (@grid
G
utter
W
idth * (@offset - 1)) + (@grid
G
utter
W
idth * 2);
width: (@grid
C
olumn
W
idth * @columns) + (@grid
G
utter
W
idth * (@columns - 1));
margin-left: (@grid
-c
olumn
-w
idth * @offset) + (@grid
-g
utter
-w
idth * (@offset - 1)) + (@grid
-g
utter
-w
idth * 2);
width: (@grid
-c
olumn
-w
idth * @columns) + (@grid
-g
utter
-w
idth * (@columns - 1));
}
// The Grid
#grid {
.core(@grid
C
olumn
W
idth, @grid
G
utter
W
idth, @grid
RowW
idth) {
.core(@grid
-c
olumn
-w
idth, @grid
-g
utter
-w
idth, @grid
-row-w
idth) {
.spanX(@index) when (@index > 0) {
(~".span@{index}") { .span(@index); }
...
...
@@ -503,16 +503,16 @@
// Base styles
.offset(@columns) {
margin-left: percentage(@columns / @grid
C
olumns);
margin-left: percentage(@columns / @grid
-c
olumns);
}
.span(@columns) {
width: percentage(@columns / @grid
C
olumns);
width: percentage(@columns / @grid
-c
olumns);
}
.row {
// Negative indent the columns so text lines up
margin-left: @grid
G
utter
W
idth / -2;
margin-right: @grid
G
utter
W
idth / -2;
margin-left: @grid
-g
utter
-w
idth / -2;
margin-right: @grid
-g
utter
-w
idth / -2;
// Clear the floated columns
.clearfix();
}
...
...
@@ -520,8 +520,8 @@
[class*="span"] {
float: left; // Collapse whitespace
min-height: 1px; // Prevent empty columns from collapsing
padding-left: @grid
G
utter
W
idth / 2;
padding-right: @grid
G
utter
W
idth / 2;
padding-left: @grid
-g
utter
-w
idth / 2;
padding-right: @grid
-g
utter
-w
idth / 2;
// Proper box-model (padding doesnt' add to width)
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
...
...
@@ -529,13 +529,13 @@
}
// Generate .spanX and .offsetX
.spanX(@grid
C
olumns);
.offsetX(@grid
C
olumns);
.spanX(@grid
-c
olumns);
.offsetX(@grid
-c
olumns);
}
.input(@grid
C
olumn
W
idth, @grid
G
utter
W
idth, @grid
RowW
idth) {
.input(@grid
-c
olumn
-w
idth, @grid
-g
utter
-w
idth, @grid
-row-w
idth) {
.spanX(@index) when (@index > 0) {
(~"input.span@{index}, textarea.span@{index}, select.span@{index}, .uneditable-input.span@{index}") { .span(@index); }
...
...
@@ -552,20 +552,20 @@
.span(@columns) {
// TODO: Figure out how to add this back behind a class
// Part 1: Since inputs require padding *and* margin, we subtract the grid gutter width, as a percent of the row, from the default column width.
//width: percentage(@columns / @grid
C
olumns) - percentage(@grid
G
utter
W
idth / @grid
RowW
idth);
//width: percentage(@columns / @grid
-c
olumns) - percentage(@grid
-g
utter
-w
idth / @grid
-row-w
idth);
// Part 2: That subtracted width then gets split in half and added to the left and right margins.
// margin-left: percentage((@grid
G
utter
W
idth / 2) / @grid
RowW
idth);
// margin-right: percentage((@grid
G
utter
W
idth / 2) / @grid
RowW
idth);
// margin-left: percentage((@grid
-g
utter
-w
idth / 2) / @grid
-row-w
idth);
// margin-right: percentage((@grid
-g
utter
-w
idth / 2) / @grid
-row-w
idth);
}
.offset(@columns) {
// Take the normal offset margin and add an extra gutter's worth.
margin-left: percentage(@columns / @grid
C
olumns) + percentage((@grid
G
utter
W
idth / 2) / @grid
RowW
idth);
margin-left: percentage(@columns / @grid
-c
olumns) + percentage((@grid
-g
utter
-w
idth / 2) / @grid
-row-w
idth);
}
// Generate .spanX and .offsetX
.spanX(@grid
C
olumns);
.offsetX(@grid
C
olumns);
.spanX(@grid
-c
olumns);
.offsetX(@grid
-c
olumns);
}
...
...
This diff is collapsed.
Click to expand it.
less/navbar.less
+
1
-
1
View file @
adc2c779
...
...
@@ -173,7 +173,7 @@
.navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
#grid > .core > .span(@grid
C
olumns);
#grid > .core > .span(@grid
-c
olumns);
}
// Fixed to top
...
...
This diff is collapsed.
Click to expand it.
less/responsive-1200px-min.less
+
2
-
2
View file @
adc2c779
...
...
@@ -11,7 +11,7 @@
}
// Fixed grid
#grid > .core(@grid
C
olumn
W
idth1200, @grid
G
utter
W
idth1200, @grid
RowW
idth1200);
// #grid > .input(@grid
C
olumn
W
idth1200, @grid
G
utter
W
idth1200, @grid
RowW
idth1200);
#grid > .core(@grid
-c
olumn
-w
idth
-
1200, @grid
-g
utter
-w
idth
-
1200, @grid
-row-w
idth
-
1200);
// #grid > .input(@grid
-c
olumn
-w
idth
-
1200, @grid
-g
utter
-w
idth
-
1200, @grid
-row-w
idth
-
1200);
}
This diff is collapsed.
Click to expand it.
less/responsive-768px-979px.less
+
1
-
1
View file @
adc2c779
...
...
@@ -6,6 +6,6 @@
@media (min-width: 768px) and (max-width: 979px) {
// Fixed grid
#grid > .core(@grid
C
olumn
W
idth768, @grid
G
utter
W
idth768, @grid
RowW
idth768);
#grid > .core(@grid
-c
olumn
-w
idth
-
768, @grid
-g
utter
-w
idth
-
768, @grid
-row-w
idth
-
768);
}
This diff is collapsed.
Click to expand it.
less/variables.less
+
10
-
10
View file @
adc2c779
...
...
@@ -262,17 +262,17 @@
// --------------------------------------------------
// Default 940px grid
@grid
C
olumns: 12;
@grid
C
olumn
W
idth: 60px;
@grid
G
utter
W
idth: 20px;
@grid
RowW
idth: (@grid
C
olumns * @grid
C
olumn
W
idth) + (@grid
G
utter
W
idth * (@grid
C
olumns - 1));
@grid
-c
olumns: 12;
@grid
-c
olumn
-w
idth: 60px;
@grid
-g
utter
-w
idth: 20px;
@grid
-row-w
idth: (@grid
-c
olumns * @grid
-c
olumn
-w
idth) + (@grid
-g
utter
-w
idth * (@grid
-c
olumns - 1));
// 1200px min
@grid
C
olumn
W
idth1200: 70px;
@grid
G
utter
W
idth1200: 30px;
@grid
RowW
idth1200: (@grid
C
olumns * @grid
C
olumn
W
idth1200) + (@grid
G
utter
W
idth1200 * (@grid
C
olumns - 1));
@grid
-c
olumn
-w
idth
-
1200: 70px;
@grid
-g
utter
-w
idth
-
1200: 30px;
@grid
-row-w
idth
-
1200: (@grid
-c
olumns * @grid
-c
olumn
-w
idth
-
1200) + (@grid
-g
utter
-w
idth
-
1200 * (@grid
-c
olumns - 1));
// 768px-979px
@grid
C
olumn
W
idth768: 42px;
@grid
G
utter
W
idth768: 20px;
@grid
RowW
idth768: (@grid
C
olumns * @grid
C
olumn
W
idth768) + (@grid
G
utter
W
idth768 * (@grid
C
olumns - 1));
@grid
-c
olumn
-w
idth
-
768: 42px;
@grid
-g
utter
-w
idth
-
768: 20px;
@grid
-row-w
idth
-
768: (@grid
-c
olumns * @grid
-c
olumn
-w
idth
-
768) + (@grid
-g
utter
-w
idth
-
768 * (@grid
-c
olumns - 1));
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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