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
5054c17a
Commit
5054c17a
authored
12 years ago
by
Luke Page
Browse files
Options
Download
Email Patches
Plain Diff
make less files compile with strict maths in 1.4.0
parent
bfdc6f86
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
less/code.less
+4
-4
less/code.less
less/forms.less
+7
-7
less/forms.less
less/grid.less
+4
-4
less/grid.less
less/jumbotron.less
+1
-1
less/jumbotron.less
less/mixins.less
+7
-7
less/mixins.less
less/modals.less
+2
-2
less/modals.less
less/navbar.less
+5
-5
less/navbar.less
less/type.less
+19
-19
less/type.less
less/variables.less
+8
-8
less/variables.less
with
57 additions
and
57 deletions
+57
-57
less/code.less
+
4
-
4
View file @
5054c17a
...
@@ -8,7 +8,7 @@ code,
...
@@ -8,7 +8,7 @@ code,
pre {
pre {
padding: 0 3px 2px;
padding: 0 3px 2px;
#font > #family > .monospace;
#font > #family > .monospace;
font-size: @font-size-base - 2;
font-size:
(
@font-size-base - 2
)
;
color: @grayDark;
color: @grayDark;
border-radius: 4px;
border-radius: 4px;
}
}
...
@@ -25,9 +25,9 @@ code {
...
@@ -25,9 +25,9 @@ code {
// Blocks of code
// Blocks of code
pre {
pre {
display: block;
display: block;
padding: (@line-height-base - 1) / 2;
padding:
(
(@line-height-base - 1) / 2
)
;
margin: 0 0 @line-height-base / 2;
margin: 0 0
(
@line-height-base / 2
)
;
font-size: @font-size-base - 1; // 14px to 13px
font-size:
(
@font-size-base - 1
)
; // 14px to 13px
line-height: @line-height-base;
line-height: @line-height-base;
word-break: break-all;
word-break: break-all;
word-wrap: break-word;
word-wrap: break-word;
...
...
This diff is collapsed.
Click to expand it.
less/forms.less
+
7
-
7
View file @
5054c17a
...
@@ -21,8 +21,8 @@ legend {
...
@@ -21,8 +21,8 @@ legend {
width: 100%;
width: 100%;
padding: 0;
padding: 0;
margin-bottom: @line-height-base;
margin-bottom: @line-height-base;
font-size: @font-size-base * 1.5;
font-size:
(
@font-size-base * 1.5
)
;
line-height: @line-height-base * 2;
line-height:
(
@line-height-base * 2
)
;
color: @grayDark;
color: @grayDark;
border: 0;
border: 0;
border-bottom: 1px solid #e5e5e5;
border-bottom: 1px solid #e5e5e5;
...
@@ -58,7 +58,7 @@ input[type="color"] {
...
@@ -58,7 +58,7 @@ input[type="color"] {
.box-sizing(border-box); // Makes inputs behave like true block-level elements
.box-sizing(border-box); // Makes inputs behave like true block-level elements
min-height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
min-height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
padding: 6px 9px;
padding: 6px 9px;
// margin-bottom: @line-height-base / 2;
// margin-bottom:
(
@line-height-base / 2
)
;
font-size: @font-size-base;
font-size: @font-size-base;
line-height: @line-height-base;
line-height: @line-height-base;
color: @gray;
color: @gray;
...
@@ -168,7 +168,7 @@ textarea {
...
@@ -168,7 +168,7 @@ textarea {
.checkbox {
.checkbox {
display: block;
display: block;
min-height: @line-height-base; // clear the floating input if there is no label text
min-height: @line-height-base; // clear the floating input if there is no label text
margin-bottom: @line-height-base / 2;
margin-bottom:
(
@line-height-base / 2
)
;
padding-left: 20px;
padding-left: 20px;
label {
label {
display: inline;
display: inline;
...
@@ -186,7 +186,7 @@ textarea {
...
@@ -186,7 +186,7 @@ textarea {
}
}
.radio + .radio,
.radio + .radio,
.checkbox + .checkbox {
.checkbox + .checkbox {
margin-top: (@line-height-base / 4) * -1;
margin-top:
(
(@line-height-base / 4) * -1
)
;
}
}
// Move the options list down to align with labels
// Move the options list down to align with labels
...
@@ -359,7 +359,7 @@ select:focus:invalid {
...
@@ -359,7 +359,7 @@ select:focus:invalid {
.help-block {
.help-block {
display: block; // account for any element using help-block
display: block; // account for any element using help-block
margin-bottom: @line-height-base / 2;
margin-bottom:
(
@line-height-base / 2
)
;
}
}
.help-inline {
.help-inline {
...
@@ -530,7 +530,7 @@ select:focus:invalid {
...
@@ -530,7 +530,7 @@ select:focus:invalid {
// Float the labels left
// Float the labels left
.control-group > .control-label {
.control-group > .control-label {
float: left;
float: left;
width: @component-offset-horizontal - 20;
width:
(
@component-offset-horizontal - 20
)
;
padding-top: 6px;
padding-top: 6px;
text-align: right;
text-align: right;
}
}
...
...
This diff is collapsed.
Click to expand it.
less/grid.less
+
4
-
4
View file @
5054c17a
...
@@ -10,14 +10,14 @@
...
@@ -10,14 +10,14 @@
// Mobile-first defaults
// Mobile-first defaults
.row {
.row {
margin-left: @grid-gutter-width / -2;
margin-left:
(
@grid-gutter-width / -2
)
;
margin-right: @grid-gutter-width / -2;
margin-right:
(
@grid-gutter-width / -2
)
;
.clear_float();
.clear_float();
}
}
[class^="span"] {
[class^="span"] {
min-height: 1px;
min-height: 1px;
padding-left: @grid-gutter-width / 2;
padding-left:
(
@grid-gutter-width / 2
)
;
padding-right: @grid-gutter-width / 2;
padding-right:
(
@grid-gutter-width / 2
)
;
// Proper box-model (padding doesn't add to width)
// Proper box-model (padding doesn't add to width)
-webkit-box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-moz-box-sizing: border-box;
...
...
This diff is collapsed.
Click to expand it.
less/jumbotron.less
+
1
-
1
View file @
5054c17a
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
margin-bottom: 30px;
margin-bottom: 30px;
font-size: 21px;
font-size: 21px;
font-weight: 200;
font-weight: 200;
line-height: @line-height-base * 1.5;
line-height:
(
@line-height-base * 1.5
)
;
color: @jumbotron-lead-color;
color: @jumbotron-lead-color;
background-color: @jumbotron-background;
background-color: @jumbotron-background;
h1 {
h1 {
...
...
This diff is collapsed.
Click to expand it.
less/mixins.less
+
7
-
7
View file @
5054c17a
...
@@ -293,7 +293,7 @@
...
@@ -293,7 +293,7 @@
.opacity(@opacity) {
.opacity(@opacity) {
opacity: @opacity;
opacity: @opacity;
// IE8 filter
// IE8 filter
@opacity-ie: @opacity * 100;
@opacity-ie:
(
@opacity * 100
)
;
filter: ~"alpha(opacity=@{opacity-ie})";
filter: ~"alpha(opacity=@{opacity-ie})";
}
}
...
@@ -423,8 +423,8 @@
...
@@ -423,8 +423,8 @@
// Vertically center elements in the navbar.
// Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
.navbar-vertical-align(@element-height) {
.navbar-vertical-align(@element-height) {
margin-top: (@navbar-height - @element-height) / 2;
margin-top:
(
(@navbar-height - @element-height) / 2
)
;
margin-bottom: (@navbar-height - @element-height) / 2;
margin-bottom:
(
(@navbar-height - @element-height) / 2
)
;
}
}
...
@@ -471,22 +471,22 @@
...
@@ -471,22 +471,22 @@
.spanX (@index) when (@index > 0) {
.spanX (@index) when (@index > 0) {
.span@{index} { .span(@index); }
.span@{index} { .span(@index); }
.spanX(@index - 1);
.spanX(
(
@index - 1)
)
;
}
}
.spanX(0) {}
.spanX(0) {}
.offsetX (@index) when (@index > 0) {
.offsetX (@index) when (@index > 0) {
.offset@{index} { .offset(@index); }
.offset@{index} { .offset(@index); }
.offsetX(@index - 1);
.offsetX(
(
@index - 1)
)
;
}
}
.offsetX (0) {}
.offsetX (0) {}
// Base styles
// Base styles
.offset(@columns) {
.offset(@columns) {
margin-left: percentage(@columns / @grid-columns);
margin-left: percentage(
(
@columns / @grid-columns)
)
;
}
}
.span(@columns) {
.span(@columns) {
width: percentage(@columns / @grid-columns);
width: percentage(
(
@columns / @grid-columns)
)
;
}
}
// Generate .spanX and .offsetX
// Generate .spanX and .offsetX
...
...
This diff is collapsed.
Click to expand it.
less/modals.less
+
2
-
2
View file @
5054c17a
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
right: 0;
right: 0;
width: auto;
width: auto;
padding: 10px;
padding: 10px;
z-index: @zindex-modal-background + 10;
z-index:
(
@zindex-modal-background + 10
)
;
}
}
// Actual modal
// Actual modal
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
right: 0;
right: 0;
bottom: 0;
bottom: 0;
left: 0;
left: 0;
z-index: @zindex-modal-background - 10;
z-index:
(
@zindex-modal-background - 10
)
;
background-color: #000;
background-color: #000;
// Fade for backdrop
// Fade for backdrop
&.fade { .opacity(0); }
&.fade { .opacity(0); }
...
...
This diff is collapsed.
Click to expand it.
less/navbar.less
+
5
-
5
View file @
5054c17a
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
margin-top: 15px;
margin-top: 15px;
}
}
.nav > li > a {
.nav > li > a {
padding-top: (@navbar-height - @line-height-base) / 2;
padding-top:
(
(@navbar-height - @line-height-base) / 2
)
;
padding-bottom: (@navbar-height - @line-height-base) / 2;
padding-bottom:
(
(@navbar-height - @line-height-base) / 2
)
;
color: @navbar-link-color;
color: @navbar-link-color;
line-height: 20px;
line-height: 20px;
}
}
...
@@ -276,8 +276,8 @@
...
@@ -276,8 +276,8 @@
}
}
.navbar-brand {
.navbar-brand {
float: left;
float: left;
padding-top: (@navbar-height - @line-height-base) / 2;
padding-top:
(
(@navbar-height - @line-height-base) / 2
)
;
padding-bottom: (@navbar-height - @line-height-base) / 2;
padding-bottom:
(
(@navbar-height - @line-height-base) / 2
)
;
margin-left: -10px;
margin-left: -10px;
}
}
.navbar .nav {
.navbar .nav {
...
@@ -297,7 +297,7 @@
...
@@ -297,7 +297,7 @@
// Change the height and height, disable bottom border, then add right border
// Change the height and height, disable bottom border, then add right border
.navbar .nav > .divider {
.navbar .nav > .divider {
width: 1px;
width: 1px;
height: @navbar-height * .6;
height:
(
@navbar-height * .6
)
;
margin: (@navbar-height * .2) 9px;
margin: (@navbar-height * .2) 9px;
border-bottom: 0;
border-bottom: 0;
border-right: 1px solid lighten(@navbar-bg, 5%);
border-right: 1px solid lighten(@navbar-bg, 5%);
...
...
This diff is collapsed.
Click to expand it.
less/type.less
+
19
-
19
View file @
5054c17a
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
// -------------------------
// -------------------------
p {
p {
margin: 0 0 @line-height-base / 2;
margin: 0 0
(
@line-height-base / 2
)
;
}
}
.lead {
.lead {
margin-bottom: @line-height-base;
margin-bottom: @line-height-base;
font-size: @font-size-base * 1.5;
font-size:
(
@font-size-base * 1.5
)
;
font-weight: 200;
font-weight: 200;
line-height: 1.25;
line-height: 1.25;
}
}
...
@@ -68,28 +68,28 @@ h1,
...
@@ -68,28 +68,28 @@ h1,
h2,
h2,
h3 {
h3 {
margin-top: @line-height-base;
margin-top: @line-height-base;
margin-bottom: @line-height-base / 2;
margin-bottom:
(
@line-height-base / 2
)
;
line-height: @line-height-base * 2;
line-height:
(
@line-height-base * 2
)
;
}
}
h3 {
h3 {
line-height: @line-height-base * 1.5;
line-height:
(
@line-height-base * 1.5
)
;
}
}
h4,
h4,
h5,
h5,
h6 {
h6 {
margin-top: @line-height-base / 2;
margin-top:
(
@line-height-base / 2
)
;
margin-bottom: @line-height-base / 2;
margin-bottom:
(
@line-height-base / 2
)
;
}
}
h1 { font-size: @font-size-base * 2.75; font-size: 4rem; } // ~38px
h1 { font-size:
(
@font-size-base * 2.75
)
; font-size: 4rem; } // ~38px
h2 { font-size: @font-size-base * 2.25; font-size: 3rem; } // ~32px
h2 { font-size:
(
@font-size-base * 2.25
)
; font-size: 3rem; } // ~32px
h3 { font-size: @font-size-base * 1.75; font-size: 2.5rem; } // ~24px
h3 { font-size:
(
@font-size-base * 1.75
)
; font-size: 2.5rem; } // ~24px
h4 { font-size: @font-size-base * 1.25; font-size: 2rem; } // ~18px
h4 { font-size:
(
@font-size-base * 1.25
)
; font-size: 2rem; } // ~18px
h5 { font-size: @font-size-base; font-size: 1.6rem; }
h5 { font-size:
@font-size-base; font-size: 1.6rem; }
h6 { font-size: @font-size-base * 0.85; font-size: 1.2rem; } // ~12px
h6 { font-size:
(
@font-size-base * 0.85
)
; font-size: 1.2rem; } // ~12px
h1 small { font-size: @font-size-base * 1.75; } // ~24px
h1 small { font-size:
(
@font-size-base * 1.75
)
; } // ~24px
h2 small { font-size: @font-size-base * 1.25; } // ~18px
h2 small { font-size:
(
@font-size-base * 1.25
)
; } // ~18px
h3 small { font-size: @font-size-base; }
h3 small { font-size: @font-size-base; }
h4 small { font-size: @font-size-base; }
h4 small { font-size: @font-size-base; }
...
@@ -98,7 +98,7 @@ h4 small { font-size: @font-size-base; }
...
@@ -98,7 +98,7 @@ h4 small { font-size: @font-size-base; }
// -------------------------
// -------------------------
.page-header {
.page-header {
padding-bottom: (@line-height-base / 2) - 1;
padding-bottom:
(
(@line-height-base / 2) - 1
)
;
margin: (@line-height-base * 2) 0 @line-height-base;
margin: (@line-height-base * 2) 0 @line-height-base;
border-bottom: 1px solid @grayLighter;
border-bottom: 1px solid @grayLighter;
}
}
...
@@ -151,14 +151,14 @@ dt {
...
@@ -151,14 +151,14 @@ dt {
font-weight: bold;
font-weight: bold;
}
}
dd {
dd {
margin-left: @line-height-base / 2;
margin-left:
(
@line-height-base / 2
)
;
}
}
// Horizontal layout (like forms)
// Horizontal layout (like forms)
.dl-horizontal {
.dl-horizontal {
.clear_float(); // Ensure dl clears floats if empty dd elements present
.clear_float(); // Ensure dl clears floats if empty dd elements present
dt {
dt {
float: left;
float: left;
width: @component-offset-horizontal - 20;
width:
(
@component-offset-horizontal - 20
)
;
clear: left;
clear: left;
text-align: right;
text-align: right;
.text-overflow();
.text-overflow();
...
@@ -198,7 +198,7 @@ blockquote {
...
@@ -198,7 +198,7 @@ blockquote {
border-left: 5px solid @grayLighter;
border-left: 5px solid @grayLighter;
p {
p {
margin-bottom: 0;
margin-bottom: 0;
font-size: @font-size-base * 1.25;
font-size:
(
@font-size-base * 1.25
)
;
font-weight: 300;
font-weight: 300;
line-height: 1.25;
line-height: 1.25;
}
}
...
...
This diff is collapsed.
Click to expand it.
less/variables.less
+
8
-
8
View file @
5054c17a
...
@@ -46,9 +46,9 @@
...
@@ -46,9 +46,9 @@
@font-family-base: @font-family-sans-serif;
@font-family-base: @font-family-sans-serif;
@font-size-base: 14px;
@font-size-base: 14px;
@font-size-large: @font-size-base * 1.25; // ~18px
@font-size-large:
(
@font-size-base * 1.25
)
; // ~18px
@font-size-small: @font-size-base * 0.85; // ~12px
@font-size-small:
(
@font-size-base * 0.85
)
; // ~12px
@font-size-mini: @font-size-base * 0.75; // ~11px
@font-size-mini:
(
@font-size-base * 0.75
)
; // ~11px
@line-height-base: 20px;
@line-height-base: 20px;
...
@@ -115,9 +115,9 @@
...
@@ -115,9 +115,9 @@
@input-color-placeholder: @grayLight;
@input-color-placeholder: @grayLight;
@input-height-base: @line-height-base + 14px; // base line-height + 12px vertical padding + 2px top/bottom border
@input-height-base:
(
@line-height-base + 14px
)
; // base line-height + 12px vertical padding + 2px top/bottom border
@input-height-large: @line-height-base + 24px; // base line-height + 22px vertical padding + 2px top/bottom border
@input-height-large:
(
@line-height-base + 24px
)
; // base line-height + 22px vertical padding + 2px top/bottom border
@input-height-small: @line-height-base + 6px; // base line-height + 4px vertical padding + 2px top/bottom border
@input-height-small:
(
@line-height-base + 6px
)
; // base line-height + 4px vertical padding + 2px top/bottom border
// adjust min-height on input sizes
// adjust min-height on input sizes
...
@@ -266,7 +266,7 @@
...
@@ -266,7 +266,7 @@
@popover-title-background: darken(@popover-background, 3%);
@popover-title-background: darken(@popover-background, 3%);
// Special enhancement for popovers
// Special enhancement for popovers
@popover-arrow-outer-width: @popover-arrow-width + 1;
@popover-arrow-outer-width:
(
@popover-arrow-width + 1
)
;
@popover-arrow-outer-color: rgba(0,0,0,.25);
@popover-arrow-outer-color: rgba(0,0,0,.25);
...
@@ -315,4 +315,4 @@
...
@@ -315,4 +315,4 @@
@grid-columns: 12;
@grid-columns: 12;
@grid-column-width: 60px;
@grid-column-width: 60px;
@grid-gutter-width: 20px;
@grid-gutter-width: 20px;
@grid-row-width: (@grid-columns * @grid-column-width) + (@grid-gutter-width * (@grid-columns - 1));
@grid-row-width:
(
(@grid-columns * @grid-column-width) + (@grid-gutter-width * (@grid-columns - 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