-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
fix(report): align table headings & columns left & right #6063
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks awesome.
@@ -907,18 +907,23 @@ summary.lh-passed-audits-summary { | |||
} | |||
|
|||
.lh-table-column--text, | |||
.lh-table-column--url, | |||
.lh-table-column--node { | |||
text-align: left; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to write this, or is it the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or i guess for 'td' this'll be redundant but neccessary for the 'th's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes th center by default I could override the default th behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sg. lets add a comment of /* Looks unnecessary, but mostly for keeping the <th>s left-aligned */
@@ -907,18 +907,23 @@ summary.lh-passed-audits-summary { | |||
} | |||
|
|||
.lh-table-column--text, | |||
.lh-table-column--url, | |||
.lh-table-column--node { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you write a lil script that goes over an LHR and pulls out all these itemTypes? it'll be easier to assert we've accounted for all of them. :)
you could just add in a css comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array.from(new Set($$('[class*="lh-table-column--"]').map(el => el.className)))
- lh-table-column--thumbnail
- lh-table-column--url
- lh-table-column--bytes
- lh-table-column--timespanMs
- lh-table-column--ms
- lh-table-column--text
- lh-table-column--empty
- lh-table-column--code
- lh-table-column--node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
It aligns our columns & headings correctly.
This is how it looks:
https://codepen.io/wardpeet/full/zJyMGx
Related Issues/PRs
#6049