-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(top-app-bar): Add dense #2475
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2475 +/- ##
=======================================
Coverage 98.87% 98.87%
=======================================
Files 102 102
Lines 4072 4072
Branches 510 510
=======================================
Hits 4026 4026
Misses 46 46 Continue to review full report at Codecov.
|
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.
If you check both dense and prominent, then uncheck one of them, the short checkbox will be enabled. Seems like a bug.
} | ||
|
||
.mdc-top-app-bar__section { | ||
padding: 0 $mdc-top-app-bar-dense-section-horizontal-padding; |
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.
I don't think you need this css rule. Isn't it covered by line 154?
c55b35c
to
d034263
Compare
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.
LGTM
denseCheckbox.addEventListener('change', function() { | ||
appBarEl.classList[this.checked ? 'add' : 'remove']('mdc-top-app-bar--dense'); | ||
|
||
shortCheckbox.disabled = this.checked || prominentCheckbox.checked; |
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.
Dense disables short, but short does not disable dense
.mdc-top-app-bar__title { | ||
@include mdc-rtl-reflexive-box(padding, left, $mdc-top-app-bar-title-left-padding); | ||
|
||
padding-bottom: $mdc-top-app-bar-prominent-dense-title-bottom-padding; |
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 is also overriding mobile-specific title bottom padding for prominent (not dense). Is that intentional?
(TBH I find it hard to follow the plethora of different title paddings but I get the impression it's to counteract outer padding...)
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.
It's intentional. The --dense
style is desktop only, so any styles it applies should override any other styles from the mobile media queries.
closes: #2426
Adds the
--dense
style to the top app bar.