diff options
author | Corey Innis <corey@coolerator.net> | 2012-05-28 05:12:08 +0400 |
---|---|---|
committer | Corey Innis <corey@coolerator.net> | 2012-05-28 05:12:08 +0400 |
commit | 8a06339501587f9ecc62f6a831162cf40e8a0c70 (patch) | |
tree | a8b2966e4f98e4249517d6f7f798be09520099a3 /less | |
parent | 287086758be44fd35db83ffd763966b866381ce9 (diff) |
fixes .placeholder to work as a "grouped selector"
adding the `&` combinator to `.placeholder` makes it work for the global case (in forms.less) as well as within `.navbar-search .search-query`
the result can be seen in the generated bootstrap.css, which include the -ms vendor extension.
Diffstat (limited to 'less')
-rw-r--r-- | less/mixins.less | 6 | ||||
-rw-r--r-- | less/navbar.less | 8 |
2 files changed, 4 insertions, 10 deletions
diff --git a/less/mixins.less b/less/mixins.less index ddc198535d..c3b57ed142 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -81,13 +81,13 @@ // Placeholder text // ------------------------- .placeholder(@color: @placeholderText) { - :-moz-placeholder { + &:-moz-placeholder { color: @color; } - :-ms-input-placeholder { + &:-ms-input-placeholder { color: @color; } - ::-webkit-input-placeholder { + &::-webkit-input-placeholder { color: @color; } } diff --git a/less/navbar.less b/less/navbar.less index 4faa7255b4..818f8a5a23 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -123,13 +123,7 @@ .box-shadow(~"inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15)"); .transition(none); - // Placeholder text gets special styles; can't be a grouped selector - &:-moz-placeholder { - color: @navbarSearchPlaceholderColor; - } - &::-webkit-input-placeholder { - color: @navbarSearchPlaceholderColor; - } + .placeholder(@navbarSearchPlaceholderColor); // Focus states (we use .focused since IE7-8 and down doesn't support :focus) &:focus, |