Fix radio/checkbox cursoer+highlight

This commit is contained in:
Dennis Eichhorn 2018-03-24 12:17:18 +01:00
parent 873634419a
commit abb564e0a0
3 changed files with 201 additions and 181 deletions

354
input.css
View File

@ -1,175 +1,179 @@
.ok { /* Global */
color: #5cff56; } /* Content Container */
/* Content box */
.warning { /* Navigation */
color: #ff4b41; } /* Colors */
input, select, textarea, .textarea {
.green { border: 1px solid #b7b7b7; }
background: #c0ffb4; }
progress {
.red { height: 20px;
background: #ff7c70; } width: 100%;
min-width: 150px; }
.blue {
background: #c1c8ff; } .textarea,
.tag-input,
.orange { textarea,
background: #ffbf7c; } select,
input[type="password"],
.lightblue { input[type="text"],
background: #b5ffff; } input[type="datetime"],
input[type="email"],
.yellow { input[type="date"],
background: #fffe97; } input[type="number"],
input[type="datetime-local"] {
.purple { box-sizing: border-box;
background: #bfa5ff; } color: #454545;
background: #fff;
.pink { width: 100%;
background: #ffa6e3; } height: 2rem;
min-width: 70px;
.grey { max-width: 100%;
background: #dcdcdc; } padding: 7px;
font-size: 0.9rem;
.darkred { border: solid 1px #dcdcdc;
background: #d16059; } transition: background 0.3s, border 0.3s;
box-shadow: inset 1px 1px 4px -2px #c5c5c5; }
.darkgreen { .textarea:focus,
background: #77d17c; } .tag-input:focus,
textarea:focus,
.darkblue { select:focus,
background: #7ba9d1; } input[type="password"]:focus,
input[type="text"]:focus,
input, select, textarea, .textarea { input[type="datetime"]:focus,
border: 1px solid #b7b7b7; } input[type="email"]:focus,
input[type="date"]:focus,
select { input[type="number"]:focus,
cursor: pointer; } input[type="datetime-local"]:focus {
border-color: #0c69d6; }
progress {
height: 20px; select {
width: 100%; cursor: pointer;
min-width: 150px; } padding: 0 7px 0 7px;
/* overwrites input padding: 7px. don't know why i have to do this! */ }
.textarea,
textarea, option {
select, line-height: 1rem; }
input[type="password"],
input[type="text"], input[type="file"] {
input[type="datetime"], border: solid 1px #dcdcdc;
input[type="email"], width: 100%;
input[type="date"], max-width: 100%;
input[type="number"], color: #454545;
input[type="datetime-local"] { padding: 10px;
-webkit-border-radius: 2px; box-sizing: border-box; }
-moz-border-radius: 2px;
-ms-border-radius: 2px; input[placeholder], textarea {
border-radius: 2px; font-family: 'FontAwesome', serif; }
background-clip: padding-box;
color: #454545; input:invalid {
background: #fff; transition: all 0.5s;
width: 100%; border: 1px solid #b85450; }
min-width: 70px;
font-size: 1.0em; textarea, .textarea {
height: 2em; overflow: auto;
line-height: 2em; resize: both;
padding: 0 10px 0 10px; min-height: 100px;
border: solid 1px #dcdcdc; -moz-box-sizing: border-box;
transition: background 0.3s, border 0.3s; -webkit-box-sizing: border-box;
box-shadow: inset 1px 1px 4px -2px #c5c5c5; } box-sizing: border-box; }
input[type="file"] { span.checkbox, span.radio {
border: solid 1px #dcdcdc; -moz-user-select: none;
width: 100%; -ms-user-select: none;
color: #454545; } -webkit-user-select: none;
user-select: none; }
input[placeholder], textarea { span.checkbox label, span.radio label {
font-family: 'FontAwesome', serif; } cursor: pointer; }
input:invalid { span.checkbox input[type="checkbox"], span.radio input[type="radio"] {
transition: all 0.5s; position: relative;
border: 1px solid #b85450; } vertical-align: middle;
bottom: 1px;
select { margin-right: 5px;
height: 2em; cursor: pointer; }
line-height: 2em; }
input[type="range"] {
.textarea { border: none;
overflow: auto; width: 100%;
resize: both; } min-width: 150px;
cursor: pointer; }
textarea, .textarea {
min-height: 100px; .input {
-moz-box-sizing: border-box; width: 100%;
-webkit-box-sizing: border-box; min-width: 120px;
box-sizing: border-box; } display: flex;
flex-direction: row;
span.check input[type="checkbox"], span.radio input[type="radio"] { flex-wrap: nowrap; }
position: relative; .input button {
vertical-align: middle; -moz-box-sizing: border-box;
bottom: 1px; -webkit-box-sizing: border-box;
margin-right: 5px; box-sizing: border-box;
cursor: pointer; } display: inline-block;
background: #fff;
input[type="range"] { height: 2rem;
border: none; font-size: 1rem;
width: 100%; min-width: 40px;
min-width: 150px; border-left: solid 1px #dcdcdc;
cursor: pointer; } border-top: solid 1px #dcdcdc;
border-bottom: solid 1px #dcdcdc;
.input { border-right: none;
width: 100%; padding: 0;
min-width: 120px; position: relative;
display: flex; vertical-align: middle;
flex-direction: row; flex-grow: 0;
flex-wrap: nowrap; } flex-shrink: 0; }
.input button { .input button:hover {
-webkit-border-bottom-left-radius: 2px; background: #fff; }
border-bottom-left-radius: 2px; .input i {
-webkit-border-top-left-radius: 2px; position: relative;
border-top-left-radius: 2px; vertical-align: middle; }
background-clip: padding-box; .input input {
-webkit-border-bottom-right-radius: 0px; -moz-box-sizing: border-box;
border-bottom-right-radius: 0px; -webkit-box-sizing: border-box;
-webkit-border-top-right-radius: 0px; box-sizing: border-box;
border-top-right-radius: 0px; font-size: 1em;
background-clip: padding-box; position: relative;
-moz-box-sizing: border-box; vertical-align: middle;
-webkit-box-sizing: border-box; flex-grow: 1;
box-sizing: border-box; flex-shrink: 1; }
display: inline-block;
background: #fff; .dropdown {
height: 2em; position: relative;
font-size: 1em; display: inline-block; }
line-height: 2em; .dropdown:hover .content {
padding: 0; display: block; }
min-width: 40px; .dropdown .content {
border-left: solid 1px #dcdcdc; display: none;
border-top: solid 1px #dcdcdc; position: absolute;
border-bottom: solid 1px #dcdcdc; z-index: 2;
border-right: none; background: #fff; }
position: relative; .dropdown .content input {
vertical-align: middle; display: none; }
flex-grow: 0; .dropdown .content label {
flex-shrink: 0; } display: block;
.input button:hover { margin: 5px;
background: #fff; } padding: 5px; }
.input i {
position: relative; select.plain {
vertical-align: middle; } width: auto;
.input input { margin: 0;
-webkit-border-bottom-left-radius: 0px; padding: 0;
border-bottom-left-radius: 0px; border: none;
-webkit-border-top-left-radius: 0px; outline: none;
border-top-left-radius: 0px; display: inline-block;
background-clip: padding-box; -webkit-appearance: none;
-moz-box-sizing: border-box; -moz-appearance: none;
-webkit-box-sizing: border-box; appearance: none;
box-sizing: border-box; cursor: pointer;
font-size: 1em; box-shadow: none; }
position: relative;
vertical-align: middle; .tag-input input {
flex-grow: 1; border: none;
flex-shrink: 1; } padding: 0;
margin: 0; }
/*# sourceMappingURL=input.css.map */ .tag-input .tag {
padding: 3px;
font-size: 0.8rem; }
/*# sourceMappingURL=input.css.map */

View File

@ -66,17 +66,25 @@ input:invalid {
border: 1px solid #b85450; border: 1px solid #b85450;
} }
.textarea { textarea, .textarea {
overflow: auto; overflow: auto;
resize: both; resize: both;
}
textarea, .textarea {
min-height: 100px; min-height: 100px;
@include box-sizing(border-box); @include box-sizing(border-box);
} }
span.check input[type="checkbox"], span.radio input[type="radio"] { span.checkbox, span.radio {
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
label {
cursor: pointer;
}
}
span.checkbox input[type="checkbox"], span.radio input[type="radio"] {
position: relative; position: relative;
vertical-align: middle; vertical-align: middle;
bottom: 1px; bottom: 1px;

View File

@ -3711,7 +3711,15 @@ textarea, .textarea {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; } box-sizing: border-box; }
span.check input[type="checkbox"], span.radio input[type="radio"] { span.checkbox, span.radio {
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none; }
span.checkbox label, span.radio label {
cursor: pointer; }
span.checkbox input[type="checkbox"], span.radio input[type="radio"] {
position: relative; position: relative;
vertical-align: middle; vertical-align: middle;
bottom: 1px; bottom: 1px;