react-toolbox/components/card/style.scss

121 lines
2.1 KiB
SCSS
Raw Normal View History

@import "../base";
@import "./config";
2015-10-04 04:10:13 +03:00
.card {
2015-11-25 22:14:22 +03:00
@include shadow-2dp();
2015-10-05 15:54:29 +03:00
display: flex;
width: 100%;
2015-10-05 15:54:29 +03:00
flex-direction: column;
overflow: hidden;
font-size: $card-font-size;
background: $card-background-color;
2015-11-25 22:14:22 +03:00
border-radius: .2 * $unit;
&.raised {
@include shadow-8dp();
}
2015-11-28 00:09:18 +03:00
[data-react-toolbox="avatar"] {
display: block;
}
}
.cardMedia {
position: relative;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
2015-11-22 09:01:49 +03:00
&.wide, &.square {
height: 0;
width: 100%;
.content {
position: absolute;
height: 100%;
}
2015-11-22 09:01:49 +03:00
.content > iframe, .content > video, .content > img {
max-width: 100%;
}
}
&.wide {
padding-top: 56.25%;
}
&.square {
padding-top: 100%;
2015-10-05 15:54:29 +03:00
}
.content {
position: relative;
2015-10-05 15:54:29 +03:00
top: 0;
left: 0;
display: flex;
2015-10-05 15:54:29 +03:00
width: 100%;
flex-direction: column;
justify-content: flex-end;
2015-11-22 09:01:49 +03:00
overflow: hidden;
2015-10-05 15:54:29 +03:00
}
2015-11-22 04:43:18 +03:00
.contentOverlay {
.cardTitle, .cardActions, .cardText {
background-color: $card-text-overlay;
}
}
2015-10-05 15:54:29 +03:00
}
2015-10-04 04:10:13 +03:00
.cardTitle {
display: flex;
align-items: center;
.avatar {
2015-11-25 22:14:22 +03:00
margin-right: 1.3 * $unit;
2015-10-04 04:10:13 +03:00
}
.subtitle {
color: $color-text-secondary;
}
&.large {
2015-11-25 22:14:22 +03:00
padding: $card-padding-lg $card-padding ($card-padding - .2 * $unit);
.title {
@include typo-headline();
line-height: 1.25;
}
2015-10-04 04:10:13 +03:00
}
&.small {
padding: $card-padding;
.title {
@include typo-body-2(false, true);
line-height: 1.4;
}
.subtitle {
font-weight: 500;
line-height: 1.4;
}
2015-10-04 04:10:13 +03:00
}
2015-11-22 04:43:18 +03:00
.cardMedia & {
.title, .subtitle {
color: $card-color-white;
}
}
2015-10-05 15:54:29 +03:00
}
2015-10-04 04:10:13 +03:00
.cardTitle, .cardText {
2015-11-25 22:14:22 +03:00
padding: ($card-padding - .2 * $unit) $card-padding;
&:last-child {
padding-bottom: $card-padding-lg;
2015-10-04 04:10:13 +03:00
}
2015-11-25 22:14:22 +03:00
+ .cardText {
padding-top: 0;
2015-10-04 04:10:13 +03:00
}
}
2015-10-05 17:18:02 +03:00
.cardActions {
display: flex;
align-items: center;
justify-content: flex-start;
padding: $card-padding-sm;
2015-11-25 22:14:22 +03:00
[data-react-toolbox="button"] {
min-width: 0;
2015-11-22 04:43:18 +03:00
padding: 0 $card-padding-sm;
margin: 0 $card-padding-sm / 2;
&:first-child {
2015-11-22 04:43:18 +03:00
margin-left: 0;
2015-10-05 17:18:02 +03:00
}
&:last-child {
2015-11-22 04:43:18 +03:00
margin-right: 0;
}
}
2015-10-05 15:54:29 +03:00
}