/* Each timeline row — block, full width, positioned context for abs children */
.timeline-item {
@apply relative mb-10;
- /* Mobile: push card right of the left spine (spine 20px + 2px + gap 8px = 30px; use 36px for breathing room) */
- margin-left: 36px;
+ /*
+ Mobile geometry (.timeline has px-4 = 16px padding):
+ spine left = 20px from <ol> border → 20-16 = 4px from item's containing block.
+ We want card to start ~8px right of spine right edge (22px from <ol> = 6px from block).
+ Use margin-left: 30px so card starts at 16+30=46px from <ol>, 24px right of spine right.
+ abs children: spine left relative to item = 4 - 30 = -26px.
+ */
+ margin-left: 30px;
}
@screen md {
@apply absolute;
top: 20px;
height: 2px;
- /* Mobile: spine right edge at 22px, item left at 36px → offset = -14px, width = 14px */
- left: -14px;
- width: 14px;
+ /*
+ Mobile: .timeline px-4(16px) + item margin-left(30px) = 46px from <ol> border.
+ Spine right edge = 22px from <ol> border = 22-46 = -24px from item left.
+ Connector: left=-24px, width=24px → touches spine right and card left edge.
+ */
+ left: -24px;
+ width: 24px;
}
@screen md {
.timeline-node {
@apply absolute rounded-full z-10;
top: 14px;
- /* Mobile: spine center = 21px, item left = 36px → node left = 21-5-36 = -20px */
- left: -20px;
+ /*
+ Mobile: spine center = 21px from <ol> border = 21-46 = -25px from item left.
+ Node (10px wide): left = -25 - 5 = -30px.
+ */
+ left: -30px;
width: 10px;
height: 10px;
border: 2px solid var(--bg);
.timeline-item {
position: relative;
margin-bottom: 2.5rem;
- /* Mobile: push card right of the left spine (spine 20px + 2px + gap 8px = 30px; use 36px for breathing room) */
- margin-left: 36px;
+ /*
+ Mobile geometry (.timeline has px-4 = 16px padding):
+ spine left = 20px from <ol> border → 20-16 = 4px from item's containing block.
+ We want card to start ~8px right of spine right edge (22px from <ol> = 6px from block).
+ Use margin-left: 30px so card starts at 16+30=46px from <ol>, 24px right of spine right.
+ abs children: spine left relative to item = 4 - 30 = -26px.
+ */
+ margin-left: 30px;
}
@media (min-width: 768px) {
position: absolute;
top: 20px;
height: 2px;
- /* Mobile: spine right edge at 22px, item left at 36px → offset = -14px, width = 14px */
- left: -14px;
- width: 14px;
+ /*
+ Mobile: .timeline px-4(16px) + item margin-left(30px) = 46px from <ol> border.
+ Spine right edge = 22px from <ol> border = 22-46 = -24px from item left.
+ Connector: left=-24px, width=24px → touches spine right and card left edge.
+ */
+ left: -24px;
+ width: 24px;
}
@media (min-width: 768px) {
z-index: 10;
border-radius: 9999px;
top: 14px;
- /* Mobile: spine center = 21px, item left = 36px → node left = 21-5-36 = -20px */
- left: -20px;
+ /*
+ Mobile: spine center = 21px from <ol> border = 21-46 = -25px from item left.
+ Node (10px wide): left = -25 - 5 = -30px.
+ */
+ left: -30px;
width: 10px;
height: 10px;
border: 2px solid var(--bg);