Skip to content

Commit

Permalink
uniform styling for all html5 input types (and select, sort of). fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwweb committed Dec 8, 2015
1 parent e57d8c3 commit a0fda1d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 4 deletions.
27 changes: 25 additions & 2 deletions sass/forms/_fields.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
color: $color__text-input;
border: 1px solid $color__border-input;
Expand All @@ -13,15 +23,28 @@ textarea {
}
}

select {
border: 1px solid #ccc;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"] {
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"] {
padding: 3px;
}

textarea {
padding-left: 3px;
width: 100%;
}
39 changes: 37 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -461,26 +461,61 @@ input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
color: #666;
border: 1px solid #ccc;
border-radius: 3px;
}

select {
border: 1px solid #ccc;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus {
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus,
select:focus {
color: #111;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"] {
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"] {
padding: 3px;
}

Expand Down

0 comments on commit a0fda1d

Please sign in to comment.