-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug - Table header columns not rendering responsively #2466
Comments
I'm unable to access DFO's site atm, but this issue is likely being caused by a CSS selector that was recently introduced via #2450 ( |
Unfortunately we suffered a server outage yesterday at one of our regional facilities, so the website was unavailable for a few hours. Service has been restored, and the links above are now active for you to review. Hopefully it all comes down to the CSS selector you mentioned, which should be a fairly easy/quick fix. Let us know if there is anything we can do to assist. |
wet-boew#2450 added a CSS selector that set the word-break property to break-word anywhere within the main element. But it had unexpected side effects in certain kinds of two-dimensional content, such as tables. Specifically, it could cause wide tables (even ones situated within table-responsive containers) to divide their columns improperly - resulting in individual numbers in number groupings "splitting" across lines, columns that are too narrow to fit short words on the same line, non-breaking spaces getting ignored, etc... This resolves it by adding overrides to reset the word-break properties of any table child elements to initial. Fixes wet-boew#2466.
Required information
Describe the bug
A recent update to GCweb theme is causing table columns to appear janky. Specifically, it is causing column headers to be narrower than they should, which then pushes the text in the header up vertically. It's possible to use colgroup or to hard-code the column widths, but we suspect the CSS file in GCweb v16.1.0 to be over-writing that in some cases.
This is occurring in all tables across the entire Fisheries and Oceans Canada and Canadian Coast Guard websites. And, since we are linking dynamically to the latest GCweb dist, I'm sure is also the case for any other website running this latest build.
To Reproduce
View these pages to see tables coded on DFO webpages in a variety to ways. The layout issues apply to all of these tables:
https://www.dfo-mpo.gc.ca/science/hydrography-hydrographie/opp-ppo/index-eng.html
-> No table-responsive or column sizing classes
https://www.dfo-mpo.gc.ca/science/organization/sec-ces/pacific-pacifique/index-eng.html
-> Table wrapped in
<div class="table-responsive">
and column sizing classes not declaredhttps://www.dfo-mpo.gc.ca/science/partnerships-partenariats/research-recherche/cebp-pdecr/data-donnees-eng.html
-> No table-responsive or column sizing classes; all column classes set to "small"
https://www.dfo-mpo.gc.ca/science/partnerships-partenariats/research-recherche/its-sit/index-eng.html
-> No table-responsive or column sizing classes; just
<table class="table wb-tables">
https://www.dfo-mpo.gc.ca/science/partnerships-partenariats/research-recherche/mcs-smc/index-eng.html
->
<table class="table table-responsive table-bordered table-striped">
applied, no column sizing classeshttps://www.dfo-mpo.gc.ca/science/partnerships-partenariats/research-recherche/mpri-irmp/projects-projets-eng.html
->
<table id="projectsTable" class="table wb-tables tabled-bordered table-striped">
applied, column 2-only hasclass="col-sm-4"
https://www.dfo-mpo.gc.ca/science/publications/ecosystem/index-eng.htm#table2
->
<table class="table table-bordered table-responsive table-condensed"
applied; no column sizing classes declaredhttps://design.canada.ca/pattern-library.html
-> table column header spacing issue present on Template and pattern library for Canada.ca page.
View these pages to see tables on DFO webpages that have hard-coded column sizing. This generally forces the browser to render the tables as-instructed and without issue, but undermines the whole responsive-layout part of the framework:
Expected behaviour
Who shall do the work?
I am asking for Principal publisher to please do the work
Additional information (optional)
Version of WET-BOEW/GCWeb you are using
We are linking to the Canada.ca (GCWeb) v16.1.0 distribution. However, we have noticed that table column layout issues began to appear in v16.0.0. We are testing v15.8.0 locally on our DEV servers, and that appears to solve the table column layout issue.
Desktop/Smartphone (please complete the following information)
All browsers; mobile and desktop.
Screenshots
If applicable, add screenshots to help explain the bug.
Additional context
Please feel free to reach out to our team via email for any questions, comments, or concerns you might have with this bug fix request: [email protected]
The text was updated successfully, but these errors were encountered: