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

feat(top-app-bar): Add dense #2475

Merged
merged 7 commits into from
Apr 2, 2018
Merged

Conversation

williamernest
Copy link
Contributor

closes: #2426
Adds the --dense style to the top app bar.

@codecov-io
Copy link

codecov-io commented Mar 27, 2018

Codecov Report

Merging #2475 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a149b3...387cfc7. Read the comment docs.

Copy link
Contributor

@moog16 moog16 left a 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;
Copy link
Contributor

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?

Copy link
Contributor

@moog16 moog16 left a 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;
Copy link
Contributor

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;
Copy link
Contributor

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...)

Copy link
Contributor Author

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.

@williamernest williamernest merged commit 3feec58 into master Apr 2, 2018
@williamernest williamernest deleted the feat/top-app-bar/add-dense branch April 2, 2018 17:42
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.

Add an mdc-top-app-bar--dense
4 participants