Skip to content

Commit 244c779

Browse files
committed
Add hound testing, lint all scss, and update docs
1 parent 1777f2b commit 244c779

File tree

11 files changed

+232
-66
lines changed

11 files changed

+232
-66
lines changed

.hound.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
scss:
2+
config_file: .scss-style.yml

.scss-style.yml

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
scss_files: "**/*.scss"
2+
linters:
3+
BangFormat:
4+
enabled: true
5+
space_before_bang: true
6+
space_after_bang: false
7+
BorderZero:
8+
enabled: false
9+
convention: zero
10+
ColorKeyword:
11+
enabled: false
12+
severity: warning
13+
ColorVariable:
14+
enabled: false
15+
Comment:
16+
enabled: true
17+
DebugStatement:
18+
enabled: true
19+
DeclarationOrder:
20+
enabled: true
21+
DuplicateProperty:
22+
enabled: true
23+
ElsePlacement:
24+
enabled: true
25+
style: same_line
26+
EmptyLineBetweenBlocks:
27+
enabled: true
28+
ignore_single_line_blocks: true
29+
EmptyRule:
30+
enabled: true
31+
FinalNewline:
32+
enabled: true
33+
present: true
34+
HexLength:
35+
enabled: false
36+
style: short
37+
HexNotation:
38+
enabled: true
39+
style: uppercase
40+
HexValidation:
41+
enabled: true
42+
IdSelector:
43+
enabled: true
44+
ImportantRule:
45+
enabled: true
46+
ImportPath:
47+
enabled: true
48+
leading_underscore: false
49+
filename_extension: false
50+
Indentation:
51+
enabled: true
52+
allow_non_nested_indentation: false
53+
character: space
54+
width: 2
55+
LeadingZero:
56+
enabled: false
57+
style: include_zero
58+
MergeableSelector:
59+
enabled: true
60+
force_nesting: true
61+
NameFormat:
62+
enabled: true
63+
allow_leading_underscore: true
64+
convention: hyphenated_lowercase
65+
NestingDepth:
66+
enabled: true
67+
max_depth: 4
68+
severity: warning
69+
PlaceholderInExtend:
70+
enabled: false
71+
PropertyCount:
72+
enabled: true
73+
include_nested: false
74+
max_properties: 10
75+
PropertySortOrder:
76+
enabled: true
77+
ignore_unspecified: false
78+
severity: warning
79+
separate_groups: false
80+
PropertySpelling:
81+
enabled: true
82+
extra_properties: []
83+
QualifyingElement:
84+
enabled: false
85+
allow_element_with_attribute: false
86+
allow_element_with_class: false
87+
allow_element_with_id: false
88+
severity: warning
89+
SelectorDepth:
90+
enabled: false
91+
max_depth: 5
92+
severity: warning
93+
SelectorFormat:
94+
enabled: true
95+
convention: hyphenated_lowercase
96+
Shorthand:
97+
enabled: true
98+
severity: warning
99+
SingleLinePerProperty:
100+
enabled: true
101+
allow_single_line_rule_sets: true
102+
SingleLinePerSelector:
103+
enabled: true
104+
SpaceAfterComma:
105+
enabled: true
106+
SpaceAfterPropertyColon:
107+
enabled: true
108+
style: one_space
109+
SpaceAfterPropertyName:
110+
enabled: true
111+
SpaceBeforeBrace:
112+
enabled: true
113+
style: space
114+
allow_single_line_padding: false
115+
SpaceBetweenParens:
116+
enabled: true
117+
spaces: 0
118+
StringQuotes:
119+
enabled: true
120+
style: single_quotes
121+
TrailingSemicolon:
122+
enabled: true
123+
TrailingZero:
124+
enabled: false
125+
UnnecessaryMantissa:
126+
enabled: true
127+
UnnecessaryParentReference:
128+
enabled: true
129+
UrlFormat:
130+
enabled: true
131+
UrlQuotes:
132+
enabled: true
133+
VariableForProperty:
134+
enabled: false
135+
properties: []
136+
VendorPrefixes:
137+
enabled: true
138+
identifier_list: bourbon
139+
include: []
140+
exclude: []
141+
ZeroUnit:
142+
enabled: true
143+
severity: warning
144+
Compass::PropertyWithMixin:
145+
enabled: false

knapsack/_index.scss

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
// Index
33
// ----
44

5-
6-
@import '_code';
7-
@import '_layout';
8-
@import '_tables';
9-
@import '_reset';
10-
@import '_typography';
11-
@import '_ui';
12-
@import '_utilities';
5+
@import 'code';
6+
@import 'layout';
7+
@import 'tables';
8+
@import 'reset';
9+
@import 'typography';
10+
@import 'ui';
11+
@import 'utilities';

knapsack/_layout.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
@mixin clearfix() {
1111
&:after {
12-
content: "";
13-
display: table;
1412
clear: both;
13+
content: '';
14+
display: table;
1515
}
1616
}
1717

@@ -25,12 +25,12 @@
2525
// Mixin: Ratio Box
2626
// Set a specific width/height ratio. Useful on background images and iframes.
2727

28-
@mixin ratio-box ($ratio: 1/1) {
28+
@mixin ratio-box ($ratio: 1 / 1) {
2929
overflow: hidden;
3030
position: relative;
3131

3232
&:before {
33-
content: "";
33+
content: '';
3434
display: block;
3535
height: 0;
3636
padding-top: (1 / $ratio) * 100%;
@@ -42,12 +42,12 @@
4242
// Sets an element to be full viewport height, with reasonble min and max-height
4343
// values.
4444

45-
@mixin full-page($height: 100vh, $min-height: 600px, $max-height: 850px) {
45+
@mixin full-page($height: 100vh, $max-height: 850px, $min-height: 600px) {
4646
// Only show for tablet and above
4747
@media screen and (min-width: 768px) {
48-
min-height: $min-height;
49-
max-height: $max-height;
5048
height: $height;
49+
max-height: $max-height;
50+
min-height: $min-height;
5151
}
5252
}
5353

knapsack/_reset.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
margin: 0;
2525
padding: 0;
2626
}
27+
2728
textarea {
2829
resize: vertical;
2930
}
@@ -35,22 +36,20 @@
3536
input[type="button"],
3637
input[type="submit"],
3738
input[type="reset"] {
39+
appearance: none;
3840
background: transparent;
3941
border: 0;
4042
color: inherit;
4143
font: inherit;
44+
-webkit-font-smoothing: antialiased;
4245
margin: 0;
4346
padding: 0;
44-
width: auto;
45-
-webkit-appearance: none;
46-
-webkit-font-smoothing: antialiased;
47-
-webkit-user-select: none;
48-
-moz-user-select: none;
49-
-ms-user-select: none;
5047
user-select: none;
48+
width: auto;
49+
5150
&::-moz-focus-inner {
52-
padding: 0;
5351
border: 0;
52+
padding: 0;
5453
}
5554
}
5655
}
@@ -60,6 +59,7 @@
6059
p:first-of-type {
6160
margin-top: 0;
6261
}
62+
6363
p:last-of-type {
6464
margin-bottom: 0;
6565
}
@@ -69,8 +69,8 @@
6969
@mixin reset-media {
7070
img,
7171
video {
72-
max-width: 100%;
7372
height: auto;
73+
max-width: 100%;
7474
}
7575
}
7676

knapsack/_tables.scss

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,27 @@
1313
// ex. table(striped: true)
1414

1515
@mixin table($border : true, $striped : true, $condensed : false) {
16-
max-width: 100%;
1716
border-collapse: collapse;
1817
border-spacing: 0;
19-
width: 100%;
2018
margin-bottom: 18px;
19+
max-width: 100%;
20+
width: 100%;
2121

22-
th, td {
23-
padding: 8px;
22+
th,
23+
td {
24+
border-top: 1px solid #DDD;
2425
line-height: 18px;
26+
padding: 8px;
2527
text-align: left;
2628
vertical-align: top;
27-
border-top: 1px solid #ddd;
2829
}
2930

3031
th {
3132
font-weight: bold;
3233
}
3334

3435
thead th {
35-
vertical-align: bottom;
36+
vertical-align: bottom;
3637
}
3738

3839
thead:first-child tr th,
@@ -41,23 +42,26 @@
4142
}
4243

4344
tbody + tbody {
44-
border-top: 2px solid #ddd;
45+
border-top: 2px solid #DDD;
4546
}
4647

4748
@if $condensed {
48-
th, td {
49+
th,
50+
td {
4951
padding: 4px 5px;
5052
}
5153
}
5254

5355
@if $border {
54-
border: 1px solid #ddd;
56+
border: 1px solid #DDD;
5557
border-collapse: separate;
56-
*border-collapse: collapsed;
5758
border-radius: 4px;
5859

59-
th + th, td + td, th + td, td + th {
60-
border-left: 1px solid #ddd;
60+
th + th,
61+
td + td,
62+
th + td,
63+
td + th {
64+
border-left: 1px solid #DDD;
6165
}
6266

6367
thead:first-child tr:first-child th,
@@ -68,12 +72,12 @@
6872

6973
thead:first-child tr:first-child th:first-child,
7074
tbody:first-child tr:first-child td:first-child {
71-
border-radius: 4px 0 0 0;
75+
border-radius: 4px 0 0;
7276
}
7377

7478
thead:first-child tr:first-child th:last-child,
7579
tbody:first-child tr:first-child td:last-child {
76-
border-radius: 0 4px 0 0;
80+
border-radius: 0 4px;
7781
}
7882

7983
thead:last-child tr:last-child th:first-child,
@@ -83,19 +87,19 @@
8387

8488
thead:last-child tr:last-child th:last-child,
8589
tbody:last-child tr:last-child td:last-child {
86-
border-radius: 0 0 4px 0;
90+
border-radius: 0 0 4px;
8791
}
8892
}
8993

9094
@if $striped {
9195
tbody tr:nth-child(odd) td,
9296
tbody tr:nth-child(odd) th {
93-
background-color: #f9f9f9;
97+
background-color: #F9F9F9;
9498
}
9599
}
96100

97-
tbody tr:hover td,
98-
tbody tr:hover th {
99-
background-color: #f5f5f5;
100-
}
101+
tbody tr:hover td,
102+
tbody tr:hover th {
103+
background-color: #F5F5F5;
104+
}
101105
}

0 commit comments

Comments
 (0)