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

chore(list): remove dark theme #2082

Merged
merged 17 commits into from
Jan 30, 2018
Merged

chore(list): remove dark theme #2082

merged 17 commits into from
Jan 30, 2018

Conversation

moog16
Copy link
Contributor

@moog16 moog16 commented Jan 25, 2018

No description provided.

@codecov-io
Copy link

codecov-io commented Jan 25, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2082   +/-   ##
=======================================
  Coverage   99.33%   99.33%           
=======================================
  Files          84       84           
  Lines        3769     3769           
  Branches      490      490           
=======================================
  Hits         3744     3744           
  Misses         25       25

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 118364e...8c14227. Read the comment docs.

@@ -13,7 +13,6 @@
// limitations under the License.

$mdc-list-divider-color-light: rgba(0, 0, 0, .12) !default;
$mdc-list-divider-color-dark: rgba(255, 255, 255, .2) !default;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering one of two things here...

  • Should we keep this variable and use mdc-theme-contrast-tone in our styles to determine whether to use light or dark based on the value of the background color?
  • Should we remove this and also remove -light from the other variable?

cc @acdvorak

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we would just keep this style in here that other people can reference if they create their own "dark-theme"?

Copy link
Contributor

Choose a reason for hiding this comment

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

I vote for option 1: keep this variable and use mdc-theme-contrast-tone.

E.g.:

@at-root {
  $divider-color: if(
    mdc-theme-contrast-tone($mdc-theme-background) == "dark",
    $mdc-list-divider-color-dark,
    $mdc-list-divider-color-light
  );

  @include mdc-list-divider-color($divider-color);
}

That way, if the client overrides $mdc-theme-background, we will automatically set the correct divider color for them. If they don't like the color we choose, they can always override it with the mixin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I see what you guys are saying now. I will update as stated here. Thanks!

@@ -21,26 +21,12 @@
@import "./mixins";
@import "./variables";

.mdc-list,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm pretty sure you can remove the import for @material/theme/mixins after removing the dark styles in this file? (We also missed this for mdc-button.scss I think, so might want to send a tiny separate PR for that, and check on the other open PRs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do...good call.

@moog16 moog16 changed the title Feat/list/remove dark theme feat(list): remove dark theme Jan 25, 2018
@moog16 moog16 changed the title feat(list): remove dark theme chore(list): remove dark theme Jan 25, 2018
@kfranqueiro kfranqueiro dismissed their stale review January 26, 2018 18:32

Comment was addressed, Andy is taking this over

@kfranqueiro kfranqueiro assigned acdvorak and unassigned kfranqueiro Jan 26, 2018
@@ -14,6 +14,5 @@

$mdc-list-divider-color-light: rgba(0, 0, 0, .12) !default;
Copy link
Contributor

Choose a reason for hiding this comment

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

The names of these variables are confusing - can we rename them while we're here? E.g.:

$mdc-list-divider-color-on-light-bg: rgba(0, 0, 0, .12) !default;
$mdc-list-divider-color-on-dark-bg: rgba(255, 255, 255, .2) !default;

We'll need to add BREAKING CHANGE to the PR description (and the commit message when we squash and merge).

@@ -191,7 +170,13 @@ a.mdc-list-item {
}

@at-root {
@include mdc-list-divider-color($mdc-list-divider-color-light);
$divider-color: if(
mdc-theme-contrast-tone($mdc-theme-background) == "dark",
Copy link
Contributor

Choose a reason for hiding this comment

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

My mistake - this should actually be mdc-theme-tone($mdc-theme-background) == "dark"

The $mdc-list-divider-color-[light|dark] variables are named confusingly, so I got them mixed up.

If you look at the "Full-Width Dividers" and "Inset Dividers" examples, the dividers should be visible; currently they're not (because the colors were flipped).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup just noticed...looks better

Matty Goo added 4 commits January 29, 2018 13:18
…ponents/material-components-web into feat/list/remove-dark-theme
BREAKING CHANGE: renamed divider scss vars

`$mdc-list-divider-color-light` to `$mdc-list-divider-color-on-light-bg`,
`$mdc-list-divider-color-dark` to ``$mdc-list-divider-color-on-dark-bg`
Copy link
Contributor

@acdvorak acdvorak left a comment

Choose a reason for hiding this comment

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

LGTM!

@moog16 moog16 merged commit a2c1bd0 into master Jan 30, 2018
@moog16 moog16 deleted the feat/list/remove-dark-theme branch January 30, 2018 22:37
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.

4 participants