react-toolbox/components/card/style.scss

119 lines
2.0 KiB
SCSS
Raw Normal View History

2015-10-04 04:10:13 +03:00
@import "../variables";
@import "../mixins";
2015-10-05 17:18:02 +03:00
$card-color-white: unquote("rgb(#{$color-white})") !default;
2015-10-05 15:54:29 +03:00
$card-title-height: 17.6 * $unit;
$card-width-normal: 32 * $unit;
$card-width-large: 51.2 * $unit;
2015-10-05 17:18:02 +03:00
$card-text-overlay: unquote("rgba(#{$color-black}, 0.2)");
2015-10-04 04:10:13 +03:00
2015-10-05 15:54:29 +03:00
.figure {
position: relative;
display: flex;
min-height: $card-title-height;
flex-direction: column;
background-position: center center;
background-size: cover;
justify-content: flex-end;
> *:not(.overflow) {
z-index: 1;
font-weight: $font-weight-normal;
}
> .overflow {
position: absolute;
top: 0;
left: 0;
z-index: 0;
width: 100%;
height: 100%;
opacity: .75;
}
}
2015-10-04 04:10:13 +03:00
2015-10-05 15:54:29 +03:00
.text {
font-size: $font-size-small;
line-height: 1.8 * $unit;
color: $color-text-secondary;
2015-10-04 04:10:13 +03:00
}
2015-10-05 15:54:29 +03:00
.navigation {
$offset: ($offset / 2);
padding: $offset;
2015-10-04 04:10:13 +03:00
> * {
2015-10-05 15:54:29 +03:00
min-width: 0;
padding-right: $offset;
padding-left: $offset;
2015-10-04 04:10:13 +03:00
}
}
2015-10-05 15:54:29 +03:00
.ripple {
background-color: $color-text-secondary;
}
2015-10-04 04:10:13 +03:00
2015-10-05 15:54:29 +03:00
.root {
@include shadow-2dp();
position: relative;
display: flex;
width: $card-width-normal;
flex-direction: column;
overflow: hidden;
vertical-align: top;
background: $color-background;
2015-10-04 04:10:13 +03:00
// -- Children
2015-10-05 15:54:29 +03:00
> *:not(.navigation) {
padding: $offset;
2015-10-04 04:10:13 +03:00
}
2015-10-05 15:54:29 +03:00
&:not(.color) > *:not(.figure), > *:not(:last-child) {
box-shadow: 0 1px $color-divider;
2015-10-04 04:10:13 +03:00
}
2015-10-05 15:54:29 +03:00
}
2015-10-04 04:10:13 +03:00
2015-10-05 15:54:29 +03:00
.touch {
cursor: pointer;
}
2015-10-05 17:18:02 +03:00
2015-10-05 15:54:29 +03:00
.contrast {
.figure {
2015-10-05 17:18:02 +03:00
color: $card-color-white;
2015-10-05 15:54:29 +03:00
text-shadow: 0;
2015-10-04 04:10:13 +03:00
}
2015-10-05 15:54:29 +03:00
.ripple {
2015-10-05 17:18:02 +03:00
background-color: $card-color-white;
2015-10-04 04:10:13 +03:00
}
2015-10-05 15:54:29 +03:00
}
2015-10-05 17:18:02 +03:00
2015-10-05 15:54:29 +03:00
.loading {
pointer-events: none;
cursor: none;
2015-10-05 17:18:02 +03:00
filter: grayscale(100%);
2015-10-05 15:54:29 +03:00
.ripple {
width: 2 * $card-width-normal;
height: 2 * $card-width-normal;
2015-10-04 04:10:13 +03:00
}
}
2015-10-05 17:18:02 +03:00
.image {
&, .figure {
height: $card-width-normal;
}
.figure {
padding: 0;
> h2 {
padding: $offset;
font-size: $font-size-small;
font-weight: $font-weight-bold;
background-color: $card-text-overlay;
}
}
}
.event {
.figure {
justify-content: flex-start;
}
2015-10-05 15:54:29 +03:00
}
2015-10-05 17:18:02 +03:00
2015-10-05 15:54:29 +03:00
.wide {
width: $card-width-large;
2015-10-04 04:10:13 +03:00
}