Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/components/Folder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ export default {
}
}

$name-height: 1rem;

.folder-name {
position: absolute;
z-index: 3;
Expand All @@ -186,20 +184,20 @@ $name-height: 1rem;
opacity: 1;
&__icon {
height: 40%;
margin-top: calc(30% - #{$name-height} / 2); // center name+icon
margin-top: 30%; // center name+icon
background-size: 40%;
}
&__name {
overflow: hidden;
height: $name-height;
height: 30%;
padding: 0 10px;
text-align: center;
white-space: nowrap;
text-overflow: ellipsis;
color: var(--color-main-background);
text-shadow: 0 0 8px var(--color-main-text);
font-size: $name-height;
line-height: $name-height;
font-size: 1rem;
line-height: 1rem;
}
}

Expand Down
12 changes: 5 additions & 7 deletions src/components/FolderTagPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ export default {
}
}

$name-height: 1rem;

.folder-name {
position: absolute;
z-index: 3;
Expand All @@ -195,20 +193,20 @@ $name-height: 1rem;
opacity: 1;
&__icon {
height: 40%;
margin-top: calc(30% - #{$name-height} / 2); // center name+icon
margin-top: 30%; // center name+icon
background-size: 40%;
}
&__name {
overflow: hidden;
height: $name-height;
height: 30%; // 30% (icon margin-top) + 40% (icon) + 30% (name) = 100%
padding: 0 10px;
text-align: center;
white-space: nowrap;
white-space: normal;
text-overflow: ellipsis;
color: var(--color-main-background);
text-shadow: 0 0 8px var(--color-main-text);
font-size: $name-height;
line-height: $name-height;
font-size: 1rem;
line-height: 1rem;
}
}

Expand Down