Skip to content

Commit d8b226c

Browse files
authored
Merge pull request #352 from rackerlabs/surf-1432
chore(wip): surf-1432 css resets
2 parents 58d24e0 + ac0b13e commit d8b226c

File tree

9 files changed

+76
-63
lines changed

9 files changed

+76
-63
lines changed

docs/_templates/component.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{% if page.also %}
2222
<a href="#see-also">See Also</a>
2323
{% endif %}
24-
<hr />
24+
<hr class="hxDivider" />
2525
<a class="top-link" href="#top">Back to Top</a>
2626
</nav>
2727
</aside>

docs/_templates/element.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
{% if page.also %}
5858
<a href="#see-also">See Also</a>
5959
{% endif %}
60-
<hr />
60+
<hr class="hxDivider" />
6161
<a class="top-link" href="#top">Back to Top</a>
6262
</nav>
6363
</aside>

docs/_templates/partials/sidebar.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
{% if page.also %}
55
<a href="#see-also">See Also</a>
66
{% endif %}
7-
<hr />
7+
<hr class="hxDivider" />
88
<a class="top-link" href="#top">Back to Top</a>
99
</nav>

src/helix-ui/styles/components/forms.less

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@
88
// a.k.a. "field name"
99
label {
1010
.FieldName();
11+
margin: 0;
12+
padding: 0;
13+
}
14+
15+
legend {
16+
border: none;
17+
color: inherit;
18+
display: block;
19+
font-weight: 400;
20+
line-height: 1;
21+
margin-bottom: 0;
22+
padding: 0;
23+
width: 100%;
1124
}
1225

1326
input + label { // a.k.a. "option label"
@@ -21,6 +34,9 @@
2134
}
2235

2336
fieldset {
37+
border: none;
38+
padding: 0;
39+
2440
> legend {
2541
.FieldName();
2642
margin-bottom: 0.25rem; // ~4px

src/helix-ui/styles/components/tables.less

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
@import (reference) "components/typography";
22

3+
// Table style resets
4+
.hxTable {
5+
background-color: transparent;
6+
border-collapse: collapse;
7+
border-spacing: 0;
8+
border: none;
9+
font-size: 1rem; // 16px
10+
margin: 1.5rem 0;
11+
padding: 0;
12+
width: 100%;
13+
14+
thead,
15+
tbody,
16+
tfoot {
17+
background-color: transparent;
18+
border: none;
19+
margin: 0;
20+
padding: 0;
21+
22+
tr {
23+
background-color: transparent;
24+
border: none;
25+
margin: 0;
26+
padding: 0;
27+
28+
th,
29+
td {
30+
background-color: transparent;
31+
border: none;
32+
font-size: 1rem;
33+
line-height: 1;
34+
margin: 0;
35+
padding: 0;
36+
text-align: left;
37+
}
38+
}
39+
}
40+
}
41+
342
// ===== States =====
443
@state-selected-bg: @cyan-50;
544

src/helix-ui/styles/overrides.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,10 @@ p {
2424
fieldset label {
2525
font-size: 0.875rem; // NOTE: Edge/IE will truncate to 0.88rem
2626
}
27+
28+
hr.hxDivider {
29+
border-color: currentColor;
30+
border-style: solid;
31+
border-width: 1px 0 0;
32+
margin: 0.75rem 0;
33+
}

src/helix-ui/styles/reset.less

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ html {
2727

2828
@import 'reset/forms';
2929
@import 'reset/html5';
30-
@import 'reset/tables';
3130

3231
[hidden] {
3332
display: none;
@@ -41,22 +40,3 @@ caption {
4140
padding: 0;
4241
text-align: left;
4342
}
44-
45-
// TODO: scope as .hxDivider
46-
// docs/_templates will need updates
47-
hr {
48-
border-color: currentColor;
49-
border-style: solid;
50-
border-width: 1px 0 0;
51-
margin: 0.75rem 0;
52-
}
53-
54-
// Remove "X" added by Edge and IE
55-
input::-ms-clear {
56-
display: none;
57-
}
58-
59-
// Ensure that browsers inherit the proper font settings.
60-
textarea {
61-
font: inherit;
62-
}

src/helix-ui/styles/reset/forms.less

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ========== FORMS & CONTROLS ========== */
2-
// TODO: remove file, be aware that this could potentially break styles elsewhere
2+
// DEPRECATED STYLE RESETS
33
button {
44
color: inherit;
55
font: inherit;
@@ -31,3 +31,13 @@ legend {
3131
padding: 0;
3232
width: 100%;
3333
}
34+
35+
// Remove "X" added by Edge and IE
36+
input::-ms-clear {
37+
display: none;
38+
}
39+
40+
// Ensure that browsers inherit the proper font settings.
41+
textarea {
42+
font: inherit;
43+
}

src/helix-ui/styles/reset/tables.less

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)