Skip to content

Commit

Permalink
Add table wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Nov 13, 2023
1 parent d4de9b2 commit 72b334c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Events can now be added when cookie preferences change
- Table styles added
- Pagination component has the option to have no numbers
- Table wrapper for tables wider than the current viewport

### Changed

Expand Down
24 changes: 24 additions & 0 deletions src/nationalarchives/utilities/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@use "../tools/spacing";
@use "../tools/typography";
@use "../variables/assets";
@use "../variables/grid";

.tna-table {
width: 100%;
Expand Down Expand Up @@ -64,3 +65,26 @@
}
}
}

.tna-table-wrapper {
width: 100%;
@include spacing.space-above;
padding-left: grid.$gutter-width;
padding-right: grid.$gutter-width;

position: relative;
left: -#{grid.$gutter-width};

overflow: auto;

.tna-table {
width: auto;
}

@include media.on-tiny {
padding-left: grid.$gutter-width-tiny;
padding-right: grid.$gutter-width-tiny;

left: -#{grid.$gutter-width-tiny};
}
}

0 comments on commit 72b334c

Please sign in to comment.