Playlist list... not sure if cleanest way to build components

This commit is contained in:
James Barnsley
2016-10-21 23:27:50 +13:00
parent 667efba1f7
commit 5b7f4f5831
13 changed files with 259 additions and 80 deletions

View File

@ -5,5 +5,6 @@
@import 'global/reset';
@import 'global/forms';
@import 'components/lists';
@import 'components/track';

81
src/scss/components/_lists.scss Executable file
View File

@ -0,0 +1,81 @@
.list-item {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
display: block;
position: relative;
padding: 8px 10px 8px 30px;
border-top: 1px solid #EEEEEE;
border-bottom: 1px solid #EEEEEE;
margin-bottom: -1px;
.col {
width: 10%;
min-height: 1px;
float: left;
}
&::after {
content: '';
clear: both;
display: block;
}
&.selected {
background: #FFF39C !important;
}
&:not(.header):hover {
background: #F4F4F4;
cursor: pointer;
}
&.header {
font-size: 10px;
color: #CCCCCC;
text-transform: uppercase;
border-top: 0;
}
&.track {
.col {
&.name,
&.artists,
&.album {
width: 30%;
}
}
.select-state {
position: absolute;
top: 10px;
left: 10px;
}
&.playing {
font-weight: bold;
}
}
&.playlist {
.col {
&.name {
width: 30%;
}
&.owner {
width: 20%;
}
}
}
}

View File

@ -1,53 +0,0 @@
.track {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
position: relative;
padding: 8px 10px 8px 30px;
border-top: 1px solid #EEEEEE;
border-bottom: 1px solid #EEEEEE;
margin-bottom: -1px;
.col {
width: 10%;
min-height: 1px;
float: left;
&.name,
&.artists,
&.album {
width: 30%;
}
}
.select-state {
position: absolute;
top: 10px;
left: 10px;
}
&::after {
content: '';
clear: both;
display: block;
}
&.playing {
font-weight: bold;
}
&.selected,
&.selected:hover {
background: #FFF39C;
}
&:hover{
background: #F4F4F4;
}
}