Files
nutty-tools/now-playing/themes/simple/style.css
T
2026-06-28 03:05:29 +10:00

83 lines
1.6 KiB
CSS

#main-wrapper {
width: 500px;
display: flex;
flex-direction: row;
/* This forces both containers to be the same height */
align-items: stretch;
gap: 1em;
opacity: 0;
align-items: center;
}
#album-art-container {
/* 1. Tell it to maintain a 1:1 square ratio */
aspect-ratio: 1 / 1;
overflow: hidden;
border-radius: 0.25em;
position: relative;
background-size: cover;
background-position: center;
}
#album-art-layer,
#album-art-transition-layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
transition: opacity 0.5s ease;
}
#art-layer {
z-index: 1;
transition: all 0.5s ease;
}
#art-transition-layer {
z-index: 0;
}
#song-info-container {
position: relative;
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
#background-transition-layer {
z-index: 0;
}
/* The content sits on top */
#song-info-wrapper {
position: relative; /* Keeps it in the document flow */
z-index: 2; /* Sits above the background-layer */
padding: 1em 1.75em;
display: flex;
flex-direction: column;
gap: 0.3em;
}
#track-label {
font-size: 1em;
font-weight: 600;
}
#artist-label {
font-size: 0.8em;
font-weight: 300;
opacity: 0.6;
}
.text-label {
white-space: nowrap;
overflow: hidden;
mask-image: linear-gradient(to right, black calc(100% - 1em), transparent 100%);
-webkit-mask-image: linear-gradient(to right, black calc(100% - 1em), transparent 100%);
transition: opacity 0.25s ease-in-out;
}