codeforamerica/ohana-web-search

View on GitHub
app/assets/stylesheets/components/_input-search.scss

Summary

Maintainability
Test Coverage
// Form input styles.
 
// Search.
// Reset browser-specific added styles.
@include reset-input-webkit();
@include reset-input-ie();
 
.input-search-small {
`0.6` should be written without a leading zero as `.6`
@include input-placeholder(rgba($white, 0.6), italic);
Colon after property should be followed by one space
position:relative;
 
input:focus {
outline: none;
}
 
> input {
Name of variable `font_size_105` should be written in all lowercase letters with hyphens instead of underscores
Properties should be ordered background, border, border-bottom, border-collapse, color, font-size, height, margin-left, padding, padding-left, padding-right, vertical-align, width
font-size: $font_size_105;
margin-left: 0;
height: 45px;
padding: 3px;
padding-left: 45px;
padding-right: 25px;
width: 100%;
vertical-align: bottom;
 
border-collapse: collapse;
`border: 0` is preferred over `border: none`
border: none;
background: none;
border-bottom: 1px solid $primary-dark;
Expected item on line 30 to appear before line 17. Rule sets should be ordered as follows: `@extends`, `@includes` without `@content`, properties, `@includes` with `@content`, nested rule sets
`0.1` should be written without a leading zero as `.1`
@include single-box-shadow(0, 1px, 6px, 1px, rgba($black, 0.1), inset);
@include box-sizing(border-box);
color: $white;
}
 
> .button-icon {
Properties should be ordered background, border, border-collapse, cursor, font-family, font-size, height, left, line-height, margin, margin-left, min-width, padding, position, top, vertical-align, z-index
cursor: pointer;
background: none;
`border: 0` is preferred over `border: none`
border: none;
margin: 0;
margin-left: 5px;
padding: 10px;
Expected item on line 42 to appear before line 36. Rule sets should be ordered as follows: `@extends`, `@includes` without `@content`, properties, `@includes` with `@content`, nested rule sets
@include box-sizing(border-box);
vertical-align: baseline;
Name of variable `font_serif` should be written in all lowercase letters with hyphens instead of underscores
font-family: $font_serif;
Name of variable `font_size_110` should be written in all lowercase letters with hyphens instead of underscores
font-size: $font_size_110;
line-height: 0;
height: 40px;
min-width: 34px;
border-collapse: collapse;
position: absolute;
left: 0;
top: 0;
z-index: $layer-8;
 
>.fa {
color: $primary-darkest;
}
 
&:hover {
Nesting should be no greater than 3, but was 4
> .fa {
color: $primary-dark;
// color: $button-hover-color;
}
}
}
}
 
.input-search-big {
`0.2` should be written without a leading zero as `.2`
@include input-placeholder(midtone($black, 0.2), italic);
position: relative;
width: 440px;
 
input:focus {
outline: none;
}
 
> input {
Properties should be ordered background, border, border-collapse, color, font-size, height, margin, padding, padding-left, padding-right, vertical-align, width
padding-left: 45px;
width: 100%;
 
border-collapse: collapse;
Expected item on line 82 to appear before line 78. Rule sets should be ordered as follows: `@extends`, `@includes` without `@content`, properties, `@includes` with `@content`, nested rule sets
@include box-sizing(border-box);
@include rounded-except(none);
 
height: 50px;
padding: 10px;
padding-right: 144px;
Colon after property should be followed by one space
margin:0;
Name of variable `font_size_110` should be written in all lowercase letters with hyphens instead of underscores
font-size: $font_size_110;
Colon after property should be followed by one space
vertical-align:middle;
background: $white;
@include border-radius(4px);
Colon after property should be followed by one space
`0.4` should be written without a leading zero as `.4`
border:1px solid rgba($input-border-color, 0.4);
color: $black;
}
 
> .button-icon {
Properties should be ordered background, border, border-collapse, border-left, cursor, font-family, font-size, height, left, letter-spacing, line-height, margin, margin-left, min-width, padding, position, right, top, vertical-align, z-index
position: absolute;
top: 0;
right: 0;
left: auto;
z-index: $layer-8;
height: 50px;
min-width: 134px;
margin: 0;
margin-left: 5px;
padding: 10px;
border-collapse: collapse;
Expected item on line 109 to appear before line 98. Rule sets should be ordered as follows: `@extends`, `@includes` without `@content`, properties, `@includes` with `@content`, nested rule sets
@include box-sizing(border-box);
@include rounded-except(left);
 
`0.4` should be written without a leading zero as `.4`
border: 1px solid rgba($input-border-color, 0.4);
`0.2` should be written without a leading zero as `.2`
border-left: 1px solid rgba($input-border-color, 0.2);
background: $button-bg;
 
Name of variable `font_size_115` should be written in all lowercase letters with hyphens instead of underscores
font-size: $font_size_115;
vertical-align: baseline;
Name of variable `font_serif` should be written in all lowercase letters with hyphens instead of underscores
font-family: $font_serif;
line-height: 0;
letter-spacing: 1px;
 
cursor: pointer;
 
> span {
@include inline-block();
color: $black; // IE fallback
Property `color` already defined on line 126
color: midtone($black, .5);
Properties should be ordered color, line-height, text-shadow
Name of variable `accentA-light` should be written in all lowercase letters with hyphens instead of underscores
text-shadow: 1px 4px 6px $accentA-light, 0 0 0 $black, 1px 4px 6px $accentA-light;
line-height: 20px; // Needed by Opera to handle vertical-align:middle properly
Property `color` already defined on line 126
color: $button-color;
}
 
>.fa {
color: $button-fa-color;
}
 
&:hover {
background: $button-hover-bg;
 
Nesting should be no greater than 3, but was 4
>span {
Properties should be ordered color, text-shadow
text-shadow: none;
color: $button-hover-color;
}
 
Nesting should be no greater than 3, but was 4
>.fa {
color: $button-fa-color;
}
}
}
}
 
.input-search-filter {
`0.6` should be written without a leading zero as `.6`
@include input-placeholder(rgba($white, 0.6), italic);
position: relative;
 
> label {
Properties should be ordered color, font-size
Name of variable `font_size_90` should be written in all lowercase letters with hyphens instead of underscores
font-size: $font_size_90;
`0.5` should be written without a leading zero as `.5`
color: rgba($black, 0.5);
}
 
> .filter-input-group {
> .button-icon {
Properties should be ordered background, border, color, cursor, font-size, height, margin-left, padding, position, text-align, width, z-index
Name of variable `font_size_110` should be written in all lowercase letters with hyphens instead of underscores
font-size: $font_size_110;
position: absolute;
z-index: $layer-8;
margin-left: 3px;
padding: 0;
`border: 0` is preferred over `border: none`
border: none;
background: none;
color: $search-button-color;
width: 30px;
height: 40px;
text-align: center;
cursor: pointer;
 
Nesting should be no greater than 3, but was 4
&:hover {
color: $search-button-hover-color;
}
}
 
> input {
Properties should be ordered -webkit-appearance, background, border, border-bottom, border-collapse, color, font-size, height, padding-left, padding-right, width
width: 100%;
height: 40px;
padding-left: 35px;
padding-right: 25px;
Expected item on line 186 to appear before line 182. Rule sets should be ordered as follows: `@extends`, `@includes` without `@content`, properties, `@includes` with `@content`, nested rule sets
@include box-sizing(border-box);
`0.1` should be written without a leading zero as `.1`
@include single-box-shadow(0, 1px, 6px, 1px, rgba($black, 0.1), inset);
@include rounded-except(none);
`border: 0` is preferred over `border: none`
border: none;
`0.7` should be written without a leading zero as `.7`
border-bottom: 1px solid rgba($white, 0.7);
border-collapse: collapse;
-webkit-appearance: none; // Remove rounding styling of input fields on iOS.
Name of variable `font_size_95` should be written in all lowercase letters with hyphens instead of underscores
font-size: $font_size_95;
background: $primary;
color: $white;
}
 
> input:focus {
outline: none;
}
}
}
 
Merge rule `.input-search-filter.input-search-filter-option` with rule on line 152
.input-search-filter.input-search-filter-option {
> .filter-input-group > input {
@include rounded-except(upper-right);
}
 
.input-search-filter-option {
Properties should be ordered background, border, cursor, font-size, margin, max-height, padding, padding-bottom, padding-top
Name of variable `font_size_95` should be written in all lowercase letters with hyphens instead of underscores
font-size: $font_size_95;
`border: 0` is preferred over `border: none`
border: none;
margin: 0;
padding: 3px;
padding-top: 0;
padding-bottom: 0;
max-height: 23px;
`0.3` should be written without a leading zero as `.3`
background: rgba($white, 0.3);
Property `border` already defined on line 211
border: 1px solid rgba($white, 0);
cursor: pointer;
Expected item on line 220 to appear before line 210. Rule sets should be ordered as follows: `@extends`, `@includes` without `@content`, properties, `@includes` with `@content`, nested rule sets
@include rounded-except(bottom);
 
> span {
color: $black; // IE fallback
Property `color` already defined on line 223
`0.5` should be written without a leading zero as `.5`
color: midtone($black, 0.5);
}
 
> .fa {
color: $input-fa-color;
}
 
&:hover {
background: $search-button-hover-background;
`0.2` should be written without a leading zero as `.2`
border: 1px solid rgba($input-border-color, 0.2);
`0.3` should be written without a leading zero as `.3`
border-bottom: 1px solid rgba($white, 0.3);
 
Nesting should be no greater than 3, but was 4
.fa {
color: $search-button-fa-hover-color;
}
}
 
// Prevent hover state appearance when 'disabled' attribute is present.
&[disabled] {
`0.3` should be written without a leading zero as `.3`
background: rgba($white, 0.3);
border: 1px solid rgba($white, 0);
cursor: auto;
 
Nesting should be no greater than 3, but was 4
.fa {
color: $input-fa-color;
}
}
}
}
 
// Clearable input fields have a (x) that can be clicked for clearing the
// field's content.
.clearable {
position: relative;
 
&:hover {
.button-clear {
color: rgba($black, .4);
}
}
 
.button-clear {
Properties should be ordered background, border, border-collapse, color, font-size, margin-top, outline, position, right, top
position: absolute;
right: 0;
top: 50%;
margin-top: -15px;
 
Name of variable `greyscale_midtone` should be written in all lowercase letters with hyphens instead of underscores
color: $greyscale_midtone; // IE Fallback
Property `color` already defined on line 271
color: rgba($black, .1);
Name of variable `font_size_110` should be written in all lowercase letters with hyphens instead of underscores
font-size: $font_size_110;
 
border-collapse: collapse;
`border: 0` is preferred over `border: none`
border: none;
outline: none;
background: transparent;
}
 
.button-clear::after {
Prefer single quoted strings
content: "×";
}
 
.button-clear:hover {
color: $black;
cursor: pointer;
}
}