Refine search styling

This commit is contained in:
Michael Rose 2017-11-15 15:50:51 -05:00
parent 19f6d32745
commit f39b15a362
4 changed files with 364 additions and 370 deletions

View file

@ -28,6 +28,7 @@
@import "minimal-mistakes/masthead";
@import "minimal-mistakes/navigation";
@import "minimal-mistakes/footer";
@import "minimal-mistakes/search";
@import "minimal-mistakes/syntax";
/* Utility classes */

View file

@ -2,7 +2,7 @@
Forms
========================================================================== */
form {
form {
margin: 0 0 5px 0;
padding: 1em;
background-color: $form-background-color;
@ -37,26 +37,26 @@
br {
display: none;
}
}
}
label,
input,
button,
select,
textarea {
label,
input,
button,
select,
textarea {
vertical-align: baseline;
*vertical-align: middle;
}
}
input,
button,
select,
textarea {
input,
button,
select,
textarea {
box-sizing: border-box;
font-family: $sans-serif;
}
}
label {
label {
display: block;
margin-bottom: 0.25em;
color: $text-color;
@ -71,11 +71,11 @@
select {
display: block;
}
}
}
input,
textarea,
select {
input,
textarea,
select {
display: inline-block;
width: 100%;
padding: 0.25em;
@ -85,19 +85,19 @@
border: $border-color;
border-radius: $border-radius;
box-shadow: $box-shadow;
}
}
.input-mini {
.input-mini {
width: 60px;
}
}
.input-small {
.input-small {
width: 90px;
}
}
input[type="image"],
input[type="checkbox"],
input[type="radio"] {
input[type="image"],
input[type="checkbox"],
input[type="radio"] {
width: auto;
height: auto;
padding: 0;
@ -107,22 +107,22 @@
cursor: pointer;
border-radius: 0;
border: 0 \9;
}
}
input[type="checkbox"],
input[type="radio"] {
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
*width: 13px;
*height: 13px;
}
}
input[type="image"] {
input[type="image"] {
border: 0;
box-shadow: none;
}
}
input[type="file"] {
input[type="file"] {
width: auto;
padding: initial;
line-height: initial;
@ -130,221 +130,217 @@
background-color: transparent;
background-color: initial;
box-shadow: none;
}
}
input[type="button"],
input[type="reset"],
input[type="submit"] {
input[type="button"],
input[type="reset"],
input[type="submit"] {
width: auto;
height: auto;
cursor: pointer;
*overflow: visible;
}
}
select,
input[type="file"] {
select,
input[type="file"] {
*margin-top: 4px;
}
}
select {
select {
width: auto;
background-color: #fff;
}
}
select[multiple],
select[size] {
select[multiple],
select[size] {
height: auto;
}
}
textarea {
textarea {
resize: vertical;
height: auto;
overflow: auto;
vertical-align: top;
}
}
input[type="hidden"] {
input[type="hidden"] {
display: none;
}
}
.form {
.form {
position: relative;
}
}
.radio,
.checkbox {
.radio,
.checkbox {
padding-left: 18px;
font-weight: normal;
}
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
float: left;
margin-left: -18px;
}
}
.radio.inline,
.checkbox.inline {
.radio.inline,
.checkbox.inline {
display: inline-block;
padding-top: 5px;
margin-bottom: 0;
vertical-align: middle;
}
}
.radio.inline + .radio.inline,
.checkbox.inline + .checkbox.inline {
.radio.inline + .radio.inline,
.checkbox.inline + .checkbox.inline {
margin-left: 10px;
}
}
/*
/*
Disabled state
========================================================================== */
input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
opacity: 0.5;
cursor: not-allowed;
}
}
/*
/*
Focus & active state
========================================================================== */
input:focus,
textarea:focus {
input:focus,
textarea:focus {
border-color: $primary-color;
outline: 0;
outline: thin dotted \9;
box-shadow: inset 0 1px 3px rgba($text-color, 0.06), 0 0 5px rgba($primary-color, 0.7);
}
box-shadow: inset 0 1px 3px rgba($text-color, 0.06),
0 0 5px rgba($primary-color, 0.7);
}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus,
select:focus {
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus,
select:focus {
box-shadow: none;
}
}
/*
/*
Help text
========================================================================== */
.help-block,
.help-inline {
.help-block,
.help-inline {
color: $muted-text-color;
}
}
.help-block {
.help-block {
display: block;
margin-bottom: 1em;
line-height: 1em;
}
}
.help-inline {
.help-inline {
display: inline-block;
vertical-align: middle;
padding-left: 5px;
}
}
/*
/*
.form-group
========================================================================== */
.form-group {
.form-group {
margin-bottom: 5px;
padding: 0;
border-width: 0;
}
}
/*
/*
.form-inline
========================================================================== */
.form-inline input,
.form-inline textarea,
.form-inline select {
.form-inline input,
.form-inline textarea,
.form-inline select {
display: inline-block;
margin-bottom: 0;
}
}
.form-inline label {
.form-inline label {
display: inline-block;
}
}
.form-inline .radio,
.form-inline .checkbox,
.form-inline .radio {
.form-inline .radio,
.form-inline .checkbox,
.form-inline .radio {
padding-left: 0;
margin-bottom: 0;
vertical-align: middle;
}
}
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
float: left;
margin-left: 0;
margin-right: 3px; }
margin-right: 3px;
}
/*
/*
.form-search
========================================================================== */
.form-search input,
.form-search textarea,
.form-search select {
.form-search input,
.form-search textarea,
.form-search select {
display: inline-block;
margin-bottom: 0;
}
}
.form-search .search-query {
.form-search .search-query {
padding-left: 14px;
padding-right: 14px;
margin-bottom: 0;
border-radius: 14px;
}
}
.form-search label {
.form-search label {
display: inline-block;
}
}
.form-search .radio,
.form-search .checkbox,
.form-inline .radio {
.form-search .radio,
.form-search .checkbox,
.form-inline .radio {
padding-left: 0;
margin-bottom: 0;
vertical-align: middle;
}
}
.form-search .radio input[type="radio"],
.form-search .checkbox input[type="checkbox"] {
.form-search .radio input[type="radio"],
.form-search .checkbox input[type="checkbox"] {
float: left;
margin-left: 0;
margin-right: 3px;
}
}
/*
/*
.form--loading
========================================================================== */
.form--loading:before {
content: '';
}
.form--loading:before {
content: "";
}
.form--loading .form__spinner {
.form--loading .form__spinner {
display: block;
}
}
.form:before {
.form:before {
position: absolute;
top: 0;
left: 0;
@ -352,23 +348,21 @@
height: 100%;
background-color: rgba(255, 255, 255, 0.7);
z-index: 10;
}
}
.form__spinner {
.form__spinner {
display: none;
position: absolute;
top: 50%;
left: 50%;
z-index: 11;
}
}
/*
/*
Google search form
========================================================================== */
#goog-fixurl {
#goog-fixurl {
ul {
list-style: none;
margin-left: 0;
@ -377,9 +371,9 @@
list-style-type: none;
}
}
}
}
#goog-wm-qt {
#goog-wm-qt {
width: auto;
margin-right: 10px;
margin-bottom: 20px;
@ -392,8 +386,8 @@
border-style: solid !important;
border-color: $border-color;
border-radius: $border-radius;
}
}
#goog-wm-sb {
#goog-wm-sb {
@extend .btn;
}
}

View file

@ -172,7 +172,7 @@ input[type="checkbox"] {
}
input[type="search"] { /* Appearance in Safari/Chrome*/
box-sizing: content-box;
box-sizing: border-box;
-webkit-appearance: textfield;
}

View file

@ -1,10 +1,9 @@
.search-input {
-webkit-appearance: none;
border: 0;
border-radius: .25em;
font-family: inherit;
font-size: 1.25em;
margin: 2em auto 1em;
padding: .5em;
width: 100%;
/* ==========================================================================
SEARCH
========================================================================== */
.layout--search {
.archive__item-teaser {
margin-bottom: 0.25em;
}
}