r-markdown-cli 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -548,28 +548,68 @@ body[data-rmd-theme] {
548
548
 
549
549
  .rmd-timeline-horizontal ol {
550
550
  display: flex;
551
+ flex-wrap: nowrap;
551
552
  overflow-x: auto;
552
- gap: 20px;
553
- padding-bottom: 10px;
553
+ overflow-y: hidden;
554
+ gap: 24px;
555
+ padding-bottom: 12px;
556
+ /* Treat the ol as a horizontal scroll viewport with explicit snap so
557
+ each @item lines up nicely when the user scrolls. */
558
+ scroll-snap-type: x proximity;
559
+ scrollbar-width: thin;
554
560
  }
555
561
 
556
562
  .rmd-timeline-horizontal .rmd-timeline-item {
557
- flex: 0 0 auto;
558
- min-width: 200px;
563
+ /* Cap each item to a predictable width so a single overflowing item
564
+ can't squeeze siblings out of the visible viewport. Long prose
565
+ wraps inside the box; the user scrolls horizontally to see the
566
+ next item. */
567
+ flex: 0 0 240px;
568
+ width: 240px;
569
+ max-width: 240px;
559
570
  position: relative;
560
571
  padding-top: 28px;
572
+ scroll-snap-align: start;
573
+ /* Prevent runaway content (long URLs, code, CJK without spaces) from
574
+ widening the flex item beyond its declared basis. */
575
+ min-width: 0;
576
+ overflow-wrap: anywhere;
577
+ word-break: break-word;
578
+ }
579
+
580
+ .rmd-timeline-horizontal .rmd-timeline-content {
581
+ /* Belt-and-suspenders: cap inner content too, in case authors nest
582
+ wide blocks (chart, table) inside a timeline item. */
583
+ max-width: 100%;
584
+ overflow-wrap: anywhere;
585
+ }
586
+
587
+ .rmd-timeline-horizontal .rmd-timeline-content pre,
588
+ .rmd-timeline-horizontal .rmd-timeline-content img,
589
+ .rmd-timeline-horizontal .rmd-timeline-content table {
590
+ max-width: 100%;
561
591
  }
562
592
 
563
- .rmd-timeline-horizontal ol::before {
593
+ /* The connector line is drawn per-item (::after) so that it scrolls with
594
+ the items inside the overflow:auto container. The previous ol::before
595
+ approach anchored the line to the visible viewport, which made the
596
+ line stay put while items scrolled past — broken for any timeline
597
+ wider than the viewport. */
598
+ .rmd-timeline-horizontal .rmd-timeline-item::after {
564
599
  position: absolute;
565
600
  top: 5px;
566
- left: 0;
567
- right: 0;
601
+ left: 6px;
602
+ /* Extend across the 24px gap to meet the next item's dot. */
603
+ right: calc(-24px + 6px);
568
604
  height: 2px;
569
605
  background: var(--rmd-color-line);
570
606
  content: "";
571
607
  }
572
608
 
609
+ .rmd-timeline-horizontal .rmd-timeline-item:last-child::after {
610
+ display: none;
611
+ }
612
+
573
613
  .rmd-timeline-horizontal .rmd-timeline-item::before {
574
614
  position: absolute;
575
615
  top: 0;
@@ -548,28 +548,68 @@ body[data-rmd-theme] {
548
548
 
549
549
  .rmd-timeline-horizontal ol {
550
550
  display: flex;
551
+ flex-wrap: nowrap;
551
552
  overflow-x: auto;
552
- gap: 20px;
553
- padding-bottom: 10px;
553
+ overflow-y: hidden;
554
+ gap: 24px;
555
+ padding-bottom: 12px;
556
+ /* Treat the ol as a horizontal scroll viewport with explicit snap so
557
+ each @item lines up nicely when the user scrolls. */
558
+ scroll-snap-type: x proximity;
559
+ scrollbar-width: thin;
554
560
  }
555
561
 
556
562
  .rmd-timeline-horizontal .rmd-timeline-item {
557
- flex: 0 0 auto;
558
- min-width: 200px;
563
+ /* Cap each item to a predictable width so a single overflowing item
564
+ can't squeeze siblings out of the visible viewport. Long prose
565
+ wraps inside the box; the user scrolls horizontally to see the
566
+ next item. */
567
+ flex: 0 0 240px;
568
+ width: 240px;
569
+ max-width: 240px;
559
570
  position: relative;
560
571
  padding-top: 28px;
572
+ scroll-snap-align: start;
573
+ /* Prevent runaway content (long URLs, code, CJK without spaces) from
574
+ widening the flex item beyond its declared basis. */
575
+ min-width: 0;
576
+ overflow-wrap: anywhere;
577
+ word-break: break-word;
561
578
  }
562
579
 
563
- .rmd-timeline-horizontal ol::before {
580
+ .rmd-timeline-horizontal .rmd-timeline-content {
581
+ /* Belt-and-suspenders: cap inner content too, in case authors nest
582
+ wide blocks (chart, table) inside a timeline item. */
583
+ max-width: 100%;
584
+ overflow-wrap: anywhere;
585
+ }
586
+
587
+ .rmd-timeline-horizontal .rmd-timeline-content pre,
588
+ .rmd-timeline-horizontal .rmd-timeline-content img,
589
+ .rmd-timeline-horizontal .rmd-timeline-content table {
590
+ max-width: 100%;
591
+ }
592
+
593
+ /* The connector line is drawn per-item (::after) so that it scrolls with
594
+ the items inside the overflow:auto container. The previous ol::before
595
+ approach anchored the line to the visible viewport, which made the
596
+ line stay put while items scrolled past — broken for any timeline
597
+ wider than the viewport. */
598
+ .rmd-timeline-horizontal .rmd-timeline-item::after {
564
599
  position: absolute;
565
600
  top: 5px;
566
- left: 0;
567
- right: 0;
601
+ left: 6px;
602
+ /* Extend across the 24px gap to meet the next item's dot. */
603
+ right: calc(-24px + 6px);
568
604
  height: 2px;
569
605
  background: var(--rmd-color-line);
570
606
  content: "";
571
607
  }
572
608
 
609
+ .rmd-timeline-horizontal .rmd-timeline-item:last-child::after {
610
+ display: none;
611
+ }
612
+
573
613
  .rmd-timeline-horizontal .rmd-timeline-item::before {
574
614
  position: absolute;
575
615
  top: 0;
@@ -548,28 +548,68 @@ body[data-rmd-theme] {
548
548
 
549
549
  .rmd-timeline-horizontal ol {
550
550
  display: flex;
551
+ flex-wrap: nowrap;
551
552
  overflow-x: auto;
552
- gap: 20px;
553
- padding-bottom: 10px;
553
+ overflow-y: hidden;
554
+ gap: 24px;
555
+ padding-bottom: 12px;
556
+ /* Treat the ol as a horizontal scroll viewport with explicit snap so
557
+ each @item lines up nicely when the user scrolls. */
558
+ scroll-snap-type: x proximity;
559
+ scrollbar-width: thin;
554
560
  }
555
561
 
556
562
  .rmd-timeline-horizontal .rmd-timeline-item {
557
- flex: 0 0 auto;
558
- min-width: 200px;
563
+ /* Cap each item to a predictable width so a single overflowing item
564
+ can't squeeze siblings out of the visible viewport. Long prose
565
+ wraps inside the box; the user scrolls horizontally to see the
566
+ next item. */
567
+ flex: 0 0 240px;
568
+ width: 240px;
569
+ max-width: 240px;
559
570
  position: relative;
560
571
  padding-top: 28px;
572
+ scroll-snap-align: start;
573
+ /* Prevent runaway content (long URLs, code, CJK without spaces) from
574
+ widening the flex item beyond its declared basis. */
575
+ min-width: 0;
576
+ overflow-wrap: anywhere;
577
+ word-break: break-word;
561
578
  }
562
579
 
563
- .rmd-timeline-horizontal ol::before {
580
+ .rmd-timeline-horizontal .rmd-timeline-content {
581
+ /* Belt-and-suspenders: cap inner content too, in case authors nest
582
+ wide blocks (chart, table) inside a timeline item. */
583
+ max-width: 100%;
584
+ overflow-wrap: anywhere;
585
+ }
586
+
587
+ .rmd-timeline-horizontal .rmd-timeline-content pre,
588
+ .rmd-timeline-horizontal .rmd-timeline-content img,
589
+ .rmd-timeline-horizontal .rmd-timeline-content table {
590
+ max-width: 100%;
591
+ }
592
+
593
+ /* The connector line is drawn per-item (::after) so that it scrolls with
594
+ the items inside the overflow:auto container. The previous ol::before
595
+ approach anchored the line to the visible viewport, which made the
596
+ line stay put while items scrolled past — broken for any timeline
597
+ wider than the viewport. */
598
+ .rmd-timeline-horizontal .rmd-timeline-item::after {
564
599
  position: absolute;
565
600
  top: 5px;
566
- left: 0;
567
- right: 0;
601
+ left: 6px;
602
+ /* Extend across the 24px gap to meet the next item's dot. */
603
+ right: calc(-24px + 6px);
568
604
  height: 2px;
569
605
  background: var(--rmd-color-line);
570
606
  content: "";
571
607
  }
572
608
 
609
+ .rmd-timeline-horizontal .rmd-timeline-item:last-child::after {
610
+ display: none;
611
+ }
612
+
573
613
  .rmd-timeline-horizontal .rmd-timeline-item::before {
574
614
  position: absolute;
575
615
  top: 0;
@@ -548,28 +548,68 @@ body[data-rmd-theme] {
548
548
 
549
549
  .rmd-timeline-horizontal ol {
550
550
  display: flex;
551
+ flex-wrap: nowrap;
551
552
  overflow-x: auto;
552
- gap: 20px;
553
- padding-bottom: 10px;
553
+ overflow-y: hidden;
554
+ gap: 24px;
555
+ padding-bottom: 12px;
556
+ /* Treat the ol as a horizontal scroll viewport with explicit snap so
557
+ each @item lines up nicely when the user scrolls. */
558
+ scroll-snap-type: x proximity;
559
+ scrollbar-width: thin;
554
560
  }
555
561
 
556
562
  .rmd-timeline-horizontal .rmd-timeline-item {
557
- flex: 0 0 auto;
558
- min-width: 200px;
563
+ /* Cap each item to a predictable width so a single overflowing item
564
+ can't squeeze siblings out of the visible viewport. Long prose
565
+ wraps inside the box; the user scrolls horizontally to see the
566
+ next item. */
567
+ flex: 0 0 240px;
568
+ width: 240px;
569
+ max-width: 240px;
559
570
  position: relative;
560
571
  padding-top: 28px;
572
+ scroll-snap-align: start;
573
+ /* Prevent runaway content (long URLs, code, CJK without spaces) from
574
+ widening the flex item beyond its declared basis. */
575
+ min-width: 0;
576
+ overflow-wrap: anywhere;
577
+ word-break: break-word;
561
578
  }
562
579
 
563
- .rmd-timeline-horizontal ol::before {
580
+ .rmd-timeline-horizontal .rmd-timeline-content {
581
+ /* Belt-and-suspenders: cap inner content too, in case authors nest
582
+ wide blocks (chart, table) inside a timeline item. */
583
+ max-width: 100%;
584
+ overflow-wrap: anywhere;
585
+ }
586
+
587
+ .rmd-timeline-horizontal .rmd-timeline-content pre,
588
+ .rmd-timeline-horizontal .rmd-timeline-content img,
589
+ .rmd-timeline-horizontal .rmd-timeline-content table {
590
+ max-width: 100%;
591
+ }
592
+
593
+ /* The connector line is drawn per-item (::after) so that it scrolls with
594
+ the items inside the overflow:auto container. The previous ol::before
595
+ approach anchored the line to the visible viewport, which made the
596
+ line stay put while items scrolled past — broken for any timeline
597
+ wider than the viewport. */
598
+ .rmd-timeline-horizontal .rmd-timeline-item::after {
564
599
  position: absolute;
565
600
  top: 5px;
566
- left: 0;
567
- right: 0;
601
+ left: 6px;
602
+ /* Extend across the 24px gap to meet the next item's dot. */
603
+ right: calc(-24px + 6px);
568
604
  height: 2px;
569
605
  background: var(--rmd-color-line);
570
606
  content: "";
571
607
  }
572
608
 
609
+ .rmd-timeline-horizontal .rmd-timeline-item:last-child::after {
610
+ display: none;
611
+ }
612
+
573
613
  .rmd-timeline-horizontal .rmd-timeline-item::before {
574
614
  position: absolute;
575
615
  top: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "r-markdown-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "rmd": "dist/cli.js"