Skip to content

Commit

Permalink
[NTP][Panorama] Fix header spacing
Browse files Browse the repository at this point in the history
Set the header to have the same height as the line height for the header text. Otherwise, the height of the entire clickable button area (36px) increases the height of the header area, which makes the empty space above and below the header much larger.

Also, increased the top margin for the refresh daily toggle to be the total margin between itself and the header in order to account for css margin collapse. Otherwise, we end up with a total of 16px (the larger of the 2 margins) between the 2 elements, rather than the intended 24 px (16px + 8px). By setting the refresh daily top margin to 24px, the 16px bottom margin of the header will be collapsed, leaving us with a total 24px margin.

Screenshots:
screenshot/4q5RHPRqLS55SiF
screenshot/p8appAYKUrtxkV6
screenshot/9dBUa6ZMoHwupxp
screenshot/7HH4Qz82VniBhDT

(cherry picked from commit 16196a7)

Bug: 1406563
Change-Id: I2990219a640aad8bbe11ad338532e88f3e873589
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4206658
Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Riley Tatum <rtatum@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#1099308}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4213892
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/5563@{#99}
Cr-Branched-From: 3ac59a6-refs/heads/main@{#1097615}
  • Loading branch information
Riley Tatum authored and Chromium LUCI CQ committed Feb 1, 2023
1 parent 30d90fb commit ccd27c5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#headerContainer {
align-items: center;
display: flex;
height: 20px;
margin: 16px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#headerContainer {
align-items: center;
display: flex;
height: 20px;
margin: 16px 16px 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#headerContainer {
align-items: center;
display: flex;
height: 20px;
margin: 16px;
}

Expand Down Expand Up @@ -66,7 +67,7 @@
#refreshDailyToggleContainer {
display: flex;
justify-content: space-between;
margin: 8px 16px 16px;
margin: 24px 16px 16px;
}

#refreshDailyToggleTitle {
Expand Down

0 comments on commit ccd27c5

Please sign in to comment.