aboutsummaryrefslogtreecommitdiff
path: root/scss/_custom-forms.scss
diff options
context:
space:
mode:
authorAlexandr Kondrashov <[email protected]>2015-09-11 16:43:00 +0300
committerAlexandr Kondrashov <[email protected]>2015-09-11 16:43:00 +0300
commitc9725926b2f30bed4e37f57c20ef8ffeb2fd233b (patch)
tree2964ad7556549dd3e0712bdfdbc5fc4ae7a9b45f /scss/_custom-forms.scss
parent353e0a49a97c24d89f6cdb95014419d4137dee6e (diff)
parentb811f8cf9628dbcbfe994f71588c5a0c921a092d (diff)
downloadbootstrap-c9725926b2f30bed4e37f57c20ef8ffeb2fd233b.tar.xz
bootstrap-c9725926b2f30bed4e37f57c20ef8ffeb2fd233b.zip
Merge remote-tracking branch 'twbs/v4-dev' into patch-1
Conflicts: scss/_custom-forms.scss scss/_variables.scss
Diffstat (limited to 'scss/_custom-forms.scss')
-rw-r--r--scss/_custom-forms.scss43
1 files changed, 23 insertions, 20 deletions
diff --git a/scss/_custom-forms.scss b/scss/_custom-forms.scss
index 9c5b7796f..ebca1e1ec 100644
--- a/scss/_custom-forms.scss
+++ b/scss/_custom-forms.scss
@@ -19,16 +19,17 @@
z-index: -1; // Put the input behind the label so it doesn't overlay text
opacity: 0;
- &:focus ~ .c-indicator {
- @include box-shadow(0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9);
- }
-
&:checked ~ .c-indicator {
color: #fff;
background-color: #0074d9;
@include box-shadow(none);
}
+ &:focus ~ .c-indicator {
+ // the mixin is not used here to make sure there is feedback
+ box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9;
+ }
+
&:active ~ .c-indicator {
color: #fff;
background-color: #84c6ff;
@@ -108,7 +109,7 @@
.c-input {
display: inline;
- &:after {
+ &::after {
display: block;
margin-bottom: .25rem;
content: "";
@@ -125,29 +126,31 @@
//
// Replaces the browser default select with a custom one, mostly pulled from
// http://primercss.io.
+//
+// Includes IE9-specific hacks (noted by ` \9`).
.c-select {
display: inline-block;
max-width: 100%;
padding: .375rem 1.75rem .375rem .75rem;
+ padding-right: .75rem \9;
vertical-align: middle;
+<<<<<<< HEAD
background: #fff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0IDUiPjxwYXRoIGZpbGw9IiMzMzMiIGQ9Ik0yIDBMMCAyaDR6bTAgNUwwIDNoNHoiLz48L3N2Zz4=) no-repeat right .75rem center;
+=======
+ background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC) no-repeat right .75rem center;
+ background-image: none \9;
+>>>>>>> twbs/v4-dev
background-size: 8px 10px;
border: 1px solid $input-border;
-
- // Have to include vendor prefixes as the `appearance` property isn't part of the CSS spec.
- -webkit-appearance: none;
+ // Use vendor prefixes as `appearance` isn't part of the CSS spec.
-moz-appearance: none;
- appearance: none;
-
- // IE9 hacks to hide the background-image and reduce padding
- padding-right: .75rem \9;
- background-image: none \9;
+ -webkit-appearance: none;
&:focus {
- outline: none;
border-color: #51a7e8;
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 5px rgba(81, 167, 232, 0.5);
+ outline: none;
+ @include box-shadow(inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 5px rgba(81, 167, 232, 0.5));
}
// Hides the default caret in IE11
@@ -181,7 +184,7 @@
.file input {
min-width: 14rem;
margin: 0;
- filter: alpha(opacity=0);
+ filter: alpha(opacity = 0);
opacity: 0;
}
.file-custom {
@@ -198,12 +201,12 @@
background-color: #fff;
border: .075rem solid #ddd;
border-radius: .25rem;
- box-shadow: inset 0 .2rem .4rem rgba(0,0,0,.05);
+ @include box-shadow(inset 0 .2rem .4rem rgba(0,0,0,.05));
}
-.file-custom:after {
+.file-custom::after {
content: "Choose file...";
}
-.file-custom:before {
+.file-custom::before {
position: absolute;
top: -.075rem;
right: -.075rem;
@@ -222,5 +225,5 @@
// Focus state
.file input:focus ~ .file-custom {
- box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9;
+ @include box-shadow(0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9);
}