Skip to content

Commit

Permalink
Target input styles to only texty inputs.
Browse files Browse the repository at this point in the history
This adds a lot more rules but I'm hoping that gzipping
will not affect the k-weight much. This commit fixes
issue pure-css#54 (pure-css#54)
  • Loading branch information
tilomitra committed Jun 5, 2013
1 parent a85dbed commit e5efced
Showing 1 changed file with 47 additions and 7 deletions.
54 changes: 47 additions & 7 deletions src/forms/css/forms.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
.pure-form input,
.pure-form input[type="text"],
.pure-form input[type="password"],
.pure-form input[type="email"],
.pure-form input[type="url"],
.pure-form input[type="date"],
.pure-form input[type="month"],
.pure-form input[type="time"],
.pure-form input[type="datetime"],
.pure-form input[type="datetime-local"],
.pure-form input[type="week"],
.pure-form input[type="number"],
.pure-form input[type="search"],
.pure-form input[type="tel"],
.pure-form input[type="color"],
.pure-form select,
.pure-form textarea {
padding: 0.5em 0.6em;
Expand All @@ -18,25 +31,52 @@
-webkit-font-smoothing: antialiased;
}

.pure-form input:focus,
.pure-form input[type="text"]:focus,
.pure-form input[type="password"]:focus,
.pure-form input[type="email"]:focus,
.pure-form input[type="url"]:focus,
.pure-form input[type="date"]:focus,
.pure-form input[type="month"]:focus,
.pure-form input[type="time"]:focus,
.pure-form input[type="datetime"]:focus,
.pure-form input[type="datetime-local"]:focus,
.pure-form input[type="week"]:focus,
.pure-form input[type="number"]:focus,
.pure-form input[type="search"]:focus,
.pure-form input[type="tel"]:focus,
.pure-form input[type="color"]:focus,
.pure-form select:focus,
.pure-form textarea:focus {
outline: 0;
outline: thin dotted \9; /* IE6-9 */
border-color: #129FEA;
}

.pure-form input[type="file"]:focus,
.pure-form input[type="radio"]:focus,
.pure-form input[type="checkbox"]:focus {
outline: thin dotted #333;
outline: 1px auto #129FEA;
outline: 1px auto #129FEA;
}
.pure-form .pure-checkbox,
.pure-form .pure-radio {
margin: 0.5em 0;
display: block;
}
.pure-form input[disabled],
.pure-form input[type="text"][disabled],
.pure-form input[type="password"][disabled],
.pure-form input[type="email"][disabled],
.pure-form input[type="url"][disabled],
.pure-form input[type="date"][disabled],
.pure-form input[type="month"][disabled],
.pure-form input[type="time"][disabled],
.pure-form input[type="datetime"][disabled],
.pure-form input[type="datetime-local"][disabled],
.pure-form input[type="week"][disabled],
.pure-form input[type="number"][disabled],
.pure-form input[type="search"][disabled],
.pure-form input[type="tel"][disabled],
.pure-form input[type="color"][disabled],
.pure-form select[disabled],
.pure-form textarea[disabled],
.pure-form input[readonly],
Expand Down Expand Up @@ -90,9 +130,9 @@
border-bottom: 1px solid #e5e5e5;
}

.pure-form.pure-form-stacked input[type='text'],
.pure-form.pure-form-stacked select,
.pure-form.pure-form-stacked label {
.pure-form-stacked input,
.pure-form-stacked select,
.pure-form-stacked label {
display: block;
}

Expand Down

0 comments on commit e5efced

Please sign in to comment.