Spaces:
Running
Running
@import "../../css/colors.css"; | |
@import "../../css/units.css"; | |
.library-item { | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
justify-content: flex-start; | |
flex-basis: 160px; | |
position: relative; | |
height: 160px; | |
max-width: 160px; | |
margin: $space; | |
padding: 1rem 1rem 0 1rem; | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
color: $text-primary; | |
background: white; | |
border-width: 2px; | |
border-style: solid; | |
border-color: $ui-black-transparent; | |
border-radius: $space; | |
text-align: center; | |
cursor: pointer; | |
} | |
[theme="dark"] .library-item { | |
background: $ui-primary; | |
} | |
.library-item-sound { | |
width: 200px; | |
max-width: 200px; | |
flex-basis: 200px; | |
height: 100px; | |
padding: 0.25rem; | |
padding-bottom: 0; | |
} | |
.library-item-sound.library-item-new { | |
/* | |
we have to use hue-rotate, | |
since the waveforms have their color baked in by design | |
& the play button styling would be annoying | |
*/ | |
filter: hue-rotate(60deg); | |
} | |
.library-item-new-badge { | |
border-radius: 1024px; | |
color: white; | |
font-size: 10px; | |
font-weight: bold; | |
background-color: #EB6566; | |
padding: 1px 5px; | |
position: absolute; | |
left: -8px; | |
top: -8px; | |
} | |
.library-item-sound .library-item-new-badge { | |
background-color: $sound-primary; | |
} | |
.library-item-extension { | |
align-self: stretch; | |
} | |
.library-item:hover { | |
border-width: 2px; | |
border-color: $motion-primary; | |
} | |
.library-item-sound:hover { | |
border-color: $sound-primary; | |
} | |
.library-item-new:hover { | |
border-color: #EB6566; | |
} | |
.library-item-new.library-item-sound:hover { | |
border-color: $sound-primary; | |
} | |
.library-item-favorite { | |
background: transparent; | |
position: absolute; | |
top: calc(11.5rem + 4px); | |
right: 4px; | |
width: 24px; | |
height: 24px; | |
border: 0; | |
margin: 0; | |
padding: 0; | |
} | |
.library-item-favorite img { | |
background: transparent; | |
position: absolute; | |
top: 0; | |
right: 0; | |
width: 24px; | |
height: 24px; | |
border: 0; | |
margin: 0; | |
padding: 0; | |
} | |
.library-item-favorite > img[data-usedimage="false"] { | |
opacity: 0; | |
} | |
.library-item-delete { | |
background: transparent; | |
position: absolute; | |
top: calc(11.5rem + 4px); | |
right: 4px; | |
width: 24px; | |
height: 24px; | |
border: 0; | |
margin: 0; | |
padding: 0; | |
} | |
.library-item-delete img { | |
background: transparent; | |
position: absolute; | |
top: 0; | |
right: 0; | |
width: 24px; | |
height: 24px; | |
border: 0; | |
margin: 0; | |
padding: 0; | |
} | |
/* delete button */ | |
.library-item-delete > img { | |
filter: brightness(0); | |
opacity: 0.25; | |
} | |
[theme="dark"] .library-item-delete>img { | |
filter: saturate(0) brightness(255); | |
} | |
.library-item-delete:hover > img { | |
filter: brightness(1); | |
opacity: 1; | |
} | |
.library-item-delete:active > img { | |
filter: brightness(0.25); | |
opacity: 1; | |
} | |
/* unfavorited items */ | |
.library-item-favorite[data-activated="false"] > img[data-usedimage="true"] { | |
filter: brightness(0); | |
opacity: 0.25; | |
} | |
[theme="dark"] .library-item-favorite[data-activated="false"]>img[data-usedimage="true"] { | |
filter: saturate(0) brightness(255); | |
} | |
.library-item-favorite[data-activated="false"]:hover > img[data-usedimage="true"] { | |
filter: brightness(1); | |
opacity: 1; | |
} | |
.library-item-favorite[data-activated="false"]:active > img[data-usedimage="true"] { | |
filter: brightness(1); | |
opacity: 1; | |
} | |
.library-item-favorite[data-activated="false"]:active > img[data-usedimage="false"] { | |
filter: brightness(1); | |
opacity: 1; | |
} | |
/* favorited items */ | |
.library-item-favorite[data-activated="true"] > img[data-usedimage="true"] { | |
filter: none; | |
opacity: 1; | |
} | |
.hidden { | |
display: none; | |
} | |
.disabled { | |
opacity: .5; | |
cursor: auto; | |
} | |
.disabled:hover { | |
border-color: $ui-black-transparent; | |
} | |
.inspect-extension { | |
position: relative; | |
background: #00c3ff; | |
color: white; | |
font-weight: bold; | |
padding: 0; | |
margin: 0 4px; | |
border: 0; | |
border-radius: 4px; | |
float: right; | |
width: 20px; | |
height: 20px; | |
} | |
.inspect-extension > img { | |
width: 20px; | |
height: 20px; | |
} | |
.small-bottom-margin { | |
margin-bottom: 4px; | |
} | |
.library-item-image-container-wrapper { | |
height: 100px; | |
width: 100%; | |
position: relative; | |
} | |
.library-item-image-container { | |
position: absolute; | |
height: 100px; | |
width: 100%; | |
} | |
.library-item-inset-image-container { | |
position: relative; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
margin-top: -2.5rem; | |
align-self: flex-start; | |
background-color: $pen-primary; | |
width: 3.5rem; | |
height: 3.5rem; | |
border-radius: 0.5rem; | |
border: 0.25rem solid $ui-white; | |
} | |
.library-item-inset-image-container-no-bg { | |
position: relative; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
margin-top: -2.5rem; | |
align-self: flex-start; | |
width: 3.5rem; | |
height: 3.5rem; | |
border-radius: 0.5rem; | |
border: 0.25rem solid $ui-white; | |
} | |
[theme="dark"] .library-item-inset-image-container-no-bg, | |
[theme="dark"] .library-item-inset-image-container { | |
border: 0.25rem solid #111; | |
} | |
.tw-library-item-inset-image-container { | |
background-color: hsla(0, 100%, 65%, 1); | |
} | |
[dir="ltr"] .library-item-inset-image-container-no-bg, | |
[dir="ltr"] .library-item-inset-image-container { | |
margin-left: 1rem; | |
} | |
[dir="rtl"] .library-item-inset-image-container-no-bg, | |
[dir="rtl"] .library-item-inset-image-container { | |
margin-right: 1rem; | |
} | |
.library-item-image { | |
max-width: 100%; | |
max-height: 100%; | |
} | |
.library-item-image-overlay { | |
position: absolute; | |
left: 0; | |
top: 0; | |
width: 100%; | |
} | |
.library-item-waveform { | |
position: absolute; | |
left: 0; | |
width: calc(100% - 3rem); | |
height: 3rem; | |
max-width: 100%; | |
max-height: 100%; | |
} | |
[dir="rtl"] .library-item-waveform { | |
left: initial; | |
right: 0; | |
} | |
.library-item-inset-image { | |
width: 2.5rem; | |
} | |
.library-item-name { | |
width: 100%; | |
margin: 0.25rem 0; | |
text-align: center; | |
/* | |
For truncating overflowing text gracefully | |
Min-width is for a bug: https://css-tricks.com/flexbox-truncated-text | |
*/ | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: pre-wrap; | |
min-width: 0; | |
} | |
.library-item-sound-name { | |
text-align: left; | |
width: 100%; | |
margin-bottom: 0; | |
} | |
.library-item-sound-type { | |
text-align: left; | |
width: 100%; | |
margin-top: 0; | |
opacity: 0.65; | |
} | |
[dir="rtl"] .library-item-sound-name, | |
[dir="rtl"] .library-item-sound-type { | |
text-align: right; | |
} | |
.library-item-sound-info-container { | |
width: 100%; | |
position: relative; | |
display: flex; | |
flex-direction: column; | |
} | |
.featured-item { | |
flex-basis: 300px; | |
max-width: 300px; | |
height: auto; | |
overflow: hidden; | |
padding: 0; | |
} | |
.featured-image-container { | |
position: relative; | |
width: 100%; | |
} | |
.featured-image { | |
width: 100%; | |
height: 11.5rem; | |
object-fit: cover; | |
} | |
.featured-text { | |
font-weight: bold; | |
padding: 10px; | |
/* height: 140px; */ | |
width: 300px; | |
} | |
[dir="ltr"] .featured-extension-text { | |
text-align: left; | |
padding-left: 1.25rem; | |
} | |
[dir="rtl"] .featured-extension-text { | |
text-align: right; | |
padding-right: 1.25rem; | |
} | |
.featured-description { | |
display: block; | |
font-weight: normal; | |
line-height: 1.375rem; | |
padding-top: .3125rem; | |
padding-bottom: .25rem; | |
} | |
.featured-extension-metadata { | |
width: 100%; | |
padding: 0 1.25rem 1rem 1.25rem; | |
display: flex; | |
flex-direction: row; | |
align-items: flex-start; | |
font-size: 12px; | |
color: $text-primary; | |
opacity: 0.75; | |
} | |
[dir="ltr"] .featured-extension-metadata { | |
text-align: left; | |
} | |
[dir="rtl"] .featured-extension-metadata { | |
text-align: right; | |
} | |
.featured-extension-requirement { | |
width: 100%; | |
display: flex; | |
flex-direction: column; | |
} | |
.featured-extension-collaboration { | |
width: 100%; | |
display: flex; | |
flex-direction: column; | |
} | |
.featured-extension-metadata-detail { | |
height: 100%; | |
padding-top: 0.4rem; | |
font-weight: bold; | |
} | |
.featured-extension-metadata-detail img { | |
margin-right: 0.25rem; | |
width: 20px; | |
height: 20px; | |
} | |
.extension-links { | |
width: 300px; | |
padding: 0 1.25rem 1rem 1.25rem; | |
display: flex; | |
flex-direction: row; | |
justify-content: space-between; | |
opacity: 0.75; | |
text-align: left; | |
} | |
.extension-links a { | |
color: inherit ; | |
text-decoration: underline; | |
} | |
.coming-soon-text { | |
position: absolute; | |
background-color: $data-primary; | |
border-radius: 1rem; | |
box-shadow: 0 0 .5rem hsla(0, 0%, 0%, .25); | |
padding: .5rem 1rem; | |
font-size: .875rem; | |
font-weight: bold; | |
color: $ui-white; | |
} | |
[dir="ltr"] .coming-soon-text { | |
transform: translate(calc(2 * $space), calc(2 * $space)); | |
} | |
[dir="rtl"] .coming-soon-text { | |
transform: translate(calc(-2 * $space), calc(2 * $space)); | |
} | |
.favorite-container { | |
display: none; | |
background: none; | |
border: none; | |
padding: 0; | |
margin: 0; | |
position: absolute; | |
top: 0.5rem; | |
left: 0.5rem; | |
} | |
.favorite-icon { | |
width: 32px; | |
height: 32px; | |
} | |
.favorite-container.active, | |
.library-item:hover .favorite-container { | |
display: block; | |
} | |