mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-14 07:06:14 -05:00
Fix tier list maker export tier widths
This commit is contained in:
@@ -37,15 +37,21 @@
|
||||
}
|
||||
|
||||
.tiers {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
display: grid;
|
||||
grid-template-columns: max-content 1fr;
|
||||
gap: var(--s-2);
|
||||
}
|
||||
|
||||
.tiersWithoutLabels {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* subgrid so every label shares the widest label's width */
|
||||
.tierRow {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: subgrid;
|
||||
grid-column: 1 / -1;
|
||||
align-items: stretch;
|
||||
gap: var(--s-2);
|
||||
min-height: 64px;
|
||||
padding: var(--s-1-5);
|
||||
background-color: var(--graphic-row-bg);
|
||||
@@ -55,7 +61,6 @@
|
||||
|
||||
.tierLabel {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 68px;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import clsx from "clsx";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Avatar } from "~/components/Avatar";
|
||||
import { GraphicContainer } from "~/features/img-export/components/Graphic";
|
||||
@@ -38,7 +39,11 @@ export function TierListGraphic({
|
||||
<span className={styles.authorName}>{author.username}</span>
|
||||
</div>
|
||||
) : null}
|
||||
<div className={styles.tiers}>
|
||||
<div
|
||||
className={clsx(styles.tiers, {
|
||||
[styles.tiersWithoutLabels]: !showTierHeaders,
|
||||
})}
|
||||
>
|
||||
{tiers.map((tier) => (
|
||||
<div key={tier.id} className={styles.tierRow}>
|
||||
{showTierHeaders ? (
|
||||
|
||||
5
changelog/2026-09-08-tier-list-export-label-width.md
Normal file
5
changelog/2026-09-08-tier-list-export-label-width.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
navItem: tier-list-maker
|
||||
type: bug
|
||||
---
|
||||
Fixed tier names having different widths in the exported tier list image
|
||||
Reference in New Issue
Block a user