Skip to content
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

report: improve some usages of css grid #14715

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

connorjclark
Copy link
Collaborator

I reviewed our usages of CSS grid, and found two things to improve:

drop grid-auto-rows: 1fr on metrics container

minor visual change, stops giving rows all the same height. was no good reason for this i think. it's just more whitespace.

image (1)

image (2)

simplify grid-template-columns on inner metric div

we were manually calculating how much space to give the first column by listing out how big that status icon should be. instead, we can just use auto. no visual change

@connorjclark connorjclark requested a review from a team as a code owner January 26, 2023 01:02
@connorjclark connorjclark requested review from adamraine and removed request for a team January 26, 2023 01:02
@brendankenny
Copy link
Member

drop grid-auto-rows: 1fr on metrics container

it's just more whitespace.

I don't have a strong opinion, but it does look a little more crowded. Should we add some margin to be more deliberate about it?

simplify grid-template-columns on inner metric div

FWIW I do see a visual change

@connorjclark
Copy link
Collaborator Author

drop grid-auto-rows: 1fr on metrics container

it's just more whitespace.

I don't have a strong opinion, but it does look a little more crowded. Should we add some margin to be more deliberate about it?

How's 5px?
image

simplify grid-template-columns on inner metric div

FWIW I do see a visual change

Ah, yeah the square icon is a slightly smaller width... and removing that makes the square look slightly too large compared to the other shapes :/

I wonder if this entire things is begging for a single grid, as opposed to this grid-ception thing we're doing.

I'll back off on this change. Or we just leave it... it's not something I can notice without flipping the styles back/forth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants