diff options
| author | Chad Smith <[email protected]> | 2013-05-21 16:25:59 -0400 |
|---|---|---|
| committer | Chad Smith <[email protected]> | 2013-05-21 16:25:59 -0400 |
| commit | 230d6de88aac73077a01f3d66d2bd498d553cb7e (patch) | |
| tree | 5a23a373393938bda8563a3a555d8ae9c62c6101 /less | |
| parent | 930913e0a0a7ab7f7b69fd97fc631bb9121e46aa (diff) | |
| download | bootstrap-230d6de88aac73077a01f3d66d2bd498d553cb7e.tar.xz bootstrap-230d6de88aac73077a01f3d66d2bd498d553cb7e.zip | |
Vertical gradients now can have percentages passed in as arguments to allow finer control over the backgrounds it produces
Diffstat (limited to 'less')
| -rw-r--r-- | less/mixins.less | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/less/mixins.less b/less/mixins.less index b54b05c4e..779e121a9 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -255,12 +255,12 @@ background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down } - .vertical(@startColor: #555, @endColor: #333) { + .vertical(@startColor: #555, @endColor: #333, @startPercent: 0%, @endPercent: 100%) { background-color: @endColor; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ - background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ - background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ - background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 + background-image: -webkit-gradient(linear, 0 @startPercent, 0 @endPercent, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @startPercent, @endColor, @endPercent); // Safari 5.1+, Chrome 10+ + background-image: -moz-linear-gradient(top, @startColor @startPercent, @endColor @endPercent); // FF 3.6+ + background-image: linear-gradient(to bottom, @startColor @startPercent, @endColor @endPercent); // Standard, IE10 background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down } |
