diff options
Diffstat (limited to 'less/_forms.less')
| -rw-r--r-- | less/_forms.less | 61 |
1 files changed, 24 insertions, 37 deletions
diff --git a/less/_forms.less b/less/_forms.less index 5b1187c5a..ff4e4bbcf 100644 --- a/less/_forms.less +++ b/less/_forms.less @@ -142,7 +142,7 @@ output { &[disabled], &[readonly], fieldset[disabled] & { - cursor: not-allowed; + cursor: @cursor-disabled; background-color: @input-bg-disabled; opacity: 1; // iOS fix for unreadable disabled content } @@ -171,41 +171,28 @@ input[type="search"] { // Special styles for iOS temporal inputs // // In Mobile Safari, setting `display: block` on temporal inputs causes the -// text within the input to become vertically misaligned. -// As a workaround, we set a pixel line-height that matches the -// given height of the input. Since this fucks up everything else, we have to -// appropriately reset it for Internet Explorer and the size variations. - -input[type="date"], -input[type="time"], -input[type="datetime-local"], -input[type="month"] { - line-height: @input-height-base; - // IE9+ misaligns the text within date inputs, so we reset - line-height: @line-height-base ~"\0"; - - &.input-sm { - line-height: @input-height-sm; - line-height: @line-height-sm ~"\0"; +// text within the input to become vertically misaligned. As a workaround, we +// set a pixel line-height that matches the given height of the input, but only +// for Safari. + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"], + input[type="time"], + input[type="datetime-local"], + input[type="month"] { + line-height: @input-height-base; } - &.input-lg { - line-height: @input-height-lg; - line-height: @line-height-lg ~"\0"; - } -} - -// IE 11 hack to reverse the iOS temporal input hack. -_:-ms-fullscreen, :root input[type="date"], -_:-ms-fullscreen, :root input[type="time"], -_:-ms-fullscreen, :root input[type="datetime-local"], -_:-ms-fullscreen, :root input[type="month"] { - line-height: @line-height-base; - - &.input-sm { - line-height: @line-height-sm; + input[type="date"].input-sm, + input[type="time"].input-sm, + input[type="datetime-local"].input-sm, + input[type="month"].input-sm { + line-height: @input-height-small; } - &.input-lg { - line-height: @line-height-lg; + input[type="date"].input-lg, + input[type="time"].input-lg, + input[type="datetime-local"].input-lg, + input[type="month"].input-lg { + line-height: @input-height-large; } } @@ -278,7 +265,7 @@ input[type="checkbox"] { &[disabled], &.disabled, fieldset[disabled] & { - cursor: not-allowed; + cursor: @cursor-disabled; } } // These classes are used directly on <label>s @@ -286,7 +273,7 @@ input[type="checkbox"] { .checkbox-inline { &.disabled, fieldset[disabled] & { - cursor: not-allowed; + cursor: @cursor-disabled; } } // These classes are used on elements with <label> descendants @@ -295,7 +282,7 @@ input[type="checkbox"] { &.disabled, fieldset[disabled] & { label { - cursor: not-allowed; + cursor: @cursor-disabled; } } } |
