-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix alignment of columns in the More links component on homepage
In tablet view and above, the columns in this component were misaligned with the columns in the Featured component above. This is due to two incompatible layout approaches. Several approaches to align these elements were investigated, using combinations of float based layouts and CSS grid. However these approaches did not yield any compatible alignments, possibly due to differences in how browsers calculate `%` widths vs `fr` widths. The fix was to use CSS `columns` with a `column-gap` matching the gutter in the row/columns layout classes, and limiting the width of the list to two columns out of three (66.66%). This aligns the elements correctly while keeping the required top -> bottom then left -> right behaviour of the links. Note that the `break-inside: avoid-column` and the padding-top and padding-bottom tweaks are used to prevent triggering a possible bug in Safari where focused anchors in a multi-column layout cause links to jump between columns. As this is not a long-term robust solution, we should investigate this further for a possible refactor.
- Loading branch information
1 parent
462f518
commit 5f3df65
Showing
2 changed files
with
55 additions
and
31 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
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