react-toolbox/components/list/theme.scss

158 lines
2.9 KiB
SCSS
Raw Normal View History

@import "../base";
@import "./config";
2015-10-12 04:04:19 +03:00
2015-10-19 03:38:25 +03:00
.list {
position: relative;
display: inline-block;
width: 100%;
padding: $list-vertical-padding 0;
text-align: left;
white-space: nowrap;
2015-10-12 04:04:19 +03:00
list-style: none;
2015-10-19 03:38:25 +03:00
}
2015-10-12 04:04:19 +03:00
2015-10-19 03:38:25 +03:00
.subheader {
padding-left: $list-horizontal-padding;
margin: - $list-vertical-padding 0 0;
font-size: $list-subheader-font-size;
font-weight: $list-subheader-font-weight;
line-height: $list-subheader-height;
color: $color-text-secondary;
}
2015-10-12 04:04:19 +03:00
2015-10-19 03:38:25 +03:00
.divider {
height: $list-divider-height;
margin: - $list-divider-height 0 0;
background-color: $color-divider;
2015-10-21 02:38:41 +03:00
border: 0;
2015-10-19 03:38:25 +03:00
&.inset {
margin-right: $list-horizontal-padding;
margin-left: $list-content-left-spacing;
}
.list + & {
margin-top: - $list-vertical-padding;
}
2015-12-07 03:13:59 +03:00
.listItem ~ & {
2016-01-23 18:38:12 +03:00
margin-top: $list-vertical-padding;
margin-bottom: $list-vertical-padding;
2015-10-19 03:38:25 +03:00
}
}
2015-10-12 04:04:19 +03:00
2015-12-07 03:13:59 +03:00
.listItem {
position: relative;
2016-04-10 13:20:30 +03:00
> [data-react-toolbox="ripple"] {
overflow: hidden;
}
2016-05-22 20:08:47 +03:00
.ripple {
color: $color-text-secondary;
}
2015-12-07 03:13:59 +03:00
}
2015-10-19 03:38:25 +03:00
.item {
position: relative;
display: flex;
min-height: $list-item-min-height;
align-items: center;
padding: 0 $list-horizontal-padding;
color: $color-text;
&.selectable:not(.disabled):hover {
cursor: pointer;
background-color: $list-item-hover-color;
}
&.disabled {
pointer-events: none;
2015-11-28 18:04:09 +03:00
&:not(.checkboxItem) {
2015-10-19 03:38:25 +03:00
opacity: .5;
2015-10-12 04:04:19 +03:00
}
2016-04-10 13:20:30 +03:00
> .checkbox > [data-react-toolbox="label"] {
2015-10-19 03:38:25 +03:00
opacity: .5;
}
}
}
.left {
2016-04-10 13:20:30 +03:00
[data-react-toolbox="font-icon"] {
width: $list-item-icon-size;
}
& :last-child {
2016-04-10 13:20:30 +03:00
> [data-react-toolbox="font-icon"] {
margin-right: $list-item-right-icon-margin;
}
}
}
.right {
> :last-child {
margin-right: 0;
}
> :first-child {
margin-left: $list-horizontal-padding;
}
}
.left, .right {
display: flex;
flex: 0 0 auto;
align-items: center;
vertical-align: middle;
}
.itemAction {
display: flex;
margin: $list-item-child-margin $list-horizontal-padding $list-item-child-margin 0;
> * {
padding: 0;
}
2016-04-10 13:20:30 +03:00
> [data-react-toolbox="font-icon"] {
font-size: $list-item-icon-font-size;
color: $color-text-secondary;
}
}
.itemContentRoot {
display: block;
flex-grow: 1;
&.large {
2016-04-10 12:39:04 +03:00
display: flex;
2016-04-10 13:20:30 +03:00
height: $list-item-min-height-legend;
2016-04-10 12:39:04 +03:00
flex-direction: column;
justify-content: center;
}
}
2015-10-21 02:38:41 +03:00
.checkbox {
display: flex;
width: 100%;
height: 100%;
2015-10-21 02:38:41 +03:00
min-height: $list-item-min-height;
align-items: center;
margin: 0;
cursor: pointer;
2016-04-10 13:20:30 +03:00
> [data-react-toolbox="check"] {
margin-right: $list-item-right-checkbox-margin;
2015-10-21 02:38:41 +03:00
}
2016-04-10 13:20:30 +03:00
> [data-react-toolbox="label"] {
2015-10-21 02:38:41 +03:00
padding-left: 0;
}
}
.itemText {
2015-10-19 03:38:25 +03:00
display: block;
&:not(.primary) {
2016-04-10 13:20:30 +03:00
padding-top: $list-item-legend-margin-top;
font-size: $font-size-small;
2015-10-19 03:38:25 +03:00
color: $color-text-secondary;
white-space: normal;
2015-10-19 03:38:25 +03:00
}
&.primary {
font-size: $font-size-normal;
color: $color-text;
2015-10-12 04:04:19 +03:00
}
}