-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from CityOfDetroit/fix.table
Use table HTML elements for a11y
- Loading branch information
Showing
21 changed files
with
646 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tbody { | ||
display: block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
.table-cell { | ||
td { | ||
display: block; | ||
padding: 0.5rem 0.5rem; | ||
background-color: var(--bs-table-bg); | ||
border-bottom: solid var(--bs-border-width) var(--bs-secondary); | ||
box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); | ||
height: 100%; | ||
} | ||
|
||
.table-cell.table-striped, | ||
.table-cell.table-striped-columns { | ||
td.table-striped, | ||
td.table-striped-columns { | ||
--bs-table-accent-bg: var(--bs-table-striped-bg); | ||
} | ||
|
||
.table-cell.table-legacy-responsive { | ||
td.table-scrollable { | ||
width: 5em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@use '../../../scss/mixins/table'; | ||
@import '../../../../node_modules/bootstrap/scss/mixins/breakpoints'; | ||
@import '../../../../node_modules/bootstrap/scss/variables'; | ||
|
||
@include media-breakpoint-down(lg) { | ||
td.table-stacked.cell-header-block { | ||
@include table.th-td-stacked-block-styles; | ||
} | ||
|
||
td.table-stacked:not(.cell-header-block) { | ||
@include table.th-td-stacked-inline-styles; | ||
|
||
& div.content { | ||
@include table.cell-content-stacked-inline-styles; | ||
} | ||
} | ||
|
||
td[data-label].table-stacked { | ||
&.cell-header-block { | ||
@include table.th-td-labeled-stacked-block-styles; | ||
} | ||
|
||
&:not(.cell-header-block) { | ||
@include table.th-td-labeled-stacked-inline-styles; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/components/atoms/TableCellHeader/_table-cell-header.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@use '../../../scss/mixins/table'; | ||
@import '../../../../node_modules/bootstrap/scss/mixins/breakpoints'; | ||
@import '../../../../node_modules/bootstrap/scss/variables'; | ||
|
||
@include media-breakpoint-down(lg) { | ||
th.table-stacked.cell-header-block { | ||
@include table.th-td-stacked-block-styles; | ||
} | ||
|
||
th.table-stacked:not(.cell-header-block) { | ||
@include table.th-td-stacked-inline-styles; | ||
|
||
& div.content { | ||
@include table.cell-content-stacked-inline-styles; | ||
} | ||
} | ||
|
||
th[data-label].table-stacked { | ||
&.cell-header-block { | ||
@include table.th-td-labeled-stacked-block-styles; | ||
} | ||
|
||
&:not(.cell-header-block) { | ||
@include table.th-td-labeled-stacked-inline-styles; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
thead { | ||
display: block; | ||
} |
Oops, something went wrong.