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
adc2c779
Commit
adc2c779
authored
Nov 30, 2012
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grid vars updated
parent
b8b266ca
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
52 additions
and
52 deletions
+52
-52
docs/customize.html
docs/customize.html
+7
-7
docs/templates/pages/customize.mustache
docs/templates/pages/customize.mustache
+7
-7
less/forms.less
less/forms.less
+1
-1
less/grid.less
less/grid.less
+1
-1
less/layouts.less
less/layouts.less
+2
-2
less/mixins.less
less/mixins.less
+20
-20
less/navbar.less
less/navbar.less
+1
-1
less/responsive-1200px-min.less
less/responsive-1200px-min.less
+2
-2
less/responsive-768px-979px.less
less/responsive-768px-979px.less
+1
-1
less/variables.less
less/variables.less
+10
-10
No files found.
docs/customize.html
View file @
adc2c779
...
@@ -249,19 +249,19 @@
...
@@ -249,19 +249,19 @@
<input
type=
"text"
class=
"span3"
placeholder=
"darken(@link-color, 15%)"
>
<input
type=
"text"
class=
"span3"
placeholder=
"darken(@link-color, 15%)"
>
<h3>
Grid system
</h3>
<h3>
Grid system
</h3>
<label>
@grid
C
olumns
</label>
<label>
@grid
-c
olumns
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"12"
>
<input
type=
"text"
class=
"span3"
placeholder=
"12"
>
<label>
@grid
ColumnW
idth
</label>
<label>
@grid
-column-w
idth
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"60px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"60px"
>
<label>
@grid
GutterW
idth
</label>
<label>
@grid
-gutter-w
idth
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
<label>
@grid
ColumnWidth
1200
</label>
<label>
@grid
-column-width-
1200
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"70px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"70px"
>
<label>
@grid
GutterWidth
1200
</label>
<label>
@grid
-gutter-width-
1200
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"30px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"30px"
>
<label>
@grid
ColumnWidth
768
</label>
<label>
@grid
-column-width-
768
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"42px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"42px"
>
<label>
@grid
GutterWidth
768
</label>
<label>
@grid
-gutter-width-
768
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
</div>
<!-- /span -->
</div>
<!-- /span -->
...
...
docs/templates/pages/customize.mustache
View file @
adc2c779
...
@@ -181,19 +181,19 @@
...
@@ -181,19 +181,19 @@
<input
type=
"text"
class=
"span3"
placeholder=
"darken(@link-color, 15%)"
>
<input
type=
"text"
class=
"span3"
placeholder=
"darken(@link-color, 15%)"
>
<h3>
{{
_i
}}
Grid system
{{/
i
}}
</h3>
<h3>
{{
_i
}}
Grid system
{{/
i
}}
</h3>
<label>
@grid
C
olumns
</label>
<label>
@grid
-c
olumns
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"12"
>
<input
type=
"text"
class=
"span3"
placeholder=
"12"
>
<label>
@grid
ColumnW
idth
</label>
<label>
@grid
-column-w
idth
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"60px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"60px"
>
<label>
@grid
GutterW
idth
</label>
<label>
@grid
-gutter-w
idth
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
<label>
@grid
ColumnWidth
1200
</label>
<label>
@grid
-column-width-
1200
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"70px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"70px"
>
<label>
@grid
GutterWidth
1200
</label>
<label>
@grid
-gutter-width-
1200
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"30px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"30px"
>
<label>
@grid
ColumnWidth
768
</label>
<label>
@grid
-column-width-
768
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"42px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"42px"
>
<label>
@grid
GutterWidth
768
</label>
<label>
@grid
-gutter-width-
768
</label>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
<input
type=
"text"
class=
"span3"
placeholder=
"20px"
>
</div>
<!-- /span -->
</div>
<!-- /span -->
...
...
less/forms.less
View file @
adc2c779
...
@@ -291,7 +291,7 @@ textarea[class*="span"],
...
@@ -291,7 +291,7 @@ textarea[class*="span"],
}
}
.controls-row {
.controls-row {
#grid > .input(@grid
ColumnWidth, @gridGutterWidth, @gridRowW
idth);
#grid > .input(@grid
-column-width, @grid-gutter-width, @grid-row-w
idth);
}
}
// Ensure input-prepend/append never wraps
// Ensure input-prepend/append never wraps
...
...
less/grid.less
View file @
adc2c779
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
}
}
// Fixed (940px)
// Fixed (940px)
#grid > .core(@grid
ColumnWidth, @gridGutterWidth, @gridRowW
idth);
#grid > .core(@grid
-column-width, @grid-gutter-width, @grid-row-w
idth);
// Reset utility classes due to specificity
// Reset utility classes due to specificity
[class*="span"].hide {
[class*="span"].hide {
...
...
less/layouts.less
View file @
adc2c779
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
// Fluid layouts (left aligned, with sidebar, min- & max-width content)
// Fluid layouts (left aligned, with sidebar, min- & max-width content)
.container-fluid {
.container-fluid {
padding-right: @grid
GutterW
idth;
padding-right: @grid
-gutter-w
idth;
padding-left: @grid
GutterW
idth;
padding-left: @grid
-gutter-w
idth;
.clearfix();
.clearfix();
}
}
\ No newline at end of file
less/mixins.less
View file @
adc2c779
...
@@ -319,7 +319,7 @@
...
@@ -319,7 +319,7 @@
}
}
// CSS3 Content Columns
// CSS3 Content Columns
.content-columns(@columnCount, @columnGap: @grid
GutterW
idth) {
.content-columns(@columnCount, @columnGap: @grid
-gutter-w
idth) {
-webkit-column-count: @columnCount;
-webkit-column-count: @columnCount;
-moz-column-count: @columnCount;
-moz-column-count: @columnCount;
column-count: @columnCount;
column-count: @columnCount;
...
@@ -474,19 +474,19 @@
...
@@ -474,19 +474,19 @@
// Make a Grid
// Make a Grid
// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
.makeRow() {
.makeRow() {
margin-left: @grid
GutterW
idth * -1;
margin-left: @grid
-gutter-w
idth * -1;
.clearfix();
.clearfix();
}
}
.makeColumn(@columns: 1, @offset: 0) {
.makeColumn(@columns: 1, @offset: 0) {
float: left;
float: left;
margin-left: (@grid
ColumnWidth * @offset) + (@gridGutterWidth * (@offset - 1)) + (@gridGutterW
idth * 2);
margin-left: (@grid
-column-width * @offset) + (@grid-gutter-width * (@offset - 1)) + (@grid-gutter-w
idth * 2);
width: (@grid
ColumnWidth * @columns) + (@gridGutterW
idth * (@columns - 1));
width: (@grid
-column-width * @columns) + (@grid-gutter-w
idth * (@columns - 1));
}
}
// The Grid
// The Grid
#grid {
#grid {
.core(@grid
ColumnWidth, @gridGutterWidth, @gridRowW
idth) {
.core(@grid
-column-width, @grid-gutter-width, @grid-row-w
idth) {
.spanX(@index) when (@index > 0) {
.spanX(@index) when (@index > 0) {
(~".span@{index}") { .span(@index); }
(~".span@{index}") { .span(@index); }
...
@@ -503,16 +503,16 @@
...
@@ -503,16 +503,16 @@
// Base styles
// Base styles
.offset(@columns) {
.offset(@columns) {
margin-left: percentage(@columns / @grid
C
olumns);
margin-left: percentage(@columns / @grid
-c
olumns);
}
}
.span(@columns) {
.span(@columns) {
width: percentage(@columns / @grid
C
olumns);
width: percentage(@columns / @grid
-c
olumns);
}
}
.row {
.row {
// Negative indent the columns so text lines up
// Negative indent the columns so text lines up
margin-left: @grid
GutterW
idth / -2;
margin-left: @grid
-gutter-w
idth / -2;
margin-right: @grid
GutterW
idth / -2;
margin-right: @grid
-gutter-w
idth / -2;
// Clear the floated columns
// Clear the floated columns
.clearfix();
.clearfix();
}
}
...
@@ -520,8 +520,8 @@
...
@@ -520,8 +520,8 @@
[class*="span"] {
[class*="span"] {
float: left; // Collapse whitespace
float: left; // Collapse whitespace
min-height: 1px; // Prevent empty columns from collapsing
min-height: 1px; // Prevent empty columns from collapsing
padding-left: @grid
GutterW
idth / 2;
padding-left: @grid
-gutter-w
idth / 2;
padding-right: @grid
GutterW
idth / 2;
padding-right: @grid
-gutter-w
idth / 2;
// Proper box-model (padding doesnt' add to width)
// Proper box-model (padding doesnt' add to width)
-webkit-box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-moz-box-sizing: border-box;
...
@@ -529,13 +529,13 @@
...
@@ -529,13 +529,13 @@
}
}
// Generate .spanX and .offsetX
// Generate .spanX and .offsetX
.spanX(@grid
C
olumns);
.spanX(@grid
-c
olumns);
.offsetX(@grid
C
olumns);
.offsetX(@grid
-c
olumns);
}
}
.input(@grid
ColumnWidth, @gridGutterWidth, @gridRowW
idth) {
.input(@grid
-column-width, @grid-gutter-width, @grid-row-w
idth) {
.spanX(@index) when (@index > 0) {
.spanX(@index) when (@index > 0) {
(~"input.span@{index}, textarea.span@{index}, select.span@{index}, .uneditable-input.span@{index}") { .span(@index); }
(~"input.span@{index}, textarea.span@{index}, select.span@{index}, .uneditable-input.span@{index}") { .span(@index); }
...
@@ -552,20 +552,20 @@
...
@@ -552,20 +552,20 @@
.span(@columns) {
.span(@columns) {
// TODO: Figure out how to add this back behind a class
// 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.
// 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
Columns) - percentage(@gridGutterWidth / @gridRowW
idth);
//width: percentage(@columns / @grid
-columns) - percentage(@grid-gutter-width / @grid-row-w
idth);
// Part 2: That subtracted width then gets split in half and added to the left and right margins.
// Part 2: That subtracted width then gets split in half and added to the left and right margins.
// margin-left: percentage((@grid
GutterWidth / 2) / @gridRowW
idth);
// margin-left: percentage((@grid
-gutter-width / 2) / @grid-row-w
idth);
// margin-right: percentage((@grid
GutterWidth / 2) / @gridRowW
idth);
// margin-right: percentage((@grid
-gutter-width / 2) / @grid-row-w
idth);
}
}
.offset(@columns) {
.offset(@columns) {
// Take the normal offset margin and add an extra gutter's worth.
// Take the normal offset margin and add an extra gutter's worth.
margin-left: percentage(@columns / @grid
Columns) + percentage((@gridGutterWidth / 2) / @gridRowW
idth);
margin-left: percentage(@columns / @grid
-columns) + percentage((@grid-gutter-width / 2) / @grid-row-w
idth);
}
}
// Generate .spanX and .offsetX
// Generate .spanX and .offsetX
.spanX(@grid
C
olumns);
.spanX(@grid
-c
olumns);
.offsetX(@grid
C
olumns);
.offsetX(@grid
-c
olumns);
}
}
...
...
less/navbar.less
View file @
adc2c779
...
@@ -173,7 +173,7 @@
...
@@ -173,7 +173,7 @@
.navbar-static-top .container,
.navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
.navbar-fixed-bottom .container {
#grid > .core > .span(@grid
C
olumns);
#grid > .core > .span(@grid
-c
olumns);
}
}
// Fixed to top
// Fixed to top
...
...
less/responsive-1200px-min.less
View file @
adc2c779
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
}
}
// Fixed grid
// Fixed grid
#grid > .core(@grid
ColumnWidth1200, @gridGutterWidth1200, @gridRowWidth
1200);
#grid > .core(@grid
-column-width-1200, @grid-gutter-width-1200, @grid-row-width-
1200);
// #grid > .input(@grid
ColumnWidth1200, @gridGutterWidth1200, @gridRowWidth
1200);
// #grid > .input(@grid
-column-width-1200, @grid-gutter-width-1200, @grid-row-width-
1200);
}
}
less/responsive-768px-979px.less
View file @
adc2c779
...
@@ -6,6 +6,6 @@
...
@@ -6,6 +6,6 @@
@media (min-width: 768px) and (max-width: 979px) {
@media (min-width: 768px) and (max-width: 979px) {
// Fixed grid
// Fixed grid
#grid > .core(@grid
ColumnWidth768, @gridGutterWidth768, @gridRowWidth
768);
#grid > .core(@grid
-column-width-768, @grid-gutter-width-768, @grid-row-width-
768);
}
}
less/variables.less
View file @
adc2c779
...
@@ -262,17 +262,17 @@
...
@@ -262,17 +262,17 @@
// --------------------------------------------------
// --------------------------------------------------
// Default 940px grid
// Default 940px grid
@grid
C
olumns: 12;
@grid
-c
olumns: 12;
@grid
ColumnW
idth: 60px;
@grid
-column-w
idth: 60px;
@grid
GutterW
idth: 20px;
@grid
-gutter-w
idth: 20px;
@grid
RowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridC
olumns - 1));
@grid
-row-width: (@grid-columns * @grid-column-width) + (@grid-gutter-width * (@grid-c
olumns - 1));
// 1200px min
// 1200px min
@grid
ColumnWidth
1200: 70px;
@grid
-column-width-
1200: 70px;
@grid
GutterWidth
1200: 30px;
@grid
-gutter-width-
1200: 30px;
@grid
RowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridC
olumns - 1));
@grid
-row-width-1200: (@grid-columns * @grid-column-width-1200) + (@grid-gutter-width-1200 * (@grid-c
olumns - 1));
// 768px-979px
// 768px-979px
@grid
ColumnWidth
768: 42px;
@grid
-column-width-
768: 42px;
@grid
GutterWidth
768: 20px;
@grid
-gutter-width-
768: 20px;
@grid
RowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridC
olumns - 1));
@grid
-row-width-768: (@grid-columns * @grid-column-width-768) + (@grid-gutter-width-768 * (@grid-c
olumns - 1));
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