Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
feat(card): Changes styling to use custom properties
Browse files Browse the repository at this point in the history
  • Loading branch information
rowa-audil authored and ffriedl89 committed May 20, 2020
1 parent 6689b1b commit b5e1b7f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
29 changes: 9 additions & 20 deletions libs/barista-components/card/src/_card-theme.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
@import '../../core/src/theming/theming';
.dt-theme-dark {
.dt-card {
color: #ffffff;
background-color: rgba(255, 255, 255, 0.2);

@mixin dt-theme-card($theme) {
$is-dark: map-get($theme, 'is-dark');
.dt-card-icon svg {
fill: #ffffff;
}

@if ($is-dark == true) {
.dt-card {
.dt-card-title,
.dt-card-subtitle {
color: #ffffff;
background: rgba(255, 255, 255, 0.2);

.dt-card-icon svg {
fill: #ffffff;
}

.dt-card-title,
.dt-card-subtitle {
color: #ffffff;
}
}
}
}

// Apply the card theme to all theme definitions
@include dt-apply-theme() {
@include dt-theme-card($dt-current-theme);
}
1 change: 0 additions & 1 deletion libs/barista-components/card/src/card.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@import '../../style/font-mixins';
@import '../../core/src/style/variables';
@import '../../core/src/style/button';
@import '../../core/src/theming/theming';
@import './card-theme';

.dt-card {
Expand Down

0 comments on commit b5e1b7f

Please sign in to comment.