diff options
| author | fat <[email protected]> | 2013-02-07 22:13:13 -0800 |
|---|---|---|
| committer | fat <[email protected]> | 2013-02-07 22:13:13 -0800 |
| commit | 8c7f9c66a7d12f47f50618ef420868fe836d0c33 (patch) | |
| tree | 552f251d1637a1749c34fcdbb3390653d2fdb8ae /less/mixins.less | |
| parent | ee91afba63bc6e9687397b9052858fca242c2ff5 (diff) | |
| parent | c4d47fb1ea45ed2fc3cf382d087ed87b87c69288 (diff) | |
| download | bootstrap-2.3.0.tar.xz bootstrap-2.3.0.zip | |
Merge branch '2.3.0-wip'v2.3.0
Diffstat (limited to 'less/mixins.less')
| -rw-r--r-- | less/mixins.less | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/less/mixins.less b/less/mixins.less index b734bab2d..79d889219 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -268,6 +268,12 @@ -o-transition-delay: @transition-delay; transition-delay: @transition-delay; } +.transition-duration(@transition-duration) { + -webkit-transition-duration: @transition-duration; + -moz-transition-duration: @transition-duration; + -o-transition-duration: @transition-duration; + transition-duration: @transition-duration; +} // Transformations .rotate(@degrees) { @@ -437,6 +443,17 @@ background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10 background-image: linear-gradient(@deg, @startColor, @endColor); // Standard, IE10 } + .horizontal-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { + background-color: mix(@midColor, @endColor, 80%); + background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); + background-image: -webkit-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); + background-image: -moz-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); + background-image: -o-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); + background-image: linear-gradient(to right, @startColor, @midColor @colorStop, @endColor); + background-repeat: no-repeat; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback + } + .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { background-color: mix(@midColor, @endColor, 80%); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); @@ -500,7 +517,7 @@ .reset-filter(); // in these cases the gradient won't cover the background, so we override - &:hover, &:active, &.active, &.disabled, &[disabled] { + &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] { color: @textColor; background-color: @endColor; *background-color: darken(@endColor, 5%); @@ -558,13 +575,13 @@ .core (@gridColumnWidth, @gridGutterWidth) { .spanX (@index) when (@index > 0) { - (~".span@{index}") { .span(@index); } + .span@{index} { .span(@index); } .spanX(@index - 1); } .spanX (0) {} .offsetX (@index) when (@index > 0) { - (~".offset@{index}") { .offset(@index); } + .offset@{index} { .offset(@index); } .offsetX(@index - 1); } .offsetX (0) {} @@ -603,14 +620,14 @@ .fluid (@fluidGridColumnWidth, @fluidGridGutterWidth) { .spanX (@index) when (@index > 0) { - (~".span@{index}") { .span(@index); } + .span@{index} { .span(@index); } .spanX(@index - 1); } .spanX (0) {} .offsetX (@index) when (@index > 0) { - (~'.offset@{index}') { .offset(@index); } - (~'.offset@{index}:first-child') { .offsetFirstChild(@index); } + .offset@{index} { .offset(@index); } + .offset@{index}:first-child { .offsetFirstChild(@index); } .offsetX(@index - 1); } .offsetX (0) {} @@ -658,7 +675,7 @@ .input(@gridColumnWidth, @gridGutterWidth) { .spanX (@index) when (@index > 0) { - (~"input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index}") { .span(@index); } + input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index} { .span(@index); } .spanX(@index - 1); } .spanX (0) {} @@ -682,5 +699,4 @@ .spanX (@gridColumns); } - } |
