Skip to content

Commit 599246f

Browse files
committed
fix(dashboard): align the marquee clip/fade to the card border
The title clipped at its own edge, a row-padding inside the card, so the cut sat mid-card. Bleed the title to the card border (cancel the row's px-2, re-add it as inner padding so the text still starts in the same place), and fade both borders while marqueeing so the title dissolves at each card edge.
1 parent 361b27e commit 599246f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packages/framework-dashboard/layouts/tailwind.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,18 @@ body {
134134
overflow: hidden;
135135
white-space: nowrap;
136136
container-type: inline-size;
137+
/* Bleed to the card border (cancel the row's px-2) so the clip and the fade land on the border,
138+
not a row-padding inside it; the text still starts a row-padding in via the matching inner pad. */
139+
margin-inline: -0.5rem;
140+
padding-inline: 0.5rem;
137141
-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 1.25rem), transparent);
138142
mask-image: linear-gradient(to right, #000 calc(100% - 1.25rem), transparent);
139143
}
144+
/* While marqueeing, fade both borders so the title dissolves at each card edge, not only the end. */
145+
.rail-row:hover .rail-title {
146+
-webkit-mask-image: linear-gradient(to right, transparent, #000 1.25rem, #000 calc(100% - 1.25rem), transparent);
147+
mask-image: linear-gradient(to right, transparent, #000 1.25rem, #000 calc(100% - 1.25rem), transparent);
148+
}
140149
.rail-title-inner {
141150
display: inline-block;
142151
will-change: transform;

0 commit comments

Comments
 (0)