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(redesign): various whitespace adjustments (DRAFT) #8591

Merged
merged 14 commits into from
Apr 26, 2019

Conversation

connorjclark
Copy link
Collaborator

@patrickhulce
Copy link
Collaborator

we don't get anymore top margin now though between the category header should we bump that a tad?

image

@connorjclark
Copy link
Collaborator Author

connorjclark commented Apr 24, 2019

Ok, I tried to adjust that @patrickhulce, and some other things that didn't match re: section spacing with the report, and it looks closer now ?

Super hard to split up changes that affect spacing (padding, margin of various components, font sizes, etc). I want to pull up the design and the impl side by side, and make pixel-perfect adjustments. but if the font size goes in one PR, and spacing for gauges in one, and margins for sections in another ... well, my brain goes kaploot.

so maybe I use this PR to make tons of spacing adjustments in one go?

@patrickhulce
Copy link
Collaborator

I want to pull up the design and the impl side by side, and make pixel-perfect adjustments.

Why don't we just do that then? :) That's always the strategy that makes more sense to me personally, sit down with a designer and make all the adjustments at once.

@connorjclark
Copy link
Collaborator Author

Why don't we just do that then? :)

wunderbar

@connorjclark connorjclark changed the title report(redesign): increase audit group bottom margin report(redesign): various whitespace adjustments Apr 24, 2019
@connorjclark connorjclark changed the title report(redesign): various whitespace adjustments report(redesign): various whitespace adjustments (DRAFT) Apr 24, 2019
.lh-audit {
border-top: 1px solid var(--report-secondary-border-color);
}
.lh-audit ~ .lh-audit {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a somewhat expensive selector. can we just do border-top on the .lh-audit:nth-child(1) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. had to be 2.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah. i see. i was looking at best practices where the DOM is a little different.

image

hmm. if we can still keep to something simple like nth-child and support both these cases, i'd like to. but if its a PITA then perhaps we have to go back to the tilde.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer the tilde. this dom changes too much, and this would easily get out of date

@@ -500,6 +500,9 @@

.lh-gauge__svg-wrapper {
position: relative;
/* The wrapper adds some height to the element. display: inline-block doesn't
work for some reason, so instead just shave off the extra height. */
margin-bottom: -7px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm i'm only seeing 5 extra pixels, not 7.

also i'd much rather determine where the phantom height is coming from and address that rather than go with negative margin hacks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
image

I tried setting the svg wrapper to inline-block (which should not consume those extra 7 pixels):

image

But it gets ignored.

...After typing this, I realized I needed to set the height: height: var(--gauge-circle-size).

/*
* Apply border-top to just the first audit. First child is the header.
*/
.lh-audit:nth-child(2) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can go back to the tilde since this doesn't work as consistently.

@paulirish paulirish merged commit 6cde4dc into master Apr 26, 2019
@paulirish paulirish deleted the rd-audit-group-ws branch April 26, 2019 19:50
@connorjclark connorjclark mentioned this pull request Apr 26, 2019
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants