@inkbar/theme 0.5.0 → 0.7.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.
- package/package.json +1 -1
- package/theme.css +238 -1
package/package.json
CHANGED
package/theme.css
CHANGED
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
--ink-ink: #151820;
|
|
30
30
|
--ink-redact: #c0392b;
|
|
31
31
|
--ink-redact-fill: #000000;
|
|
32
|
+
/* Pages stay white in dark mode and the search layer multiplies, so these serve both. */
|
|
33
|
+
--ink-search-hit: #f1ffa0;
|
|
34
|
+
--ink-search-current: #e4ff4a;
|
|
32
35
|
|
|
33
36
|
--ink-bg: var(--muted, #f1f2f5);
|
|
34
37
|
--ink-fg: var(--foreground, #151820);
|
|
@@ -318,11 +321,39 @@
|
|
|
318
321
|
border-radius: 50%;
|
|
319
322
|
}
|
|
320
323
|
|
|
324
|
+
/* Search matches sit under the annotations: before the overlay in the page, same level. The
|
|
325
|
+
layer multiplies with the page, so dark text shows through as if the page were marked. */
|
|
326
|
+
:where(.ink-search-layer) {
|
|
327
|
+
z-index: 1;
|
|
328
|
+
pointer-events: none;
|
|
329
|
+
mix-blend-mode: multiply;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
:where([data-search-hit]) {
|
|
333
|
+
background: var(--ink-search-hit);
|
|
334
|
+
border-radius: 2px;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
:where([data-search-hit][data-current]) {
|
|
338
|
+
background: var(--ink-search-current);
|
|
339
|
+
}
|
|
340
|
+
|
|
321
341
|
/* Annotations */
|
|
322
342
|
:where(.ink-overlay) {
|
|
323
343
|
z-index: 1;
|
|
324
344
|
}
|
|
325
345
|
|
|
346
|
+
/* Plugin layers sit over the overlay (after it, at the same level). Presses that miss a
|
|
347
|
+
plugin's marks go through to the annotations and tools underneath. */
|
|
348
|
+
:where(.ink-plugin-layer) {
|
|
349
|
+
z-index: 1;
|
|
350
|
+
pointer-events: none;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
:where(.ink-plugin-layer > *) {
|
|
354
|
+
pointer-events: auto;
|
|
355
|
+
}
|
|
356
|
+
|
|
326
357
|
:where(.ink-annotation) {
|
|
327
358
|
border-radius: 2px;
|
|
328
359
|
outline: 1px solid transparent;
|
|
@@ -589,6 +620,145 @@
|
|
|
589
620
|
cursor: default;
|
|
590
621
|
}
|
|
591
622
|
|
|
623
|
+
/*
|
|
624
|
+
* A plugin command button (createCommandButton): the button looks like a toolbar button
|
|
625
|
+
* wherever it sits, and its status text goes beside it.
|
|
626
|
+
*/
|
|
627
|
+
:where(.ink-command) {
|
|
628
|
+
display: inline-flex;
|
|
629
|
+
align-items: center;
|
|
630
|
+
gap: 0.5rem;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
:where(.ink-command button) {
|
|
634
|
+
display: inline-flex;
|
|
635
|
+
align-items: center;
|
|
636
|
+
justify-content: center;
|
|
637
|
+
min-width: var(--ink-control-size, 2.25rem);
|
|
638
|
+
height: var(--ink-control-size, 2.25rem);
|
|
639
|
+
padding: 0 0.5rem;
|
|
640
|
+
border: 1px solid transparent;
|
|
641
|
+
border-radius: calc(var(--ink-radius) - 2px);
|
|
642
|
+
background: transparent;
|
|
643
|
+
color: inherit;
|
|
644
|
+
font: inherit;
|
|
645
|
+
cursor: pointer;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
:where(.ink-command button:hover) {
|
|
649
|
+
background: color-mix(in srgb, var(--ink-fg) 8%, transparent);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
:where(.ink-command button:disabled, .ink-command button[aria-disabled='true']) {
|
|
653
|
+
opacity: 0.5;
|
|
654
|
+
cursor: default;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
:where(.ink-command button[aria-busy='true']) {
|
|
658
|
+
cursor: progress;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
:where(.ink-command button:focus-visible) {
|
|
662
|
+
outline: 2px solid var(--ink-ring);
|
|
663
|
+
outline-offset: 2px;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
:where(.ink-command-status) {
|
|
667
|
+
opacity: 0.75;
|
|
668
|
+
font-size: 0.875rem;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/*
|
|
672
|
+
* The find bar (createFindBar): floats over the top-right of the viewport root, which is
|
|
673
|
+
* what it positions against, so the pages do not move. Hidden while the search is closed.
|
|
674
|
+
*/
|
|
675
|
+
:where(.ink-find-bar) {
|
|
676
|
+
position: absolute;
|
|
677
|
+
top: 0.5rem;
|
|
678
|
+
right: 1.5rem;
|
|
679
|
+
z-index: 3;
|
|
680
|
+
box-sizing: border-box;
|
|
681
|
+
max-width: calc(100% - 2rem);
|
|
682
|
+
display: flex;
|
|
683
|
+
align-items: center;
|
|
684
|
+
gap: 0.25rem;
|
|
685
|
+
padding: 0.25rem;
|
|
686
|
+
border: 1px solid var(--ink-border);
|
|
687
|
+
border-radius: var(--ink-radius);
|
|
688
|
+
background: var(--ink-surface);
|
|
689
|
+
color: var(--ink-fg);
|
|
690
|
+
box-shadow: 0 4px 16px rgb(0 0 0 / 0.18);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
:where(.ink-find-bar[hidden]) {
|
|
694
|
+
display: none;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
:where(.ink-find-bar input) {
|
|
698
|
+
box-sizing: border-box;
|
|
699
|
+
flex: 1;
|
|
700
|
+
width: 14rem;
|
|
701
|
+
min-width: 0;
|
|
702
|
+
height: var(--ink-control-size, 2.25rem);
|
|
703
|
+
padding: 0 0.5rem;
|
|
704
|
+
border: 1px solid var(--ink-border);
|
|
705
|
+
border-radius: calc(var(--ink-radius) - 2px);
|
|
706
|
+
background: var(--ink-surface);
|
|
707
|
+
color: inherit;
|
|
708
|
+
font: inherit;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
:where(.ink-find-count) {
|
|
712
|
+
min-width: 4.5rem;
|
|
713
|
+
padding: 0 0.25rem;
|
|
714
|
+
color: var(--ink-muted-fg);
|
|
715
|
+
font-size: 0.875rem;
|
|
716
|
+
font-variant-numeric: tabular-nums;
|
|
717
|
+
white-space: nowrap;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
:where(.ink-find-bar button) {
|
|
721
|
+
display: inline-flex;
|
|
722
|
+
align-items: center;
|
|
723
|
+
justify-content: center;
|
|
724
|
+
min-width: var(--ink-control-size, 2.25rem);
|
|
725
|
+
height: var(--ink-control-size, 2.25rem);
|
|
726
|
+
padding: 0 0.5rem;
|
|
727
|
+
border: 1px solid transparent;
|
|
728
|
+
border-radius: calc(var(--ink-radius) - 2px);
|
|
729
|
+
background: transparent;
|
|
730
|
+
color: inherit;
|
|
731
|
+
font: inherit;
|
|
732
|
+
cursor: pointer;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
:where(.ink-find-bar button:hover) {
|
|
736
|
+
background: color-mix(in srgb, var(--ink-fg) 8%, transparent);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
:where(.ink-find-bar button[aria-pressed='true']) {
|
|
740
|
+
background: var(--ink-accent);
|
|
741
|
+
color: var(--ink-accent-fg);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
:where(.ink-find-bar input:focus-visible, .ink-find-bar button:focus-visible) {
|
|
745
|
+
outline: 2px solid var(--ink-ring);
|
|
746
|
+
outline-offset: 2px;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/* Text for assistive technology only, such as the find bar's live region. */
|
|
750
|
+
:where(.ink-visually-hidden) {
|
|
751
|
+
position: absolute;
|
|
752
|
+
width: 1px;
|
|
753
|
+
height: 1px;
|
|
754
|
+
margin: -1px;
|
|
755
|
+
padding: 0;
|
|
756
|
+
overflow: hidden;
|
|
757
|
+
clip-path: inset(50%);
|
|
758
|
+
white-space: nowrap;
|
|
759
|
+
border: 0;
|
|
760
|
+
}
|
|
761
|
+
|
|
592
762
|
:where(.ink-toolbar input) {
|
|
593
763
|
box-sizing: border-box;
|
|
594
764
|
height: var(--ink-control-size, 2.25rem);
|
|
@@ -1364,6 +1534,72 @@
|
|
|
1364
1534
|
color: var(--ink-accent-fg);
|
|
1365
1535
|
}
|
|
1366
1536
|
|
|
1537
|
+
/* Plugin cards: the card a plugin mark opens, a core popover like the thread's. */
|
|
1538
|
+
:where(.ink-card) {
|
|
1539
|
+
z-index: 50;
|
|
1540
|
+
width: 20rem;
|
|
1541
|
+
max-width: calc(100vw - 1rem);
|
|
1542
|
+
padding: 0.75rem;
|
|
1543
|
+
border: 1px solid var(--ink-border);
|
|
1544
|
+
border-radius: var(--ink-radius);
|
|
1545
|
+
background: var(--ink-surface);
|
|
1546
|
+
color: var(--ink-fg);
|
|
1547
|
+
box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
|
|
1548
|
+
font-size: 0.875rem;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
:where(.ink-card-title, .ink-card-meta, .ink-card-body) {
|
|
1552
|
+
margin: 0;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
:where(.ink-card-title) {
|
|
1556
|
+
font-weight: 600;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/* The meta line keeps the body colour for contrast; any colour of its own is the swatch. */
|
|
1560
|
+
:where(.ink-card-meta) {
|
|
1561
|
+
display: flex;
|
|
1562
|
+
align-items: center;
|
|
1563
|
+
gap: 0.375rem;
|
|
1564
|
+
margin-top: 0.125rem;
|
|
1565
|
+
font-size: 0.75rem;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
:where(.ink-card-swatch) {
|
|
1569
|
+
flex: none;
|
|
1570
|
+
width: 0.5rem;
|
|
1571
|
+
height: 0.5rem;
|
|
1572
|
+
border-radius: 50%;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
:where(.ink-card-body) {
|
|
1576
|
+
margin-top: 0.25rem;
|
|
1577
|
+
color: var(--ink-muted-fg);
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
:where(.ink-card-actions) {
|
|
1581
|
+
display: flex;
|
|
1582
|
+
gap: 0.375rem;
|
|
1583
|
+
margin-top: 0.5rem;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
:where(.ink-card-actions button) {
|
|
1587
|
+
padding: 0.375rem 0.75rem;
|
|
1588
|
+
border: 1px solid var(--ink-border);
|
|
1589
|
+
border-radius: calc(var(--ink-radius) - 2px);
|
|
1590
|
+
background: var(--ink-surface);
|
|
1591
|
+
color: inherit;
|
|
1592
|
+
font: inherit;
|
|
1593
|
+
cursor: pointer;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
/* The first action is the primary one. */
|
|
1597
|
+
:where(.ink-card-actions button:first-child) {
|
|
1598
|
+
border-color: var(--ink-accent);
|
|
1599
|
+
background: var(--ink-accent);
|
|
1600
|
+
color: var(--ink-accent-fg);
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1367
1603
|
:where(.ink-select-item:focus-visible) {
|
|
1368
1604
|
outline: none;
|
|
1369
1605
|
}
|
|
@@ -1379,7 +1615,8 @@
|
|
|
1379
1615
|
.ink-select-trigger:focus-visible,
|
|
1380
1616
|
.ink-toolbar input:focus-visible,
|
|
1381
1617
|
.ink-thread-actions button:focus-visible,
|
|
1382
|
-
.ink-thread-reply textarea:focus-visible
|
|
1618
|
+
.ink-thread-reply textarea:focus-visible,
|
|
1619
|
+
.ink-card-actions button:focus-visible
|
|
1383
1620
|
) {
|
|
1384
1621
|
outline: 2px solid var(--ink-ring);
|
|
1385
1622
|
outline-offset: 2px;
|