Files
Chuma Mcphoy (We Ahead) ae3537e008 Merged in fix/LOY-444-points-to-keep-left-text (pull request #3086)
fix(LOY-444): fix markerLabel text when left aligned

* fix(LOY-444): fix markerLabel text when left aligned


Approved-by: Matilda Landström
2025-11-07 11:21:17 +00:00

74 lines
1.5 KiB
CSS

.progressSection {
padding: 0 var(--Space-x3);
display: flex;
flex-direction: column;
gap: var(--Space-x1);
container-type: inline-size;
container-name: level-progress;
}
.progressSection.hasMarker {
padding-bottom: var(--Space-x1);
}
.progressContainer {
position: relative;
}
.levelMarker {
position: absolute;
top: 50%;
transform: translateX(-50%);
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
pointer-events: none;
}
.markerPin {
width: 6px;
height: 6px;
background: var(--Surface-Brand-Primary-1-OnSurface-Default);
border-radius: 50%;
transform: translateY(-50%);
}
.markerLine {
width: 1px;
height: 21px;
background: var(--Surface-Brand-Primary-1-OnSurface-Default);
margin-top: -3px;
}
.markerLabelContainer {
position: relative;
margin-top: var(--Space-x15);
height: var(--Space-x2);
}
/* Default: precise alignment under marker */
.markerLabel {
position: absolute;
top: 0;
inset-inline-start: var(--Space-x3);
inset-inline-end: calc(100% - var(--marker-pos));
color: var(--Text-Secondary);
white-space: normal;
overflow-wrap: anywhere;
text-align: right;
}
/* Narrow containers: only when explicitly flagged, use natural flow */
@container level-progress (max-width: 680px) {
.progressSection[data-wrap="true"] .markerLabelContainer {
height: auto;
}
.progressSection[data-wrap="true"] .markerLabel {
position: static;
display: block;
text-align: left;
inset: auto;
}
}