Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Add custom styling for dark mode buttons to fix contrast
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth G. Franqueiro committed Sep 26, 2017
1 parent 2b32d33 commit 609882e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions demos/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
$mdc-theme-primary: $material-color-grey-900 !default;
$mdc-theme-secondary: $material-color-light-green-a700 !default;

// Import button mixins to apply overrides for dark theme
// TODO(kfranqueiro): Pending further design discussion around how to manage dark theme
@import "../packages/mdc-button/mixins";
// All demo pages have a top toolbar, and most of them use theme variables.
// Import these *after* setting theme colors to override defaults in mdc-theme.
@import "../packages/mdc-theme/mdc-theme";
Expand All @@ -46,6 +49,27 @@ fieldset {
}
}

$dark-button-color: $material-color-light-green-a200;
.mdc-button {
@include mdc-theme-dark {
@include mdc-button-ink-color($dark-button-color);
@include mdc-button-ripple((base-color: $dark-button-color, opacity: $mdc-unfilled-button-ripple-opacity));
}
}

.mdc-button--raised,
.mdc-button--unelevated {
@include mdc-theme-dark(".mdc-button", true) {
@include mdc-button-filled-accessible($dark-button-color);
}
}

.mdc-button--stroked {
@include mdc-theme-dark(".mdc-button", true) {
@include mdc-button-stroke-color($dark-button-color);
}
}

.catalog-title {
font-family: "Roboto Mono", monospace;
}
Expand Down

0 comments on commit 609882e

Please sign in to comment.