diff options
| author | Mark Otto <[email protected]> | 2012-03-31 21:06:16 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-03-31 21:06:16 -0700 |
| commit | 2355fd224ddcd571765c5ad2f2242dac65789aa4 (patch) | |
| tree | d5bb2369ee392c43e2ca189f85dfe552031c30fc /less | |
| parent | 56ecc6ba96550d8e66d0484c21fc20da5f8e52e6 (diff) | |
| download | bootstrap-2355fd224ddcd571765c5ad2f2242dac65789aa4.tar.xz bootstrap-2355fd224ddcd571765c5ad2f2242dac65789aa4.zip | |
remove @shadow instances and replace with escaped values, update mixins to not use a default value at all
Diffstat (limited to 'less')
| -rw-r--r-- | less/button-groups.less | 9 | ||||
| -rw-r--r-- | less/buttons.less | 8 | ||||
| -rw-r--r-- | less/forms.less | 4 | ||||
| -rw-r--r-- | less/mixins.less | 20 | ||||
| -rw-r--r-- | less/navbar.less | 9 | ||||
| -rw-r--r-- | less/responsive-navbar.less | 3 |
6 files changed, 19 insertions, 34 deletions
diff --git a/less/button-groups.less b/less/button-groups.less index 65c974a39..1261ba5cc 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -93,10 +93,7 @@ .btn-group .dropdown-toggle { padding-left: 8px; padding-right: 8px; - @shadow: inset 1px 0 0 rgba(255,255,255,.125), - inset 0 1px 0 rgba(255,255,255,.2), - 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); + .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); *padding-top: 3px; *padding-bottom: 3px; } @@ -121,9 +118,7 @@ // Remove the gradient and set the same inset shadow as the :active state .dropdown-toggle { background-image: none; - @shadow: inset 0 2px 4px rgba(0,0,0,.15), - 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); + .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"); } // Keep the hover's background when dropdown is open diff --git a/less/buttons.less b/less/buttons.less index a1abb6ef7..4deec92a9 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -21,9 +21,7 @@ border: 1px solid @btnBorder; border-bottom-color: darken(@btnBorder, 10%); .border-radius(4px); - @shadow: inset 0 1px 0 rgba(255,255,255,.2), - 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); + .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); cursor: pointer; // Give IE7 some love @@ -56,9 +54,7 @@ .btn.active, .btn:active { background-image: none; - @shadow: inset 0 2px 4px rgba(0,0,0,.15), - 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); + .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"); background-color: darken(@white, 10%); background-color: darken(@white, 15%) e("\9"); outline: 0; diff --git a/less/forms.less b/less/forms.less index a57732c13..1945bda60 100644 --- a/less/forms.less +++ b/less/forms.less @@ -213,9 +213,7 @@ textarea { input:focus, textarea:focus { border-color: rgba(82,168,236,.8); - @shadow: inset 0 1px 1px rgba(0,0,0,.075), - 0 0 8px rgba(82,168,236,.6); - .box-shadow(@shadow); + .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)"); outline: 0; outline: thin dotted \9; /* IE6-9 */ } diff --git a/less/mixins.less b/less/mixins.less index b3fea77db..71532fcff 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -70,11 +70,11 @@ // Sizing shortcuts // ------------------------- -.size(@height: 5px, @width: 5px) { +.size(@height, @width) { width: @width; height: @height; } -.square(@size: 5px) { +.square(@size) { .size(@size, @size); } @@ -192,14 +192,14 @@ // -------------------------------------------------- // Border Radius -.border-radius(@radius: 5px) { +.border-radius(@radius) { -webkit-border-radius: @radius; -moz-border-radius: @radius; border-radius: @radius; } // Drop shadows -.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) { +.box-shadow(@shadow) { -webkit-box-shadow: @shadow; -moz-box-shadow: @shadow; box-shadow: @shadow; @@ -229,21 +229,21 @@ -o-transform: scale(@ratio); transform: scale(@ratio); } -.translate(@x: 0, @y: 0) { +.translate(@x, @y) { -webkit-transform: translate(@x, @y); -moz-transform: translate(@x, @y); -ms-transform: translate(@x, @y); -o-transform: translate(@x, @y); transform: translate(@x, @y); } -.skew(@x: 0, @y: 0) { +.skew(@x, @y) { -webkit-transform: skew(@x, @y); -moz-transform: skew(@x, @y); -ms-transform: skew(@x, @y); -o-transform: skew(@x, @y); transform: skew(@x, @y); } -.translate3d(@x: 0, @y: 0, @z: 0) { +.translate3d(@x, @y, @z) { -webkit-transform: translate(@x, @y, @z); -moz-transform: translate(@x, @y, @z); -ms-transform: translate(@x, @y, @z); @@ -255,7 +255,7 @@ // Prevent browsers from flickering when using CSS 3D transforms. // Default value is `visible`, but can be changed to `hidden // See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples -.backface-visibility(@visibility: visible){ +.backface-visibility(@visibility){ -webkit-backface-visibility: @visibility; -moz-backface-visibility: @visibility; -ms-backface-visibility: @visibility; @@ -297,7 +297,7 @@ } // Resize anything -.resizable(@direction: both) { +.resizable(@direction) { resize: @direction; // Options: horizontal, vertical, both overflow: auto; // Safari fix } @@ -313,7 +313,7 @@ } // Opacity -.opacity(@opacity: 100) { +.opacity(@opacity) { opacity: @opacity / 100; filter: ~"alpha(opacity=@{opacity})"; } diff --git a/less/navbar.less b/less/navbar.less index f2f5153a7..6816a6ab9 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -21,8 +21,7 @@ padding-right: 20px; #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground); .border-radius(4px); - @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); - .box-shadow(@shadow); + .box-shadow(~"0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1)"); } // Set width to auto for default container @@ -39,8 +38,7 @@ margin-left: 5px; margin-right: 5px; .buttonBackground(@navbarBackgroundHighlight, @navbarBackground); - @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); - .box-shadow(@shadow); + .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)"); } .btn-navbar .icon-bar { display: block; @@ -143,8 +141,7 @@ color: @white; background-color: @navbarSearchBackground; border: 1px solid @navbarSearchBorder; - @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15); - .box-shadow(@shadow); + .box-shadow(~"inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15)"); .transition(none); // Placeholder text gets special styles; can't be a grouped selector diff --git a/less/responsive-navbar.less b/less/responsive-navbar.less index 84b0f33f3..2f1c4925a 100644 --- a/less/responsive-navbar.less +++ b/less/responsive-navbar.less @@ -93,8 +93,7 @@ margin: (@baseLineHeight / 2) 0; border-top: 1px solid @navbarBackground; border-bottom: 1px solid @navbarBackground; - @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); - .box-shadow(@shadow); + .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1)"); } // Pull right (secondary) nav content .navbar .nav.pull-right { |
