finished writing scss declarations with SASS synthax. Now the repo is a bit lighter

This commit is contained in:
Roberto Tonino
2020-06-22 21:07:51 +02:00
parent 85e0525a1b
commit 657f02c7d5
21 changed files with 678 additions and 699 deletions

View File

@@ -32,18 +32,18 @@ input[type='checkbox'] {
margin: 3px;
display: inline-block;
position: relative;
}
input[type='checkbox']:checked {
opacity: 1;
background-color: var(--accent-color);
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='18' viewBox='3 3 18 18' width='18'%3E%3Cpath fill='%23ffffff' d='M 10,17 5,12 6.41,10.59 10,14.17 17.59,6.58 19,8 Z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
background-position: center center;
border: 0px solid var(--accent-color);
border-radius: 2px;
padding: 9px;
margin: 3px;
color: var(--accent-text);
&:checked {
opacity: 1;
background-color: var(--accent-color);
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='18' viewBox='3 3 18 18' width='18'%3E%3Cpath fill='%23ffffff' d='M 10,17 5,12 6.41,10.59 10,14.17 17.59,6.58 19,8 Z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
background-position: center center;
border: 0px solid var(--accent-color);
border-radius: 2px;
padding: 9px;
margin: 3px;
color: var(--accent-text);
}
}
select {
@@ -85,6 +85,31 @@ button {
cursor: pointer;
transition: transform 50ms ease-in-out, background-color 200ms ease;
&[disabled] {
background-color: var(--secondary-background);
color: var(--foreground);
opacity: 0.75;
}
&.selective {
background-color: var(--main-background);
color: var(--foreground);
&.active {
background-color: var(--accent-color);
color: var(--accent-text);
}
}
&.with_icon {
display: flex;
align-items: center;
i {
margin-left: 8px;
}
}
&:active {
background-color: var(--accent-color);
transform: scale(0.95);
@@ -96,139 +121,62 @@ button {
}
}
#main_content {
margin-left: $sidebar-width;
width: calc(100% - $sidebar-width);
height: 100%;
display: flex;
img {
&.rounded {
border-radius: 5px;
}
&.circle {
border-radius: 50%;
}
}
img.rounded {
border-radius: 5px;
i {
&.disabled {
opacity: 0.5;
cursor: default;
}
&.explicit_icon {
color: hsl(3, 100%, 59%);
margin-right: $explicit-separator;
&.explicit_icon--right {
margin-left: $explicit-separator;
margin-right: 0px;
}
}
}
img.circle {
border-radius: 50%;
span {
&.tag {
background-color: var(--tag-background);
border-radius: 2px;
color: var(--tag-text);
display: inline-block;
font-size: 10px;
padding: 3px 6px;
}
}
.coverart {
background-color: var(--secondary-background);
}
.cover_container {
position: relative;
}
.cover_container .coverart {
opacity: 1;
display: block;
width: 100%;
height: auto;
transition: 0.5s ease;
backface-visibility: hidden;
}
.cover_container .download_overlay {
transition: 0.5s ease;
opacity: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
text-align: center;
}
.cover_container .download_overlay i {
background-color: #000000;
color: white;
border-radius: 50%;
padding: 10px;
cursor: pointer;
}
.cover_container:hover .coverart {
opacity: 0.75;
}
.cover_container:hover .download_overlay {
opacity: 1;
}
i.disabled {
opacity: 0.5;
cursor: default;
}
i.explicit_icon {
color: #ff3b30;
margin-right: var(--explicit-separator);
}
span.tag {
background-color: var(--tag-background);
border-radius: 2px;
color: var(--tag-text);
display: inline-block;
font-size: 10px;
padding: 3px 6px;
}
a,
a:visited {
a {
color: dodgerblue;
&.single-cover {
position: relative;
display: inline-block;
color: white;
}
&:visited {
color: dodgerblue;
}
}
.clickable {
cursor: pointer !important;
}
.toastify {
display: flex;
align-items: center;
box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(0, 0, 0, 0.3);
background: var(--toast-background);
color: var(--toast-text);
}
.inline-flex {
display: flex;
align-items: center;
}
.inline-flex .right {
margin-left: auto;
}
button[disabled] {
background-color: var(--secondary-background);
color: var(--foreground);
opacity: 0.75;
}
button.selective {
background-color: var(--main-background);
color: var(--foreground);
}
button.selective.active {
background-color: var(--accent-color);
color: var(--accent-text);
}
button.with_icon {
display: flex;
align-items: center;
}
button.with_icon i {
margin-left: 8px;
}
.right {
float: right;
}
.fixed_footer footer {
position: sticky;
display: flex;
@@ -242,10 +190,6 @@ button.with_icon i {
margin-top: 24px;
}
.tab {
margin: 16px 0px;
}
.fab {
width: 56px;
height: 56px;
@@ -254,33 +198,27 @@ button.with_icon i {
background-color: var(--accent-color);
color: var(--accent-text);
cursor: pointer;
}
.fab i {
font-size: 24px;
padding: 16px;
i {
font-size: 24px;
padding: 16px;
}
}
.with_checkbox {
display: flex;
align-items: center;
}
.with_checkbox [type='checkbox'] {
cursor: pointer;
}
[type='checkbox'] {
cursor: pointer;
}
.with_checkbox .checkbox_text {
margin-left: 10px;
cursor: pointer;
}
.checkbox_text {
margin-left: 10px;
cursor: pointer;
.with_checkbox .checkbox_text::selection {
background: none;
}
.hide {
display: none !important;
@include remove-selection-background;
}
}
.loading_placeholder {
@@ -313,3 +251,74 @@ button.with_icon i {
z-index: 1000;
}
}
.coverart {
background-color: var(--secondary-background);
}
.cover_container {
position: relative;
.coverart {
opacity: 1;
display: block;
width: 100%;
height: auto;
transition: 0.5s ease;
backface-visibility: hidden;
}
.download_overlay {
transition: 0.5s ease;
opacity: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
i {
background-color: #000000;
color: white;
border-radius: 50%;
padding: 10px;
cursor: pointer;
}
}
&:hover {
.coverart {
opacity: 0.75;
}
.download_overlay {
opacity: 1;
}
}
}
#main_content {
margin-left: $sidebar-width;
width: calc(100% - $sidebar-width);
height: 100%;
display: flex;
}
// @todo Remove
.inline-flex {
display: flex;
align-items: center;
.right {
margin-left: auto;
}
}
// @todo Remove
.right {
float: right;
}
.hide {
display: none !important;
}

View File

@@ -1,10 +1,11 @@
$vertical-separator: 7px;
$table-border-radius: 3px;
.table {
width: 100%;
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
--vertical-separator: 7px;
tbody {
tr:not(.table__row-no-highlight):hover {
background: var(--table-highlight);
@@ -55,14 +56,14 @@
}
td {
padding: var(--vertical-separator) 10px;
padding: $vertical-separator 10px;
&:first-child {
padding: var(--vertical-separator) 10px var(--vertical-separator) 20px;
padding: $vertical-separator 10px $vertical-separator 20px;
}
&:last-child {
padding: var(--vertical-separator) 20px var(--vertical-separator) 10px;
padding: $vertical-separator 20px $vertical-separator 10px;
}
img {
@@ -70,6 +71,85 @@
}
}
/* === Tracks Table === */
&--tracks {
border-collapse: collapse;
thead {
border-bottom: 2px solid var(--table-highlight);
}
th {
padding-bottom: 10px;
height: 45px;
}
td {
height: 35px;
&.breakline {
word-break: break-word;
}
}
tr {
&:first-child {
td {
&:first-child {
border-top-left-radius: $table-border-radius;
}
&:last-child {
border-top-right-radius: $table-border-radius;
}
}
}
&:last-child {
td {
&:first-child {
border-bottom-left-radius: $table-border-radius;
}
&:last-child {
border-bottom-right-radius: $table-border-radius;
}
}
}
}
}
/* === Tracklist Table === */
&--tracklist {
thead {
border-bottom: 2px solid var(--table-highlight);
}
th {
height: 45px;
padding: $vertical-separator 10px;
&:first-child {
padding: $vertical-separator 10px $vertical-separator 20px;
}
&:last-child {
padding: $vertical-separator 20px $vertical-separator 10px;
}
}
td {
height: 35px;
}
}
/* === Charts Table === */
&--charts {
td {
height: 35px;
}
}
.table__icon {
box-sizing: content-box;
width: 32px;
@@ -134,95 +214,21 @@
}
}
.track_row > td > img {
width: 32px;
height: 32px;
}
.track_row > td > a > img {
width: 56px;
height: 56px;
.track_row {
> td > img {
width: 32px;
height: 32px;
}
> td > a > img {
width: 56px;
height: 56px;
}
}
// @todo Remove
.top-tracks-position {
padding: 12px;
text-align: center;
cursor: default;
}
/* === Tracks Table === */
.table--tracks {
border-collapse: collapse;
--radius: 3px;
}
.table--tracks thead {
border-bottom: 2px solid var(--table-highlight);
}
.table--tracks th {
padding-bottom: 10px;
height: 45px;
}
.table--tracks td {
height: 35px;
}
.table--tracks td.breakline {
word-break: break-word;
}
.table--tracks tr:first-child td:first-child {
border-top-left-radius: var(--radius);
}
.table--tracks tr:first-child td:last-child {
border-top-right-radius: var(--radius);
}
.table--tracks tr:last-child td:first-child {
border-bottom-left-radius: var(--radius);
}
.table--tracks tr:last-child td:last-child {
border-bottom-right-radius: var(--radius);
}
/* === Tracklist Table === */
/* .table--tracklist {} */
.table--tracklist thead {
border-bottom: 2px solid var(--table-highlight);
}
.table--tracklist th {
height: 45px;
padding: var(--vertical-separator) 10px;
}
.table--tracklist th:first-child {
padding: var(--vertical-separator) 10px var(--vertical-separator) 20px;
}
.table--tracklist th:last-child {
padding: var(--vertical-separator) 20px var(--vertical-separator) 10px;
}
.table--tracklist td {
height: 35px;
}
.explicit_tracklist {
margin-left: var(--explicit-separator);
}
/* === Charts Table === */
/* .table--charts {} */
.table--charts td {
height: 35px;
}