@swiftbrowser/web 0.26.2 → 0.26.4

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.
package/src/styles.css CHANGED
@@ -434,6 +434,68 @@ html[data-sb-frame="ipad"]:not([data-sb-mode="device"]) .home-indicator {
434
434
  width: 315px;
435
435
  }
436
436
 
437
+ /* A Mac window (docs/notes/macos.md): 1024 x 700 points with a 28-point
438
+ title bar the page draws over the app's top (the safe area, as the
439
+ iPhone's status bar is), its traffic lights at the leading edge; no
440
+ island, side buttons, status glyphs or home indicator. The window's title
441
+ is the app's to draw (its navigation title, from the Mac idiom). */
442
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) {
443
+ --device-screen-width: 1024px;
444
+ --device-screen-height: 700px;
445
+ --device-bezel: 0px;
446
+ --device-radius: 11px;
447
+ --device-safe-top: 28px;
448
+ --device-safe-bottom: 0px;
449
+ }
450
+
451
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .device:not(.sb-island) {
452
+ background: none;
453
+ box-shadow:
454
+ 0 0 0 1px rgba(0, 0, 0, 0.18),
455
+ 0 22px 70px 4px rgba(0, 0, 0, 0.45);
456
+ }
457
+
458
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .device::before,
459
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .device::after,
460
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .dynamic-island,
461
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .status-time,
462
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .status-glyphs,
463
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .home-indicator {
464
+ display: none;
465
+ }
466
+
467
+ /* The title bar's window buttons (close, minimize, zoom): three lights 12
468
+ points across, 8 apart, 8 in from the edge, over the app. The bar itself
469
+ is the app's: a navigation screen at the top of the window draws its title
470
+ bar there (the Mac idiom below; the engine leaves the buttons their room),
471
+ and a window with no bar shows its content under them, as a Mac window
472
+ with a hidden title bar does. */
473
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .status-bar {
474
+ justify-content: flex-start;
475
+ padding: 0 0 0 8px;
476
+ background: none;
477
+ }
478
+
479
+ /* The lights sit (bar height − 12) / 2 from the corner: 8 in a plain 28
480
+ bar, 20 in a unified 52 one, 13 in a tab view's 38 toolbar. */
481
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .device:has(.sb-navscreen[data-sb-unified]) .status-bar::before {
482
+ transform: translate(12px, 12px);
483
+ }
484
+
485
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .device:has(.sb-tabview[data-sb-tabs-top]) .status-bar::before {
486
+ transform: translate(5px, 5px);
487
+ }
488
+
489
+ html[data-sb-frame="mac"]:not([data-sb-mode="device"]) .status-bar::before {
490
+ content: "";
491
+ width: 52px;
492
+ height: 12px;
493
+ background:
494
+ radial-gradient(circle at 6px 6px, #ff5f57 0 5.5px, transparent 6px),
495
+ radial-gradient(circle at 26px 6px, #febc2e 0 5.5px, transparent 6px),
496
+ radial-gradient(circle at 46px 6px, #28c840 0 5.5px, transparent 6px);
497
+ }
498
+
437
499
  html[data-sb-frame="none"]:not([data-sb-mode="device"]) .device:not(.sb-island) {
438
500
  flex: 1 1 auto;
439
501
  align-self: stretch;
@@ -3882,7 +3944,8 @@ svg[data-sb-symbol="progress.indicator"] > line:nth-child(8) { animation-delay:
3882
3944
  .sb-datepicker > [hidden],
3883
3945
  .sb-stepper > [hidden],
3884
3946
  .sb-slider > [hidden],
3885
- .sb-slider-labels > [hidden] {
3947
+ .sb-slider-labels > [hidden],
3948
+ .sb-picker > .sb-picker-label[hidden] {
3886
3949
  display: none;
3887
3950
  }
3888
3951
 
@@ -4469,6 +4532,35 @@ svg.sb-path {
4469
4532
  transform: rotate(90deg);
4470
4533
  }
4471
4534
 
4535
+ /* In a list a disclosure group is an outline (src/layout/engine.ts
4536
+ `outlineRows`): its label and its content are rows of the card, each
4537
+ with its line below it while a shown row follows, and a button or link
4538
+ among them fills while pressed, as the card's own rows do. The group
4539
+ element, a row of the card itself, keeps the card's paint and the line
4540
+ under its last row. */
4541
+ .sb-disclosuregroup[data-sb-outline] > .sb-slot > [data-sb-id]:has(~ [data-sb-id]:not([hidden]))::after {
4542
+ content: "";
4543
+ position: absolute;
4544
+ left: var(--sb-separator-leading, 16px);
4545
+ right: 16px;
4546
+ bottom: 0;
4547
+ height: 1px;
4548
+ background: var(--sb-color-row-separator);
4549
+ pointer-events: none;
4550
+ }
4551
+
4552
+ .sb-disclosuregroup[data-sb-outline] > .sb-slot > .sb-button {
4553
+ border-radius: 0;
4554
+ font-size: var(--sb-font-size-body);
4555
+ }
4556
+
4557
+ .sb-disclosuregroup[data-sb-outline] > .sb-slot > .sb-button:active,
4558
+ .sb-disclosuregroup[data-sb-outline] > .sb-slot > .sb-navlink:active,
4559
+ .sb-disclosuregroup[data-sb-outline] > .sb-slot > [data-sb-row-pressed] {
4560
+ opacity: 1;
4561
+ background: var(--sb-color-fill);
4562
+ }
4563
+
4472
4564
  /* Collapsed: the content (a disclosure group's, a sidebar section's rows) is hidden by the engine, without a frame. */
4473
4565
  .sb-disclosuregroup > .sb-slot > [data-sb-id][hidden],
4474
4566
  .sb-disclosuregroup > .sb-slot > [data-sb-ghost][hidden],
@@ -4545,3 +4637,758 @@ svg.sb-path {
4545
4637
  [data-sb-composite] > * {
4546
4638
  --sb-shadow-filter: initial;
4547
4639
  }
4640
+
4641
+ /* ---------------------------------------------------------------------------
4642
+ The Mac idiom (docs/notes/macos.md): the renderer draws macOS when the
4643
+ platform is `macos` (`html[data-sb-platform]`, set by the renderer's
4644
+ environment and pre-set by the page from the device picker's Mac window).
4645
+ The layout engine's MAC_* metrics place everything; this restyles what the
4646
+ iOS idiom draws as Liquid Glass. First pass, to be measured against the
4647
+ real app (the Mac fidelity harness, stage 3).
4648
+ --------------------------------------------------------------------------- */
4649
+
4650
+ /* Measured in the Mac app (macOS 15, scripts/mac-screenshots.sh): the
4651
+ window's title bar is white (#1e1e1e dark) with a #cfcfcf rule under it,
4652
+ its content the window background #f6f6f6 (#282828), a list white
4653
+ (#1e1e1e) with #e6e6e6 (#343434) separators and a rule the bar's color
4654
+ under a header; secondary text is half the label color. */
4655
+ html[data-sb-platform="macos"] .device[data-theme="light"] {
4656
+ /* The window's title bar and toolbar, its controls, the separators. */
4657
+ --sb-mac-bar: #ffffff;
4658
+ --sb-mac-separator: rgba(0, 0, 0, 0.19);
4659
+ --sb-mac-control: #ffffff;
4660
+ --sb-mac-control-shadow:
4661
+ 0 0 0 0.5px rgba(0, 0, 0, 0.12),
4662
+ 0 1px 1px rgba(0, 0, 0, 0.08);
4663
+ /* A text field: the text background, its edges light at the sides and top, darker at the bottom. */
4664
+ --sb-mac-field: #ffffff;
4665
+ --sb-mac-field-shadow:
4666
+ inset 0 0 0 1px rgba(0, 0, 0, 0.11),
4667
+ inset 0 -1px 0 0 rgba(0, 0, 0, 0.27);
4668
+ --sb-mac-segment-track: #ededed;
4669
+ --sb-mac-segment: #ffffff;
4670
+ --sb-mac-tab-selected: #f2f2f2;
4671
+ --sb-mac-sheet: #ececec;
4672
+ /* The window background, under content; a list's background and its rows. */
4673
+ --sb-color-system-background: #f6f6f6;
4674
+ --sb-color-grouped-background: #ffffff;
4675
+ --sb-color-grouped-cell: #ffffff;
4676
+ --sb-color-row-separator: rgba(0, 0, 0, 0.1);
4677
+ --sb-color-secondary: rgba(0, 0, 0, 0.5);
4678
+ }
4679
+
4680
+ html[data-sb-platform="macos"] .device[data-theme="dark"] {
4681
+ --sb-mac-bar: #1e1e1e;
4682
+ --sb-mac-separator: rgba(255, 255, 255, 0.2);
4683
+ --sb-mac-control: #5c5c5c;
4684
+ --sb-mac-control-shadow:
4685
+ 0 0 0 0.5px rgba(0, 0, 0, 0.4),
4686
+ 0 1px 1px rgba(0, 0, 0, 0.2);
4687
+ --sb-mac-field: #333333;
4688
+ --sb-mac-field-shadow:
4689
+ inset 0 0 0 1px rgba(255, 255, 255, 0.12),
4690
+ inset 0 -1px 0 0 rgba(255, 255, 255, 0.2);
4691
+ --sb-mac-segment-track: #333333;
4692
+ --sb-mac-segment: #666666;
4693
+ --sb-mac-tab-selected: #292929;
4694
+ --sb-mac-sheet: #2b2b2b;
4695
+ --sb-color-system-background: #282828;
4696
+ --sb-color-grouped-background: #1e1e1e;
4697
+ --sb-color-grouped-cell: #1e1e1e;
4698
+ --sb-color-row-separator: rgba(255, 255, 255, 0.1);
4699
+ --sb-color-secondary: rgba(255, 255, 255, 0.55);
4700
+ }
4701
+
4702
+ /* The title bar in place of the navigation bar: opaque, the window's chrome
4703
+ color, a hairline under it; no scroll-edge gradient and no glass capsules
4704
+ (the items sit on the bar). */
4705
+ html[data-sb-platform="macos"] .sb-navbar {
4706
+ background: var(--sb-mac-bar);
4707
+ }
4708
+
4709
+ /* The rule under the title bar is the row below it (the content's first). */
4710
+ html[data-sb-platform="macos"] .sb-navbar::after {
4711
+ content: "";
4712
+ position: absolute;
4713
+ left: 0;
4714
+ right: 0;
4715
+ bottom: -1px;
4716
+ height: 1px;
4717
+ background: var(--sb-mac-separator);
4718
+ pointer-events: none;
4719
+ }
4720
+
4721
+ html[data-sb-platform="macos"] .sb-navbar::before,
4722
+ html[data-sb-platform="macos"] .sb-bar-glass {
4723
+ display: none;
4724
+ }
4725
+
4726
+ /* The back button, the More button and the sidebar toggle: bare 28
4727
+ buttons (the engine's `back`, `more`, `toggle` rects), not glass circles;
4728
+ the back chevron is a secondary-colored glyph (measured in the Mac app). */
4729
+ html[data-sb-platform="macos"] .sb-navbar-back,
4730
+ html[data-sb-platform="macos"] .sb-navbar-more,
4731
+ html[data-sb-platform="macos"] .sb-navsplit-toggle {
4732
+ width: 28px;
4733
+ height: 28px;
4734
+ border-radius: 6px;
4735
+ background: none;
4736
+ box-shadow: none;
4737
+ backdrop-filter: none;
4738
+ -webkit-backdrop-filter: none;
4739
+ font-size: 13px;
4740
+ --sb-press-scale: 1;
4741
+ }
4742
+
4743
+ html[data-sb-platform="macos"] .sb-navbar-back > svg {
4744
+ width: 14px;
4745
+ height: 14px;
4746
+ margin-left: -1px;
4747
+ color: var(--sb-color-secondary);
4748
+ }
4749
+
4750
+ /* A bar's text button is a bordered 28 button at its slot (the engine's
4751
+ `bordered` rect, `data-sb-bordered="inset"` as a list row's), 6 beside
4752
+ its label; its label the primary color. */
4753
+ html[data-sb-platform="macos"] .sb-navbar .sb-button[data-sb-bordered="inset"] {
4754
+ color: var(--sb-button-color, var(--sb-color-primary));
4755
+ }
4756
+
4757
+ html[data-sb-platform="macos"] .sb-navbar-back:active,
4758
+ html[data-sb-platform="macos"] .sb-navbar-more:active {
4759
+ opacity: 1;
4760
+ background: var(--sb-color-fill);
4761
+ }
4762
+
4763
+ /* The title: the headline (13 semibold) centered in a plain title bar; in a
4764
+ unified one the window title, leading-aligned after the back button and
4765
+ the leading items, 15 semibold (the engine's `title` rect and font). */
4766
+ html[data-sb-platform="macos"] .sb-navbar-title {
4767
+ font-size: var(--sb-ts-headline-size, 13px);
4768
+ }
4769
+
4770
+ html[data-sb-platform="macos"] .sb-navscreen[data-sb-unified] > .sb-navbar > .sb-navbar-title {
4771
+ text-align: start;
4772
+ font-size: var(--sb-ts-title3-size, 15px);
4773
+ }
4774
+
4775
+ /* `.navigationSubtitle`: a second line under the title in a unified title
4776
+ bar (the engine's `subtitle` rect; in a plain bar it joins the title). */
4777
+ .sb-navbar-subtitle {
4778
+ position: absolute;
4779
+ display: block;
4780
+ overflow: hidden;
4781
+ text-overflow: ellipsis;
4782
+ white-space: nowrap;
4783
+ text-align: start;
4784
+ font-size: 11px;
4785
+ color: var(--sb-color-secondary);
4786
+ }
4787
+
4788
+ .sb-navbar-subtitle[hidden] {
4789
+ display: none;
4790
+ }
4791
+
4792
+ /* A `Form` is the columns style (the engine's `columns` plan): on the
4793
+ window background with no cards or separators; the labels (chrome
4794
+ `formLabel<i>`) right-aligned in their column, the label color; a
4795
+ section's header and footer 13 regular, the label color; a text field's
4796
+ title moved to the column shows no placeholder. */
4797
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] {
4798
+ background: var(--sb-color-system-background);
4799
+ }
4800
+
4801
+ /* The rows' card spans the form (the label column is drawn in it): no card look, nothing clipped. */
4802
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-section-rows {
4803
+ border-radius: 0;
4804
+ background: transparent;
4805
+ overflow: visible;
4806
+ }
4807
+
4808
+ /* A text field's row is the field (the engine's row rect): the Mac's bezel, its text 3 in. */
4809
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-textfield[data-sb-style] {
4810
+ box-sizing: border-box;
4811
+ padding: 0 3px;
4812
+ border-radius: 5px;
4813
+ background: var(--sb-mac-field);
4814
+ box-shadow: var(--sb-mac-field-shadow);
4815
+ }
4816
+
4817
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-textfield[data-sb-style]:focus {
4818
+ box-shadow:
4819
+ var(--sb-mac-field-shadow),
4820
+ 0 0 0 3.5px color-mix(in srgb, var(--sb-tint, var(--sb-color-accent)) 50%, transparent);
4821
+ }
4822
+
4823
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-section-rows > ::after,
4824
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] > .sb-list-content > :not(.sb-section)::after,
4825
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-section-header::after,
4826
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-section-footer::after {
4827
+ display: none;
4828
+ }
4829
+
4830
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-section-header,
4831
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-section-footer {
4832
+ color: var(--sb-color-primary);
4833
+ }
4834
+
4835
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-form-label {
4836
+ position: absolute;
4837
+ white-space: pre;
4838
+ text-align: right;
4839
+ color: var(--sb-color-primary);
4840
+ }
4841
+
4842
+ @supports (text-box: trim-start cap alphabetic) {
4843
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-form-label {
4844
+ text-box: trim-start cap alphabetic;
4845
+ padding-top: var(--sb-cap-inset);
4846
+ }
4847
+ }
4848
+
4849
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] input.sb-textfield::placeholder {
4850
+ color: transparent;
4851
+ }
4852
+
4853
+ /* A pop-up button spanning the controls column: its value at the leading end, the chevrons at the trailing. */
4854
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-picker[data-sb-popup] > .sb-picker-value {
4855
+ justify-content: space-between;
4856
+ }
4857
+
4858
+ /* The tab bar: a segmented control at the top of the content (the engine's
4859
+ Mac tab view), each tab a segment with its title alone, the selected one
4860
+ raised; no icons, no glass. */
4861
+ html[data-sb-platform="macos"] .sb-tabbar {
4862
+ z-index: 2;
4863
+ border-radius: 6px;
4864
+ background: none;
4865
+ box-shadow: inset 0 0 0 1px var(--sb-color-row-separator);
4866
+ backdrop-filter: none;
4867
+ -webkit-backdrop-filter: none;
4868
+ }
4869
+
4870
+ html[data-sb-platform="macos"] .sb-tabbar-item {
4871
+ border-radius: 5px;
4872
+ color: var(--sb-color-primary);
4873
+ }
4874
+
4875
+ html[data-sb-platform="macos"] .sb-tabbar-item[aria-selected="true"] {
4876
+ color: var(--sb-color-primary);
4877
+ background: var(--sb-mac-tab-selected);
4878
+ box-shadow: none;
4879
+ }
4880
+
4881
+ html[data-sb-platform="macos"] .sb-tabbar-icon,
4882
+ html[data-sb-platform="macos"] .sb-tabbar-badge {
4883
+ display: none;
4884
+ }
4885
+
4886
+ html[data-sb-platform="macos"] .sb-tabbar-title {
4887
+ font-size: 13px;
4888
+ line-height: 16px;
4889
+ font-weight: 400;
4890
+ letter-spacing: 0;
4891
+ }
4892
+
4893
+ /* Buttons: a bordered button, and an automatic one the engine bordered
4894
+ (`data-sb-bordered`: outside a list row and a bar), is the Mac's push
4895
+ button, 22 tall with a 6 radius, the control color with a hairline and a
4896
+ shadow, its label the primary color; a prominent one the accent with
4897
+ white text. */
4898
+ html[data-sb-platform="macos"] .sb-button[data-sb-style="bordered"],
4899
+ html[data-sb-platform="macos"] .sb-button[data-sb-style="automatic"][data-sb-bordered],
4900
+ html[data-sb-platform="macos"] .sb-button[data-sb-style="borderedProminent"] {
4901
+ border-radius: 6px;
4902
+ background: var(--sb-mac-control);
4903
+ box-shadow: var(--sb-mac-control-shadow);
4904
+ color: var(--sb-button-color, var(--sb-color-primary));
4905
+ }
4906
+
4907
+ html[data-sb-platform="macos"] .sb-button[data-sb-style="borderedProminent"] {
4908
+ background: var(--sb-tint, var(--sb-color-accent));
4909
+ color: #ffffff;
4910
+ }
4911
+
4912
+ /* A disabled push button is faded, not grayed; a plain button's label is
4913
+ the secondary color (measured in the Mac app). */
4914
+ html[data-sb-platform="macos"] [data-sb-disabled] > .sb-button:is([data-sb-style="bordered"], [data-sb-style="borderedProminent"], [data-sb-bordered]) {
4915
+ background: var(--sb-mac-control);
4916
+ color: var(--sb-color-primary);
4917
+ opacity: 0.5;
4918
+ }
4919
+
4920
+ html[data-sb-platform="macos"] [data-sb-disabled] > .sb-button[data-sb-style="borderedProminent"] {
4921
+ background: var(--sb-tint, var(--sb-color-accent));
4922
+ color: #ffffff;
4923
+ }
4924
+
4925
+ html[data-sb-platform="macos"] .sb-button[data-sb-style="plain"] {
4926
+ color: var(--sb-button-color, var(--sb-color-secondary));
4927
+ }
4928
+
4929
+ /* A segmented control (measured in the Mac app): 22 tall with a 5 radius,
4930
+ a gray track under a hairline, 13-point regular labels, the selected
4931
+ segment white (dark: lighter gray) with a shadow, 1 in; its label (the
4932
+ engine's `label`) before it in the row's font. */
4933
+ html[data-sb-platform="macos"] .sb-picker[data-sb-style="segmented"]:not([data-sb-bar]) > .sb-segment-track {
4934
+ border-radius: 5px;
4935
+ background: var(--sb-mac-segment-track);
4936
+ box-shadow: inset 0 0 0 0.5px var(--sb-mac-separator);
4937
+ }
4938
+
4939
+ html[data-sb-platform="macos"] .sb-picker[data-sb-style="segmented"]:not([data-sb-bar]) > .sb-segment {
4940
+ font: 400 13px/16px var(--sb-font-family);
4941
+ letter-spacing: 0;
4942
+ }
4943
+
4944
+ html[data-sb-platform="macos"] .sb-picker[data-sb-style="segmented"]:not([data-sb-bar]) > .sb-segment::before {
4945
+ inset: 1px;
4946
+ border-radius: 4px;
4947
+ }
4948
+
4949
+ html[data-sb-platform="macos"] .sb-picker[data-sb-style="segmented"]:not([data-sb-bar]) > .sb-segment[aria-checked="true"]::before {
4950
+ background: var(--sb-mac-segment);
4951
+ box-shadow: var(--sb-mac-control-shadow);
4952
+ }
4953
+
4954
+ html[data-sb-platform="macos"] .sb-picker[data-sb-style="segmented"] > .sb-picker-label {
4955
+ color: var(--sb-color-primary);
4956
+ }
4957
+
4958
+ /* A toggle outside a list row is a checkbox (the engine's `checkbox` rect:
4959
+ 14 square before the label), the accent with a check mark while on. */
4960
+ html[data-sb-platform="macos"] .sb-toggle[data-sb-checkbox] > .sb-switch {
4961
+ border-radius: 3px;
4962
+ background: var(--sb-mac-control);
4963
+ box-shadow: var(--sb-mac-control-shadow);
4964
+ }
4965
+
4966
+ html[data-sb-platform="macos"] .sb-toggle[data-sb-checkbox] > .sb-switch[aria-checked="true"] {
4967
+ background: var(--sb-tint, var(--sb-color-accent));
4968
+ }
4969
+
4970
+ html[data-sb-platform="macos"] .sb-toggle[data-sb-checkbox] > .sb-switch > .sb-switch-knob {
4971
+ display: none;
4972
+ }
4973
+
4974
+ html[data-sb-platform="macos"] .sb-toggle[data-sb-checkbox] > .sb-switch[aria-checked="true"]::after {
4975
+ content: "";
4976
+ position: absolute;
4977
+ left: 4.5px;
4978
+ top: 1.5px;
4979
+ width: 3.5px;
4980
+ height: 7.5px;
4981
+ border: solid #ffffff;
4982
+ border-width: 0 2px 2px 0;
4983
+ transform: rotate(45deg);
4984
+ }
4985
+
4986
+ /* A toggle in a list row (a grouped form's) is the small switch, 26 × 15. */
4987
+ html[data-sb-platform="macos"] .sb-list .sb-toggle:not([data-sb-checkbox]):not([data-sb-toggle-style="button"]) > .sb-switch > .sb-switch-knob {
4988
+ top: 1px;
4989
+ left: 1px;
4990
+ width: 13px;
4991
+ height: 13px;
4992
+ border-radius: 50%;
4993
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
4994
+ }
4995
+
4996
+ html[data-sb-platform="macos"] .sb-list .sb-toggle:not([data-sb-checkbox]):not([data-sb-toggle-style="button"]) > .sb-switch[aria-checked="true"] > .sb-switch-knob {
4997
+ transform: translateX(11px);
4998
+ }
4999
+
5000
+ /* A menu picker outside a list row is a pop-up button: its value and the
5001
+ chevrons in a bordered button (the engine's `popup` rect), the chevrons
5002
+ on an accent square at its trailing end. */
5003
+ html[data-sb-platform="macos"] .sb-picker[data-sb-popup] > .sb-picker-value {
5004
+ box-sizing: border-box;
5005
+ padding: 0 3px 0 8px;
5006
+ gap: 6px;
5007
+ border-radius: 5px;
5008
+ background: var(--sb-mac-control);
5009
+ box-shadow: var(--sb-mac-control-shadow);
5010
+ color: var(--sb-color-primary);
5011
+ }
5012
+
5013
+ html[data-sb-platform="macos"] .sb-picker[data-sb-popup] > .sb-picker-value > svg {
5014
+ box-sizing: border-box;
5015
+ width: 16px;
5016
+ height: 16px;
5017
+ padding: 3px;
5018
+ border-radius: 4px;
5019
+ background: var(--sb-tint, var(--sb-color-accent));
5020
+ color: #ffffff;
5021
+ stroke-width: 3;
5022
+ }
5023
+
5024
+ /* Lists: no cards (the rows run the list's width on its white), a separator
5025
+ under every row from its first text to 16 before the edge, a rule across
5026
+ the list 8 under a header and 5 under a footer; a selected row is the
5027
+ accent with white text (the sidebar's, when the window is key). The
5028
+ engine draws no chevrons. */
5029
+ html[data-sb-platform="macos"] .sb-section-rows,
5030
+ html[data-sb-platform="macos"] .sb-list-content > :not(.sb-section) {
5031
+ border-radius: 0;
5032
+ background: none;
5033
+ }
5034
+
5035
+ html[data-sb-platform="macos"] .sb-section-rows > [data-sb-id],
5036
+ html[data-sb-platform="macos"] .sb-section-rows > [data-sb-ghost] {
5037
+ background: var(--sb-row-background, transparent);
5038
+ }
5039
+
5040
+ html[data-sb-platform="macos"] .sb-section-rows > :last-child::after,
5041
+ html[data-sb-platform="macos"] .sb-list-content > :not(.sb-section):last-child::after,
5042
+ html[data-sb-platform="macos"] .sb-list-content > :not(.sb-section):has(+ .sb-section)::after {
5043
+ content: "";
5044
+ position: absolute;
5045
+ left: var(--sb-separator-leading, 16px);
5046
+ right: 16px;
5047
+ bottom: 0;
5048
+ height: 1px;
5049
+ background: var(--sb-color-row-separator);
5050
+ pointer-events: none;
5051
+ }
5052
+
5053
+ html[data-sb-platform="macos"] .sb-section-header,
5054
+ html[data-sb-platform="macos"] .sb-section-footer {
5055
+ color: var(--sb-color-secondary);
5056
+ }
5057
+
5058
+ html[data-sb-platform="macos"] .sb-section-header::after,
5059
+ html[data-sb-platform="macos"] .sb-section-footer::after {
5060
+ content: "";
5061
+ position: absolute;
5062
+ left: -16px;
5063
+ right: -16px;
5064
+ bottom: -9px;
5065
+ height: 1px;
5066
+ background: var(--sb-mac-separator);
5067
+ pointer-events: none;
5068
+ }
5069
+
5070
+ html[data-sb-platform="macos"] .sb-section-footer::after {
5071
+ display: none;
5072
+ bottom: -6px;
5073
+ background: var(--sb-color-row-separator);
5074
+ }
5075
+
5076
+ /* The rule under a footer only where another section follows (a columns form has none). */
5077
+ html[data-sb-platform="macos"] .sb-section:has(+ .sb-section) > .sb-section-footer::after {
5078
+ display: block;
5079
+ }
5080
+
5081
+ html[data-sb-platform="macos"] .sb-list[data-sb-form-columns] .sb-section:has(+ .sb-section) > .sb-section-footer::after {
5082
+ display: none;
5083
+ }
5084
+
5085
+ /* A button in a list row is a push button at its own size (the engine's
5086
+ `bordered` rect, `data-sb-bordered="inset"`), on the row, not the row
5087
+ itself; a destructive one is not tinted. */
5088
+ html[data-sb-platform="macos"] .sb-button[data-sb-style][data-sb-bordered="inset"] {
5089
+ border-radius: 0;
5090
+ background: none;
5091
+ box-shadow: none;
5092
+ }
5093
+
5094
+ html[data-sb-platform="macos"] .sb-button[data-sb-style][data-sb-bordered="inset"]::before {
5095
+ content: "";
5096
+ position: absolute;
5097
+ left: var(--sb-bordered-left);
5098
+ top: var(--sb-bordered-top);
5099
+ width: var(--sb-bordered-width);
5100
+ height: var(--sb-bordered-height);
5101
+ border-radius: 6px;
5102
+ background: var(--sb-mac-control);
5103
+ box-shadow: var(--sb-mac-control-shadow);
5104
+ pointer-events: none;
5105
+ }
5106
+
5107
+ html[data-sb-platform="macos"] .sb-button[data-sb-bordered][data-sb-role="destructive"],
5108
+ html[data-sb-platform="macos"] .sb-button[data-sb-style="bordered"][data-sb-role="destructive"] {
5109
+ color: var(--sb-color-primary);
5110
+ }
5111
+
5112
+ html[data-sb-platform="macos"] .sb-navlink[data-sb-selected],
5113
+ html[data-sb-platform="macos"] .sb-list[data-sb-list-style] > .sb-list-content > .sb-navlink[data-sb-selected],
5114
+ html[data-sb-platform="macos"] .sb-list[data-sb-list-style] .sb-section-rows > .sb-navlink[data-sb-selected] {
5115
+ border-radius: 5px;
5116
+ background: var(--sb-tint, var(--sb-color-accent));
5117
+ color: #ffffff;
5118
+ --sb-button-color: #ffffff;
5119
+ }
5120
+
5121
+ /* A selected `listrow` (a sidebar's rows select as rows) is the accent too;
5122
+ the link in it stays clear, as above. */
5123
+ html[data-sb-platform="macos"] .sb-listrow[data-sb-selected],
5124
+ html[data-sb-platform="macos"] .sb-list[data-sb-list-style] > .sb-list-content > .sb-listrow[data-sb-selected],
5125
+ html[data-sb-platform="macos"] .sb-list[data-sb-list-style] .sb-section-rows > .sb-listrow[data-sb-selected] {
5126
+ border-radius: 5px;
5127
+ background: var(--sb-tint, var(--sb-color-accent));
5128
+ color: #ffffff;
5129
+ --sb-button-color: #ffffff;
5130
+ }
5131
+
5132
+ html[data-sb-platform="macos"] .sb-listrow .sb-navlink[data-sb-selected] {
5133
+ background: transparent;
5134
+ }
5135
+
5136
+ /* A search field, in the title bar (the engine's `searchBar`) or on its
5137
+ own (a list row's, 22 tall): a bordered field with the magnifier, no glass. */
5138
+ html[data-sb-platform="macos"] .sb-searchfield {
5139
+ gap: 4px;
5140
+ padding: 0 6px 0 5px;
5141
+ border-radius: 6px;
5142
+ background: var(--sb-mac-control);
5143
+ box-shadow: var(--sb-mac-control-shadow);
5144
+ backdrop-filter: none;
5145
+ -webkit-backdrop-filter: none;
5146
+ }
5147
+
5148
+ html[data-sb-platform="macos"] .sb-searchfield::after {
5149
+ display: none;
5150
+ }
5151
+
5152
+ html[data-sb-platform="macos"] .sb-searchfield > svg {
5153
+ width: 13px;
5154
+ height: 13px;
5155
+ color: var(--sb-color-secondary);
5156
+ }
5157
+
5158
+ html[data-sb-platform="macos"] .sb-searchfield > .sb-searchfield-input {
5159
+ font-size: 13px;
5160
+ }
5161
+
5162
+ html[data-sb-platform="macos"] .sb-searchfield > .sb-searchfield-input::placeholder {
5163
+ color: var(--sb-color-tertiary-label);
5164
+ }
5165
+
5166
+ /* A sheet is a window-modal panel hanging from the title bar (the engine's
5167
+ form sheet on a Mac): square at the top, rounded below, a shadow; it
5168
+ drops in from above rather than sliding up. */
5169
+ /* A sheet (measured in the Mac app): a panel centered in the window with a
5170
+ 10 radius and a shadow, its content on the window color under the white
5171
+ title bar (the stack's bar: its title leading, 13 bold); its actions in a
5172
+ 60 bar at the bottom under a rule (the engine's `actions`). */
5173
+ html[data-sb-platform="macos"] .sb-sheet[data-sb-form] > .sb-sheet-card {
5174
+ --sb-sheet-offscreen: -100vh;
5175
+ border-radius: 10px;
5176
+ background: var(--sb-mac-sheet);
5177
+ box-shadow:
5178
+ 0 0 0 0.5px rgba(0, 0, 0, 0.25),
5179
+ 0 12px 40px rgba(0, 0, 0, 0.35);
5180
+ }
5181
+
5182
+ html[data-sb-platform="macos"] .sb-sheet[data-sb-form][data-sb-actions] > .sb-sheet-card::after {
5183
+ content: "";
5184
+ position: absolute;
5185
+ left: 0;
5186
+ right: 0;
5187
+ bottom: 0;
5188
+ height: 60px;
5189
+ box-shadow: inset 0 1px 0 var(--sb-color-row-separator);
5190
+ pointer-events: none;
5191
+ }
5192
+
5193
+ html[data-sb-platform="macos"] .sb-navscreen[data-sb-sheet-bar] > .sb-navbar > .sb-navbar-title {
5194
+ text-align: start;
5195
+ font-size: 13px;
5196
+ font-weight: 700;
5197
+ }
5198
+
5199
+ /* The sheet's actions are push buttons (the engine places them in the bottom bar). */
5200
+ html[data-sb-platform="macos"] .sb-navscreen[data-sb-sheet-bar] > .sb-toolbar .sb-button[data-sb-bordered] {
5201
+ color: var(--sb-button-color, var(--sb-color-primary));
5202
+ }
5203
+
5204
+ /* Text fields: 22 tall and bordered in every style but `plain`, the control
5205
+ color with a hairline, a 5 radius, the text 6 in. */
5206
+ html[data-sb-platform="macos"] .sb-textfield:not([data-sb-style="plain"]) {
5207
+ box-sizing: border-box;
5208
+ padding: 0 6px;
5209
+ border: 0;
5210
+ border-radius: 5px;
5211
+ background: var(--sb-mac-field);
5212
+ box-shadow: var(--sb-mac-field-shadow);
5213
+ font-size: 13px;
5214
+ }
5215
+
5216
+ html[data-sb-platform="macos"] .sb-textfield:not([data-sb-style="plain"]):focus {
5217
+ box-shadow:
5218
+ var(--sb-mac-field-shadow),
5219
+ 0 0 0 3.5px color-mix(in srgb, var(--sb-tint, var(--sb-color-accent)) 50%, transparent);
5220
+ }
5221
+
5222
+ /* A text editor draws its own white (the Mac's text background), whatever is behind it. */
5223
+ html[data-sb-platform="macos"] .sb-texteditor {
5224
+ background: var(--sb-color-grouped-cell);
5225
+ }
5226
+
5227
+ /* A stepper's control is the Mac's pair of arrows (the engine's `arrows`
5228
+ rect, 13 × 22): up over down, in one bordered control. */
5229
+ html[data-sb-platform="macos"] .sb-stepper[data-sb-arrows] > .sb-stepper-control {
5230
+ flex-direction: column-reverse;
5231
+ border-radius: 5px;
5232
+ background: var(--sb-mac-control);
5233
+ box-shadow: var(--sb-mac-control-shadow);
5234
+ }
5235
+
5236
+ html[data-sb-platform="macos"] .sb-stepper[data-sb-arrows] > .sb-stepper-control > .sb-stepper-button {
5237
+ min-height: 0;
5238
+ font-size: 0;
5239
+ line-height: 0;
5240
+ }
5241
+
5242
+ /* The arrows stand in for the plus and minus glyphs. */
5243
+ html[data-sb-platform="macos"] .sb-stepper[data-sb-arrows] > .sb-stepper-control > .sb-stepper-button > svg {
5244
+ display: none;
5245
+ }
5246
+
5247
+ html[data-sb-platform="macos"] .sb-stepper[data-sb-arrows] > .sb-stepper-control > .sb-stepper-button::after {
5248
+ content: "";
5249
+ width: 0;
5250
+ height: 0;
5251
+ border: 3px solid transparent;
5252
+ border-bottom: 4px solid var(--sb-color-primary);
5253
+ border-top: 0;
5254
+ transform: translateY(-1px);
5255
+ }
5256
+
5257
+ html[data-sb-platform="macos"] .sb-stepper[data-sb-arrows] > .sb-stepper-control > .sb-stepper-button:first-child::after {
5258
+ border-bottom: 0;
5259
+ border-top: 4px solid var(--sb-color-primary);
5260
+ transform: translateY(1px);
5261
+ }
5262
+
5263
+ html[data-sb-platform="macos"] .sb-stepper[data-sb-arrows] > .sb-stepper-control > .sb-stepper-button + .sb-stepper-button::before {
5264
+ display: none;
5265
+ }
5266
+
5267
+ /* An alert is a panel (the engine's `panel` rect, 260 wide): the window
5268
+ color with a 10 radius and a shadow, no glass, its title and message
5269
+ centered; its buttons are push buttons, the default one (the last that is
5270
+ not a cancel) the accent. */
5271
+ html[data-sb-platform="macos"] .sb-alert[data-sb-panel] .sb-alert-card {
5272
+ border-radius: 10px;
5273
+ background: var(--sb-mac-bar);
5274
+ box-shadow:
5275
+ 0 0 0 0.5px rgba(0, 0, 0, 0.2),
5276
+ 0 12px 40px rgba(0, 0, 0, 0.3);
5277
+ backdrop-filter: none;
5278
+ -webkit-backdrop-filter: none;
5279
+ }
5280
+
5281
+ /* The app's icon, 54 at the top of the panel (a generic one: the page has none). */
5282
+ html[data-sb-platform="macos"] .sb-alert[data-sb-panel] .sb-alert-card::before {
5283
+ content: "";
5284
+ position: absolute;
5285
+ top: 25px;
5286
+ left: 50%;
5287
+ width: 54px;
5288
+ height: 54px;
5289
+ margin-left: -27px;
5290
+ border-radius: 12px;
5291
+ background:
5292
+ linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
5293
+ repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px 9px),
5294
+ repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px 9px),
5295
+ #d3e0e5;
5296
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
5297
+ }
5298
+
5299
+ /* Measured in the Mac app: the buttons gray (the control color darkened),
5300
+ 28 tall, 13 regular; a destructive one red; a lone OK the accent. */
5301
+ html[data-sb-platform="macos"] .sb-alert[data-sb-panel] .sb-alert-buttons > .sb-button,
5302
+ html[data-sb-platform="macos"] .sb-alert[data-sb-panel] .sb-alert-ok {
5303
+ border-radius: 6px;
5304
+ background: var(--sb-color-fill);
5305
+ box-shadow: none;
5306
+ color: var(--sb-color-primary);
5307
+ font-size: 13px;
5308
+ }
5309
+
5310
+ html[data-sb-platform="macos"] .sb-alert[data-sb-panel] .sb-alert-ok {
5311
+ background: var(--sb-tint, var(--sb-color-accent));
5312
+ color: #ffffff;
5313
+ }
5314
+
5315
+ html[data-sb-platform="macos"] .sb-alert[data-sb-panel] .sb-alert-buttons > .sb-button[data-sb-role="destructive"] {
5316
+ color: var(--sb-color-red);
5317
+ }
5318
+
5319
+ html[data-sb-platform="macos"] .sb-alert[data-sb-panel] .sb-alert-buttons > .sb-button:active,
5320
+ html[data-sb-platform="macos"] .sb-alert[data-sb-panel] .sb-alert-ok:active {
5321
+ filter: brightness(0.92);
5322
+ }
5323
+
5324
+ /* A slider's knob is the Mac's round one (the engine's `knob` rect, 20) on
5325
+ a 4 track. */
5326
+ html[data-sb-platform="macos"] .sb-slider[data-sb-knob] > .sb-slider-track,
5327
+ html[data-sb-platform="macos"] .sb-slider[data-sb-knob] > .sb-slider-fill {
5328
+ border-radius: 2px;
5329
+ }
5330
+
5331
+ html[data-sb-platform="macos"] .sb-slider[data-sb-knob] > .sb-slider-thumb {
5332
+ border-radius: 50%;
5333
+ box-shadow:
5334
+ 0 0 0 0.5px rgba(0, 0, 0, 0.2),
5335
+ 0 1px 2px rgba(0, 0, 0, 0.2);
5336
+ }
5337
+
5338
+ /* A compact date picker's date and time are bordered fields (the engine's
5339
+ `fields` rect spans them), 22 tall. */
5340
+ html[data-sb-platform="macos"] .sb-datepicker[data-sb-fields] > .sb-datepicker-capsule,
5341
+ html[data-sb-platform="macos"] .sb-datepicker[data-sb-fields] > .sb-datepicker-date,
5342
+ html[data-sb-platform="macos"] .sb-datepicker[data-sb-fields] > .sb-datepicker-time {
5343
+ border-radius: 5px;
5344
+ background: var(--sb-mac-control);
5345
+ box-shadow: var(--sb-mac-control-shadow);
5346
+ font-size: 13px;
5347
+ }
5348
+
5349
+ /* A menu outside a bar and a list row is a pull-down button (the engine's
5350
+ `pulldown` rect): a push button around the label with the chevrons on an
5351
+ accent square at its trailing end. */
5352
+ html[data-sb-platform="macos"] .sb-menu[data-sb-pulldown] {
5353
+ position: relative;
5354
+ border-radius: 6px;
5355
+ background: var(--sb-mac-control);
5356
+ box-shadow: var(--sb-mac-control-shadow);
5357
+ color: var(--sb-color-primary);
5358
+ }
5359
+
5360
+ html[data-sb-platform="macos"] .sb-menu[data-sb-pulldown]:active {
5361
+ opacity: 1;
5362
+ filter: brightness(0.92);
5363
+ }
5364
+
5365
+ html[data-sb-platform="macos"] .sb-menu[data-sb-pulldown]::after {
5366
+ content: "";
5367
+ position: absolute;
5368
+ right: 3px;
5369
+ top: 50%;
5370
+ width: 16px;
5371
+ height: 16px;
5372
+ margin-top: -8px;
5373
+ border-radius: 4px;
5374
+ background:
5375
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6.5 8 3.5l3 3M5 9.5l3 3 3-3'/%3E%3C/svg%3E") center / 16px 16px no-repeat,
5376
+ var(--sb-tint, var(--sb-color-accent));
5377
+ pointer-events: none;
5378
+ }
5379
+
5380
+ /* The sidebar material: a sidebar list sits on the Mac's sidebar gray, the
5381
+ window's chrome color (lighter than the grouped background). */
5382
+ html[data-sb-platform="macos"] .device[data-theme="light"] {
5383
+ --sb-mac-sidebar: #e8e8e8;
5384
+ }
5385
+
5386
+ html[data-sb-platform="macos"] .device[data-theme="dark"] {
5387
+ --sb-mac-sidebar: #2b2b2b;
5388
+ }
5389
+
5390
+ html[data-sb-platform="macos"] .sb-list[data-sb-list-look="sidebar"] {
5391
+ background: var(--sb-mac-sidebar);
5392
+ --sb-icon-knockout: var(--sb-mac-sidebar);
5393
+ }
5394
+