2015-12-22 23:37:40 +03:00
|
|
|
// https://www.google.com/design/spec/components/lists.html#lists-specs
|
|
|
|
|
|
|
|
|
2015-12-23 04:15:40 +03:00
|
|
|
// - single line 48dp
|
|
|
|
// - single line avatar 56dp
|
|
|
|
// - double line (with and w/o avatar) 72dp
|
|
|
|
// - triple line 88dp
|
|
|
|
|
|
|
|
.list-group {
|
|
|
|
// Add 8dp of padding at the top and bottom of a list. One exception is at the top of a list with a subheader,
|
|
|
|
//because subheaders contain their own padding.
|
|
|
|
padding: .5rem 0;
|
|
|
|
|
|
|
|
// dense size variation
|
|
|
|
&.mdb-list-group-sm {
|
|
|
|
padding: .25rem 0;
|
|
|
|
|
|
|
|
.mdb-list-group-item {
|
|
|
|
padding: .5rem 1rem;
|
|
|
|
}
|
|
|
|
}
|
2015-12-22 23:37:40 +03:00
|
|
|
}
|
|
|
|
|
2015-12-23 04:15:40 +03:00
|
|
|
// Flex layout on a list group (some of this code could be omitted if BS v4 actually implements flex on list-group)
|
|
|
|
|
2015-12-22 23:37:40 +03:00
|
|
|
.mdb-list-group-col {
|
|
|
|
display: flex;
|
2015-12-23 04:15:40 +03:00
|
|
|
min-width: 0;
|
2015-12-22 23:37:40 +03:00
|
|
|
flex-direction: column;
|
2015-12-23 04:15:40 +03:00
|
|
|
//flex-shrink: 0;
|
2015-12-22 23:37:40 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.mdb-list-group-item {
|
|
|
|
@extend .list-group-item;
|
|
|
|
display: flex;
|
2015-12-23 19:31:49 +03:00
|
|
|
//flex-direction: row;
|
2015-12-23 04:15:40 +03:00
|
|
|
flex-flow: row wrap;
|
|
|
|
//flex-shrink: 0;
|
|
|
|
//flex-shrink: 1;
|
2015-12-22 23:37:40 +03:00
|
|
|
align-items: center;
|
2015-12-23 04:15:40 +03:00
|
|
|
padding: 1rem;
|
|
|
|
line-height: 1;
|
2015-12-22 23:37:40 +03:00
|
|
|
|
2015-12-23 04:15:40 +03:00
|
|
|
.list-group-item-text { // word wrap? http://stackoverflow.com/a/26535469/2363935
|
|
|
|
//flex-flow: row wrap;
|
|
|
|
min-width: 0;
|
|
|
|
max-height: 2.188rem; // 88dp tile total height
|
2015-12-23 19:31:49 +03:00
|
|
|
// FIXME: text overflow with ellipsis is not working
|
|
|
|
//flex: 0 1 auto; // http://stackoverflow.com/questions/12022288/how-to-keep-a-flex-item-from-overflowing-due-to-its-text
|
2015-12-23 04:15:40 +03:00
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
2015-12-22 23:37:40 +03:00
|
|
|
|
|
|
|
//------
|
2015-12-23 04:15:40 +03:00
|
|
|
// NOTE: there are many variations of icons/labels in a list, each one of these rules exist for a reason.
|
2015-12-22 23:37:40 +03:00
|
|
|
|
2015-12-23 04:15:40 +03:00
|
|
|
// first icon/label on the left
|
|
|
|
:first-child {
|
2015-12-22 23:37:40 +03:00
|
|
|
margin-right: 2rem; // single line icon is 72dp to text (16 pad + 24 icon + 32 margin)
|
|
|
|
}
|
|
|
|
|
2015-12-23 04:15:40 +03:00
|
|
|
// second icon/label, or only icon/label marked as 'right', or any direct child element marked as right
|
2015-12-22 23:37:40 +03:00
|
|
|
> .right,
|
2015-12-23 04:15:40 +03:00
|
|
|
> * ~ .label:last-child,
|
|
|
|
> * ~ .material-icons:last-child {
|
2015-12-22 23:37:40 +03:00
|
|
|
margin-right: 0; // some variations actually match the first-child
|
|
|
|
margin-left: auto;
|
|
|
|
}
|
|
|
|
|
2015-12-23 04:15:40 +03:00
|
|
|
// add the padding to icons, don't try on generic use of `right` because it may not be appropriate for some elements i.e. label-pill
|
|
|
|
.material-icons.right, // need the specificity
|
|
|
|
.material-icons ~ .material-icons:last-child {
|
|
|
|
padding-left: 1rem; // guarantee space per spec
|
|
|
|
}
|
|
|
|
//------
|
2015-12-22 23:37:40 +03:00
|
|
|
|
|
|
|
.list-group-item-heading {
|
|
|
|
//font-size: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.list-group-item-text {
|
|
|
|
font-size: .875rem;
|
|
|
|
color: $gray;
|
|
|
|
}
|
|
|
|
}
|