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: avoid css issue with border when hoisting meta block #13877

Merged
merged 4 commits into from
Apr 20, 2022

Conversation

paulirish
Copy link
Member

in this case we don't want some bottom borders if the meta block is right under the metrics.

Copy link
Collaborator

@connorjclark connorjclark left a comment

Choose a reason for hiding this comment

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

Problem at bottom of report:

image

@@ -695,11 +695,10 @@
border-top: 1px solid var(--report-border-color-secondary);
}

.lh-metric:nth-last-child(-n+2) {
.lh-category:not(.lh--hoisted-meta) .lh-metric:nth-last-child(-n+2) {
border-bottom: 1px solid var(--report-border-color-secondary);
Copy link
Collaborator

Choose a reason for hiding this comment

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

was thinking about how else to do this, and a :not(:last-child) ... almost works but lh-metrics-container isn't the last element normally anyways so nope.

@paulirish
Copy link
Member Author

Problem at bottom of report:

ah true. yeah that has existed in the PSI report for a few months now. but its ugly. so yeah i put in a fix for it.

@connorjclark connorjclark changed the title report: add styling hook if metablock is hoisted up report: avoid css issue with border when hoisting meta block Apr 19, 2022
@brendankenny
Copy link
Member

I'll defer to @connorjclark

@@ -695,11 +695,10 @@
border-top: 1px solid var(--report-border-color-secondary);
}

.lh-metric:nth-last-child(-n+2) {
.lh-category:not(.lh--hoisted-meta) .lh-metric:nth-last-child(-n+2) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

since this is not trivial can you add a comment for why we are doing this? "avoid extraneous border when we move meta block into metrics div" or something

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.

4 participants