Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 78d9382

Browse files
committed
clumsily adds table styling from USWDS 3.x
1 parent 6dce1de commit 78d9382

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

assets/uswds/scss/theme/_uswds-theme-custom-styles.scss

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,57 @@ button,
225225
}
226226
}
227227
}
228+
229+
// USWDS simple table styling
230+
// This guide is being minimally maintained pending migration
231+
// and rather than upgrade versions of USWDS, we have elected
232+
// simply to copy in the rules we need to style an example table
233+
234+
.usa-table-container--scrollable {
235+
margin: 1.25rem 0;
236+
overflow-y: hidden;
237+
}
238+
239+
.usa-table-container--scrollable .usa-table {
240+
margin: 0;
241+
}
242+
243+
.usa-table {
244+
border-collapse: collapse;
245+
border-spacing: 0;
246+
color: #1b1b1b;
247+
font-family: Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;
248+
font-size: 1.06rem;
249+
line-height: 1.5;
250+
margin: 1.25rem 0;
251+
}
252+
253+
.usa-table, .usa-table tbody th {
254+
text-align: left;
255+
}
256+
257+
.usa-prose>.usa-table--striped tbody tr:nth-child(odd) td, .usa-prose>.usa-table--striped tbody tr:nth-child(odd) th, .usa-table--striped tbody tr:nth-child(odd) td, .usa-table--striped tbody tr:nth-child(odd) th {
258+
background-color: #f0f0f0;
259+
color: #1b1b1b;
260+
}
261+
262+
.usa-table thead td, .usa-table thead th {
263+
background-color: #e6e6e6;
264+
color: #1b1b1b;
265+
}
266+
267+
.usa-table thead th {
268+
background-clip: padding-box;
269+
font-weight: 700;
270+
line-height: 1.3;
271+
}
272+
.usa-prose>table td, .usa-prose>table th, .usa-table td, .usa-table th {
273+
background-color: #fff;
274+
border: 1px solid #1b1b1b;
275+
font-weight: 400;
276+
padding: 0.5rem 1rem;
277+
}
278+
279+
.usa-table-container--scrollable td {
280+
white-space: nowrap;
281+
}

0 commit comments

Comments
 (0)