Skip to content

Commit 3e2765c

Browse files
authored
Merge pull request #505 from appuniversum/add-missing-content-styles
Add missing content styles
2 parents c7102fe + 93a3e26 commit 3e2765c

File tree

1 file changed

+110
-4
lines changed

1 file changed

+110
-4
lines changed

styles/components/_c-content.scss

+110-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $au-content-tiny: var(--au-small) !default;
2424
/* Component
2525
========================================================================== */
2626

27-
// @TODO: add base styling for common elements (tables, hr, blockquote, ...)
27+
// @TODO: add base styling for common elements (hr, blockquote, ...)
2828
.au-c-content {
2929
@include au-font-size($au-content-base-small);
3030
color: var(--au-gray-900);
@@ -77,7 +77,13 @@ $au-content-tiny: var(--au-small) !default;
7777
margin-left: $au-unit;
7878
}
7979

80-
ul.au-c-list {
80+
ol:not(.au-c-list-horizontal) {
81+
list-style: decimal;
82+
margin-left: $au-unit;
83+
}
84+
85+
ul.au-c-list,
86+
ol.au-c-list {
8187
list-style: none;
8288
margin-left: 0;
8389
}
@@ -88,11 +94,13 @@ $au-content-tiny: var(--au-small) !default;
8894
}
8995

9096
// @TODO: list-horizontal needs to be refactored to the list component.
91-
ul:not(.au-c-list-horizontal) li + li {
97+
ul:not(.au-c-list-horizontal) li + li,
98+
ol:not(.au-c-list-horizontal) li + li {
9299
margin-top: $au-unit-tiny;
93100
}
94101

95-
ul.au-c-list li + li {
102+
ul.au-c-list li + li,
103+
ol.au-c-list li + li {
96104
margin-top: 0;
97105
}
98106

@@ -117,6 +125,104 @@ $au-content-tiny: var(--au-small) !default;
117125
color: var(--au-gray-700);
118126
}
119127

128+
// Table styles are based on the <AuTable> component styles
129+
table:not(.au-c-table) {
130+
@include au-font-size(var(--au-h6));
131+
display: table;
132+
position: relative;
133+
width: 100%;
134+
border-collapse: collapse;
135+
outline: 0.1rem solid var(--au-gray-300); // border doesn't have the intended effect
136+
137+
thead {
138+
position: relative;
139+
width: 100%;
140+
z-index: var(--au-z-index-alpha);
141+
border: 0;
142+
@include au-font-size(var(--au-base), 1.2);
143+
}
144+
145+
th,
146+
td {
147+
max-width: 55ch;
148+
position: relative;
149+
text-align: start;
150+
}
151+
152+
th + th,
153+
th + td,
154+
td + th,
155+
td + td {
156+
&:after {
157+
content: "";
158+
display: block;
159+
position: absolute;
160+
width: 0.1rem;
161+
left: -0.1rem;
162+
top: 0;
163+
height: 100%;
164+
border-left: 0.1rem dotted var(--au-gray-300);
165+
}
166+
}
167+
}
168+
169+
thead:not(.au-c-table__header) {
170+
background-color: var(--au-white);
171+
172+
th {
173+
font-weight: var(--au-medium);
174+
text-align: left;
175+
white-space: nowrap;
176+
padding: $au-unit-small;
177+
border-radius: 0;
178+
border: 0;
179+
outline: 0;
180+
background-color: var(--au-white);
181+
box-shadow: inset 0 -0.2rem 0 0 var(--au-gray-300);
182+
}
183+
}
184+
185+
tbody:not(.au-c-table__body) {
186+
tr {
187+
border-bottom: 0.1rem solid var(--au-gray-300);
188+
background-color: var(--au-white);
189+
}
190+
191+
td,
192+
th {
193+
padding: $au-unit-small;
194+
}
195+
}
196+
197+
tfoot:not(.au-c-table__footer) {
198+
tr + tr {
199+
border-top: 0.1rem solid var(--au-gray-300);
200+
}
201+
202+
tr:first-child {
203+
border-top: 0.2rem solid var(--au-gray-300);
204+
}
205+
206+
tr {
207+
background-color: var(--au-white);
208+
}
209+
210+
td,
211+
th {
212+
@include au-font-size(var(--au-base));
213+
padding: $au-unit-tiny $au-unit-small;
214+
}
215+
}
216+
217+
caption:not(.au-c-table__caption) {
218+
@include au-font-size(var(--au-h5));
219+
font-weight: var(--au-medium);
220+
text-align: left;
221+
padding: $au-unit-tiny $au-unit-small;
222+
background-color: var(--au-gray-100);
223+
border-bottom: 0.1rem solid var(--au-gray-300);
224+
}
225+
120226
@include mq(small) {
121227
h1,
122228
.au-c-heading--1 {

0 commit comments

Comments
 (0)