@rolemodel/optics 2.3.1 → 2.4.0

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.
@@ -1,11 +1,11 @@
1
1
 
2
2
  @import 'https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wdth,wght@0,62.5..100,100..900;1,62.5..100,100..900&family=Noto+Serif:ital,wdth,wght@0,62.5..100,100..900;1,62.5..100,100..900&display=swap';
3
- @import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css';
4
- @import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/thin/style.css';
5
- @import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/light/style.css';
6
- @import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/style.css';
7
- @import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/fill/style.css';
8
- @import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/duotone/style.css';
3
+ @import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/regular/style.css';
4
+ @import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/thin/style.css';
5
+ @import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/light/style.css';
6
+ @import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/bold/style.css';
7
+ @import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/fill/style.css';
8
+ @import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/duotone/style.css';
9
9
  /* Third party Vendors */
10
10
  /* Box sizing rules */
11
11
  *,
@@ -88,7 +88,8 @@ Noto Sans supports:
88
88
  /* Noto Sans and Noto Serif */
89
89
  /*
90
90
  See all icons at: https://phosphoricons.com/
91
- Current version: 2.1.1
91
+ See Changelog at: https://github.com/phosphor-icons/web/releases
92
+ Current version: 2.1.2
92
93
  */
93
94
  /* Note: the important tag is how Phosphor sets up the fonts which is why we replicate them here */
94
95
  /* Phosphor Icons */
@@ -2253,6 +2254,11 @@ small {
2253
2254
  flex-grow: 1;
2254
2255
  }
2255
2256
  /* Gap Properties */
2257
+ .gap-none {
2258
+ gap: 0;
2259
+
2260
+ --op-gap: 0;
2261
+ }
2256
2262
  .gap-xxs {
2257
2263
  gap: var(--op-space-2x-small);
2258
2264
 
@@ -2501,28 +2507,168 @@ small {
2501
2507
  .op-stack {
2502
2508
  display: flex;
2503
2509
  flex-direction: column;
2504
- }
2505
- :where(.op-stack) {
2506
- gap: var(--op-space-medium);
2510
+ margin-block: 0;
2511
+ margin-inline: 0;
2512
+
2513
+ /* zero specificity. Lets utilities override */
2514
+ :where(&) {
2515
+ gap: var(--op-space-medium);
2516
+ }
2507
2517
  }
2508
2518
  /* Equivalent to .flex.flex-wrap.items-center.gap-md */
2509
2519
  .op-cluster {
2510
2520
  display: flex;
2511
2521
  flex-wrap: wrap;
2512
- }
2513
- :where(.op-cluster) {
2514
- align-items: center;
2515
- gap: var(--op-space-medium);
2522
+ margin-block: 0;
2523
+ margin-inline: 0;
2524
+
2525
+ /* zero specificity. Lets utilities override */
2526
+ :where(&) {
2527
+ align-items: center;
2528
+ gap: var(--op-space-medium);
2529
+ }
2516
2530
  }
2517
2531
  /* Equivalent to .flex.flex-wrap.items-center.justify-between.gap-md */
2518
2532
  .op-split {
2519
2533
  display: flex;
2520
2534
  flex-wrap: wrap;
2521
2535
  justify-content: space-between;
2536
+ margin-block: 0;
2537
+ margin-inline: 0;
2538
+
2539
+ /* zero specificity. Lets utilities override */
2540
+ :where(&) {
2541
+ align-items: center;
2542
+ gap: var(--op-space-medium);
2543
+ }
2522
2544
  }
2523
- :where(.op-split) {
2524
- align-items: center;
2525
- gap: var(--op-space-medium);
2545
+ /*
2546
+ side by side layout with a small area and a large area
2547
+ similar to .flex with a .flex-grow-1 within it, but with a more semantic name and wrap handling.
2548
+
2549
+ |[] [ ]|
2550
+ |[ ] []| with end
2551
+ */
2552
+ .op-flank {
2553
+ display: flex;
2554
+ margin-block: 0;
2555
+ margin-inline: 0;
2556
+
2557
+ /* zero specificity. Lets utilities override */
2558
+ :where(&) {
2559
+ flex-wrap: wrap;
2560
+ align-items: center;
2561
+ gap: var(--op-space-medium);
2562
+ }
2563
+
2564
+ /* Small area */
2565
+ &:not(.op-flank--end) > :first-child,
2566
+ &.op-flank--end > :last-child {
2567
+ flex-basis: auto;
2568
+ flex-grow: 1;
2569
+ }
2570
+
2571
+ /* Large area */
2572
+ &:not(.op-flank--end) > :last-child,
2573
+ &.op-flank--end > :first-child {
2574
+ flex-basis: 0;
2575
+ flex-grow: 999;
2576
+ }
2577
+ }
2578
+ /* Grid Layout */
2579
+ .op-grid {
2580
+ --_op-grid-min-column-size: var(--op-space-4x-large);
2581
+ --_op-grid-max-column-size: 0px;
2582
+
2583
+ display: grid;
2584
+ grid-template-columns: repeat(
2585
+ auto-fit,
2586
+ minmax(max(var(--_op-grid-min-column-size), var(--_op-grid-max-column-size)), 1fr)
2587
+ );
2588
+ margin-block: 0;
2589
+ margin-inline: 0;
2590
+
2591
+ /* zero specificity. Lets utilities override */
2592
+ :where(&) {
2593
+ gap: var(--op-space-medium);
2594
+ }
2595
+
2596
+ &.op-grid--2-column {
2597
+ --_op-grid-max-column-size: calc(100% / 3);
2598
+ }
2599
+
2600
+ &.op-grid--3-column {
2601
+ --_op-grid-max-column-size: calc(100% / 4);
2602
+ }
2603
+
2604
+ &.op-grid--4-column {
2605
+ --_op-grid-max-column-size: calc(100% / 5);
2606
+ }
2607
+
2608
+ &.op-grid--5-column {
2609
+ --_op-grid-max-column-size: calc(100% / 6);
2610
+ }
2611
+
2612
+ &.op-grid--6-column {
2613
+ --_op-grid-max-column-size: calc(100% / 7);
2614
+ }
2615
+ }
2616
+ /* Frame */
2617
+ @property --_op-frame-inline-size {
2618
+ inherits: true;
2619
+ initial-value: 100%;
2620
+ syntax: '<length> | <percentage>';
2621
+ }
2622
+ .op-frame {
2623
+ display: flex;
2624
+ overflow: hidden;
2625
+ border-radius: inherit;
2626
+ aspect-ratio: 1 / 1;
2627
+ margin-block: 0;
2628
+ margin-inline: 0;
2629
+ max-inline-size: var(--_op-frame-inline-size);
2630
+
2631
+ :where(&) {
2632
+ align-items: center;
2633
+ justify-content: center;
2634
+ }
2635
+
2636
+ > img,
2637
+ > video {
2638
+ block-size: 100%;
2639
+ inline-size: 100%;
2640
+ object-fit: cover;
2641
+ }
2642
+
2643
+ /* aspect ratio */
2644
+
2645
+ &.op-frame--square {
2646
+ aspect-ratio: 1 / 1;
2647
+ }
2648
+
2649
+ &.op-frame--landscape {
2650
+ aspect-ratio: 16 / 9;
2651
+ }
2652
+
2653
+ &.op-frame--portrait {
2654
+ aspect-ratio: 9 / 16;
2655
+ }
2656
+
2657
+ &.op-frame--4-3 {
2658
+ aspect-ratio: 4 / 3;
2659
+ }
2660
+
2661
+ &.op-frame--3-4 {
2662
+ aspect-ratio: 3 / 4;
2663
+ }
2664
+
2665
+ &.op-frame--3-2 {
2666
+ aspect-ratio: 3 / 2;
2667
+ }
2668
+
2669
+ &.op-frame--2-3 {
2670
+ aspect-ratio: 2 / 3;
2671
+ }
2526
2672
  }
2527
2673
  /* Components */
2528
2674
  .accordion {
@@ -2570,7 +2716,7 @@ small {
2570
2716
  }
2571
2717
 
2572
2718
  &[open] {
2573
- summary .accordion__marker {
2719
+ > summary .accordion__marker {
2574
2720
  rotate: 0.25turn;
2575
2721
  }
2576
2722
 
@@ -5120,7 +5266,11 @@ dialog.modal {
5120
5266
 
5121
5267
  display: flex;
5122
5268
  flex-direction: column;
5123
- gap: var(--op-space-x-small);
5269
+
5270
+ /* zero specificity. Lets utilities override */
5271
+ :where(&) {
5272
+ gap: var(--op-space-x-small);
5273
+ }
5124
5274
 
5125
5275
  &.text-pair--inline {
5126
5276
  flex-direction: row;