Repository navigation
Expand file tree
/
Copy pathnotionkit.css
More file actions
2423 lines (2262 loc) · 131 KB
/
Copy pathnotionkit.css
File metadata and controls
2423 lines (2262 loc) · 131 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* ============================================================
NOTIONKIT COMPONENT LIBRARY
Jungherz GmbH – v1.19.1
A pure CSS component library for calm, document-centric
workspace interfaces. No build step, no JavaScript, no
framework coupling.
Features:
- Scoped reset (no unprefixed global selectors)
- Light mode (default) + dark mode via [data-theme="dark"]
- ~130 components across app shell, page, database, forms,
overlays, collaboration and AI surfaces
- Editor adapter section for TipTap / BlockNote / Novel, sharing
its rules with .nk-prose for rendered text
============================================================ */
/* ============================================================
A NOTE ON THE TWO-BLOCK STRUCTURE
This file is physically split into two contiguous blocks:
BLOCK A – design tokens: :root { … } [data-theme="dark"] { … }
BLOCK B – components: everything else, no --nk-* declarations
build-styles-js.mjs slices the minified sheet at exactly those
two rule blocks and emits tokensCss / componentsCss separately.
The split is asserted at build time; if a --nk-* declaration
leaks into a component rule, or if the two token blocks stop
being adjacent, the build fails.
Why it matters: a shadow root that adopts the *whole* sheet
also adopts the token blocks, and inside that shadow root the
selectors match the element's own theme wrapper. Every token is
then re-declared locally — and a matching rule always beats an
inherited value, so a consumer's own `:root { --nk-accent: … }`
never arrives. Consumers that adopt only componentsCss keep
inheritance intact and put tokensCss on the document instead.
Practical consequences while editing this file:
- Never declare a --nk-* custom property outside BLOCK A.
- Never put a rule between the :root and [data-theme="dark"] blocks.
- Derive brand-dependent values with color-mix() from a token,
never from a hard-coded hex. Re-branding must stay reachable
from a handful of declarations.
============================================================ */
/* ============================================================
A NOTE ON THE ::slotted() PAIRS
Several rules are written twice, e.g.
.nk-tree-item .icon,
.nk-tree-item ::slotted(.icon) { … }
They are not redundant. When this sheet is adopted into a shadow
root — as NotionKit Elements will do — content passed in from the
outside stays in the light DOM and is therefore no descendant of
anything in the shadow tree. `.nk-tree-item .icon` cannot reach it;
only `::slotted()` can.
Do not "simplify" these away. In the document they match nothing,
so they cost nothing there.
Three limits worth knowing:
- ::slotted() only ever matches the assigned node itself. An icon
wrapped in a container — <span slot="icon"><em>📌</em></span> —
cannot be styled from inside the shadow root at all. Pass slotted
content directly.
- The descendant space is mandatory: `.nk-callout ::slotted(.c-icon)`,
never `.nk-callout::slotted(.c-icon)`. The compound before
::slotted selects the slot element inside the shadow tree.
- For slotted content the outer tree wins. A consumer's own document
rule takes precedence over ::slotted() from the shadow tree. That
is a feature, not a bug.
- Since 1.1.0 every part that NotionKit Elements exposes as a named
slot has a second twin keyed on the slot name, e.g.
`.nk-tree-item ::slotted([slot="icon"])`, so a consumer writes
<span slot="icon">📁</span> without repeating the internal class.
- Margin and padding in a twin are marked !important when the scoped
reset (0. above) also sets them – on buttons, headings, paragraphs.
The reset lives in the document tree, and for *normal* declarations
the outer tree beats ::slotted() from the shadow tree; for
!important ones the inner tree wins. Without the flag a slotted
<button> inside <nk-segmented> would render with the reset's
zero padding. Everything else in a twin stays overridable.
============================================================ */
/* ============================================================
0. SCOPED RESET
NotionKit never touches selectors it does not own (PRD 7.4).
Instead of `* { margin: 0 }` the reset reaches only elements that
carry an nk- class and plain content elements *inside* NotionKit
surfaces. Specificity is (0,1,0), the same as a single class, and
the reset is declared before every component rule — so component
rules at equal specificity win on source order.
============================================================ */
[class*="nk-"],
[class*="nk-"] *,
[class*="nk-"]::before,
[class*="nk-"]::after,
[class*="nk-"] *::before,
[class*="nk-"] *::after {
box-sizing: border-box;
}
[class*="nk-"] :where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre, ul, ol, li) {
margin: 0;
padding: 0;
}
[class*="nk-"] :where(ul, ol) {
list-style: none;
}
[class*="nk-"] :where(button, input, select, textarea, option, optgroup, fieldset, legend),
:where(button, input, select, textarea)[class*="nk-"] {
margin: 0;
padding: 0;
}
/* `hidden` hides. The attribute is only a user-agent rule, and every
component that sets its own display beat it: a hidden button, tag or
banner stayed on screen. !important gives the attribute its platform
meaning back, for nk- elements and for slotted nodes in a shadow root;
hidden="until-found" keeps the browser's own content-visibility. Two
rules, not one list: a browser that rejects ::slotted() outside a shadow
root would otherwise drop the document half with it. */
[class*="nk-"][hidden]:not([hidden="until-found" i]) { display: none !important; }
::slotted([hidden]:not([hidden="until-found" i])) { display: none !important; }
/* ============================================================
BLOCK A – DESIGN TOKENS
Everything below until the end of the [data-theme="dark"] block
is extracted verbatim by build-styles-js.mjs. Keep the two rule
blocks adjacent and free of anything else.
Re-branding needs one declaration: --nk-accent. Focus rings,
checked states, the selected model card and the primary button
are all mixed from it. --nk-danger and the three --nk-decor-*
values are the second tier, for destructive actions and for the
decorative avatar/cover gradients.
============================================================ */
:root {
/* Tells the browser which scheme its own widgets should use: date
and time pickers, number spinners, select popups, scrollbars and
autofill. Without it they render dark on a light page. */
color-scheme: light;
/* ---- Surfaces ----
Values follow Notion's 2025 light theme: a neutral sidebar grey, a
hover wash mixed from the text colour, and a filled input surface. */
--nk-bg: #ffffff;
--nk-bg-sidebar: #f9f8f7;
--nk-bg-hover: rgba(55,53,47,0.06);
--nk-bg-active: rgba(55,53,47,0.08);
--nk-bg-callout: #f0efed;
--nk-bg-code: #f7f6f3;
--nk-bg-card: #ffffff;
--nk-bg-input: rgba(242,241,238,0.6);
/* ---- Text ----
Opaque greys, not alpha: Notion moved from rgba(55,53,47,α) to fixed
values so text reads the same on white and on the sidebar. The
sidebar gets its own, darker step – that is where legibility was
lost most. */
--nk-text: #2c2c2b;
--nk-text-secondary: #7d7a75;
--nk-text-tertiary: #91918e;
--nk-text-sidebar: #5f5e5b;
/* ---- Borders ---- */
--nk-border: rgba(28,19,1,0.11);
--nk-border-strong: rgba(27,21,0,0.19);
/* ---- Accent & semantics ---- */
--nk-accent: #2383e2;
--nk-on-accent: #ffffff;
--nk-danger: #cd3c3a;
/* ---- Colour scale ----
Notion's nine hues in three roles. `tag`: the select-option pill –
a saturated fill with near-black text. `tint`: the soft block /
callout background, for banners and tracks, meant to sit under
the normal text colour. `color`: the mid-tone for coloured text
and marks – deltas, date mentions, progress fills. */
--nk-tag-gray-bg: #e3e2e0; --nk-tag-gray-text: #32302c;
--nk-tag-brown-bg: #eee0da; --nk-tag-brown-text: #442a1e;
--nk-tag-orange-bg: #fadec9; --nk-tag-orange-text: #49290e;
--nk-tag-yellow-bg: #fdecc8; --nk-tag-yellow-text: #402c1b;
--nk-tag-green-bg: #dbeddb; --nk-tag-green-text: #1c3829;
--nk-tag-blue-bg: #d3e5ef; --nk-tag-blue-text: #183347;
--nk-tag-purple-bg: #e8deee; --nk-tag-purple-text: #412454;
--nk-tag-pink-bg: #f5e0e9; --nk-tag-pink-text: #4c2337;
--nk-tag-red-bg: #ffe2dd; --nk-tag-red-text: #5d1715;
--nk-tint-gray: #f1f1ef; --nk-color-gray: #787774;
--nk-tint-brown: #f4eeee; --nk-color-brown: #9f6b53;
--nk-tint-orange: #fbecdd; --nk-color-orange: #d9730d;
--nk-tint-yellow: #fbf3db; --nk-color-yellow: #cb912f;
--nk-tint-green: #edf3ec; --nk-color-green: #448361;
--nk-tint-blue: #e7f3f8; --nk-color-blue: #337ea9;
--nk-tint-purple: #f8f3fc; --nk-color-purple: #9065b0;
--nk-tint-pink: #fcf1f6; --nk-color-pink: #c14c8a;
--nk-tint-red: #fdebec; --nk-color-red: #cd3c3a;
/* ---- Decorative ----
Avatar gradients and the page cover. Deliberately identical in
both themes: these are illustrative surfaces, not UI chrome. */
--nk-decor-purple: #9065b0;
--nk-decor-blue: #529cca;
--nk-decor-orange: #d9730d;
/* ---- Overlays ---- */
--nk-scrim: rgba(15,15,15,0.6);
--nk-scrim-soft: rgba(15,15,15,0.5);
/* ---- Metrics ---- */
--nk-sidebar-width: 260px;
--nk-peek-width: 560px;
--nk-page-full-max: none;
--nk-cover-height: 200px;
--nk-panel-cover-height: 64px;
--nk-tab-bar-height: 58px;
--nk-radius: 6px;
--nk-font: ui-sans-serif, -apple-system, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
--nk-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
/* ---- Shadows ----
--nk-shadow-btn is Notion's white button: a 1px inset ring plus a
1px drop, so the outline is drawn by the shadow, not by a border. */
--nk-shadow-menu: rgba(15,15,15,0.05) 0px 0px 0px 1px, rgba(15,15,15,0.1) 0px 3px 6px, rgba(15,15,15,0.2) 0px 9px 24px;
--nk-shadow-card: 0 1px 2px rgba(0,0,0,0.04);
--nk-shadow-btn: inset 0 0 0 1px rgba(15,15,15,0.1), 0 1px 2px rgba(15,15,15,0.1);
--nk-shadow-knob: 0 1px 2px rgba(0,0,0,0.2);
--nk-shadow-segment: 0 1px 2px rgba(0,0,0,0.08);
}
[data-theme="dark"] {
color-scheme: dark;
--nk-bg: #191919;
--nk-bg-sidebar: #202020;
--nk-bg-hover: rgba(255,255,255,0.055);
--nk-bg-active: rgba(255,255,255,0.08);
--nk-bg-callout: #252525;
--nk-bg-code: #202020;
--nk-bg-card: #202020;
--nk-bg-input: rgba(255,255,255,0.055);
--nk-text: rgba(255,255,255,0.81);
--nk-text-secondary: rgba(255,255,255,0.46);
--nk-text-tertiary: rgba(255,255,255,0.32);
--nk-text-sidebar: rgba(255,255,255,0.62);
--nk-border: rgba(255,255,255,0.094);
--nk-border-strong: rgba(255,255,255,0.16);
--nk-accent: #529CCA;
--nk-danger: #df5452;
--nk-tag-gray-bg: #373737; --nk-tag-gray-text: rgba(255,255,255,0.85);
--nk-tag-brown-bg: #603b2c; --nk-tag-brown-text: rgba(255,255,255,0.85);
--nk-tag-orange-bg: #854c1d; --nk-tag-orange-text: rgba(255,255,255,0.85);
--nk-tag-yellow-bg: #89632a; --nk-tag-yellow-text: rgba(255,255,255,0.85);
--nk-tag-green-bg: #2b593f; --nk-tag-green-text: rgba(255,255,255,0.85);
--nk-tag-blue-bg: #28456c; --nk-tag-blue-text: rgba(255,255,255,0.85);
--nk-tag-purple-bg: #492f64; --nk-tag-purple-text: rgba(255,255,255,0.85);
--nk-tag-pink-bg: #69314c; --nk-tag-pink-text: rgba(255,255,255,0.85);
--nk-tag-red-bg: #6e3630; --nk-tag-red-text: rgba(255,255,255,0.85);
--nk-tint-gray: #252525; --nk-color-gray: #9b9b9b;
--nk-tint-brown: #2e2724; --nk-color-brown: #ba856f;
--nk-tint-orange: #36291f; --nk-color-orange: #c77d48;
--nk-tint-yellow: #372e20; --nk-color-yellow: #ca8f3d;
--nk-tint-green: #242b26; --nk-color-green: #529e72;
--nk-tint-blue: #1f282d; --nk-color-blue: #5e87c9;
--nk-tint-purple: #2a2430; --nk-color-purple: #9d68d3;
--nk-tint-pink: #2e2328; --nk-color-pink: #d15796;
--nk-tint-red: #332523; --nk-color-red: #df5452;
--nk-shadow-menu: rgba(15,15,15,0.2) 0px 0px 0px 1px, rgba(15,15,15,0.4) 0px 3px 6px, rgba(15,15,15,0.6) 0px 9px 24px;
--nk-shadow-card: none;
--nk-shadow-btn: inset 0 0 0 1px rgba(255,255,255,0.1), 0 1px 2px rgba(0,0,0,0.3);
}
/* ============================================================
BLOCK B – COMPONENTS
No --nk-* declarations below this line. Grouped by PRD chapter 5.
============================================================ */
/* ============================================================
B0. DOCUMENT BASE (opt-in)
Applied by adding class="nk-body" to <body>. Kept opt-in so the
library never claims the page it is embedded in.
============================================================ */
.nk-body {
margin: 0;
min-height: 100vh;
min-height: 100dvh; /* iOS standalone PWAs count the status bar into 100vh */
font-family: var(--nk-font);
font-size: 14px;
background: var(--nk-bg);
color: var(--nk-text);
/* `auto`, as in Notion. `antialiased` thins every glyph on macOS and was
the single biggest reason text looked lighter than the original. */
-webkit-font-smoothing: auto;
transition: background .25s ease, color .25s ease;
}
/* ============================================================
B1. APP SHELL & LAYOUT (PRD 5.1)
============================================================ */
.nk-app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
/* ---- Sidebar ---- */
.nk-sidebar {
width: calc(var(--nk-sidebar-width) + env(safe-area-inset-left, 0px));
min-width: calc(var(--nk-sidebar-width) + env(safe-area-inset-left, 0px));
padding-left: env(safe-area-inset-left, 0px);
background: var(--nk-bg-sidebar);
display: flex; flex-direction: column;
border-right: 1px solid var(--nk-border);
transition: background .25s ease, margin-left .24s cubic-bezier(.2, .8, .25, 1);
}
.nk-workspace {
display: flex; align-items: center; gap: 8px;
padding: 10px 12px; margin: 6px 8px 2px;
border-radius: var(--nk-radius);
cursor: pointer; font-weight: 500;
user-select: none;
}
.nk-workspace:hover { background: var(--nk-bg-hover); }
.nk-workspace .avatar,
.nk-workspace ::slotted(.avatar),
.nk-workspace ::slotted([slot="avatar"]) {
width: 22px; height: 22px; border-radius: 4px;
background: linear-gradient(135deg, var(--nk-decor-purple), var(--nk-decor-blue));
color: var(--nk-on-accent); font-size: 11px; font-weight: 600;
display: flex; align-items: center; justify-content: center;
}
.nk-workspace .chev { margin-left: auto; color: var(--nk-text-tertiary); font-size: 11px; }
.nk-sidebar-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.nk-sidebar-scroll::-webkit-scrollbar { width: 8px; }
.nk-sidebar-scroll::-webkit-scrollbar-thumb { background: var(--nk-border-strong); border-radius: 4px; }
.nk-section-label {
font-size: 12px; font-weight: 500; letter-spacing: .01em;
color: var(--nk-text-tertiary);
padding: 14px 10px 4px;
display: flex; justify-content: space-between; align-items: center;
}
.nk-section-label .plus {
cursor: pointer; border-radius: 4px; padding: 0 4px; font-size: 13px;
opacity: 0; transition: opacity .15s;
}
.nk-section-label:hover .plus { opacity: 1; }
.nk-section-label .plus:hover { background: var(--nk-bg-hover); }
.nk-sidebar-footer {
padding: 8px; border-top: 1px solid var(--nk-border);
color: var(--nk-text-sidebar); font-size: 14px;
}
.nk-sidebar-footer .nk-tree-item { min-height: 26px; }
/* The drawer's scrim and the ☰ that opens it; both only act below 860px. */
.nk-sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 59; background: var(--nk-scrim-soft); }
.nk-sidebar-toggle { display: none; }
/* Collapsing on the desktop, Notion's «: .nk-sidebar.collapsed slides the
sidebar out to the left and the main column takes its width; hidden, it
takes no focus – it stays visible while it slides, and is back at once
when it expands. .nk-sidebar-toggle.collapsed shows the topbar's ☰ that
brings it back, on the desktop too. The « is .nk-sidebar-collapse in
.nk-sidebar-head beside the workspace row; it shows while the pointer is
over the sidebar. A phone keeps the drawer (B12). */
.nk-sidebar.collapsed {
margin-left: calc(0px - var(--nk-sidebar-width) - env(safe-area-inset-left, 0px)); visibility: hidden;
transition: background .25s ease, margin-left .24s cubic-bezier(.2, .8, .25, 1), visibility 0s linear .24s;
}
.nk-sidebar-toggle.collapsed { display: inline-flex; }
.nk-sidebar-head { display: flex; align-items: center; }
.nk-sidebar-head > .nk-workspace,
.nk-sidebar-head ::slotted(.nk-workspace) { flex: 1; min-width: 0; }
.nk-sidebar-collapse {
flex: none; display: inline-flex; align-items: center; justify-content: center;
width: 28px; height: 28px; margin: 4px 12px 0 -4px; padding: 0;
border: none; border-radius: var(--nk-radius); background: transparent;
color: var(--nk-text-tertiary); cursor: pointer; opacity: 0; transition: opacity .15s;
}
.nk-sidebar:hover .nk-sidebar-collapse,
.nk-sidebar-collapse:focus-visible { opacity: 1; }
.nk-sidebar-collapse:hover { background: var(--nk-bg-hover); color: var(--nk-text); }
.nk-sidebar-collapse svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* ---- Main / Topbar ---- */
.nk-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.nk-topbar {
height: 44px; display: flex; align-items: center;
padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
gap: 8px; flex-shrink: 0;
}
.nk-breadcrumb { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.nk-breadcrumb .crumb,
.nk-breadcrumb ::slotted(.crumb) {
padding: 2px 6px; border-radius: 4px; cursor: pointer;
color: var(--nk-text-sidebar);
display: flex; align-items: center; gap: 5px;
}
.nk-breadcrumb .crumb:hover { background: var(--nk-bg-hover); }
a.crumb { text-decoration: none; }
.nk-breadcrumb .crumb.current,
.nk-breadcrumb ::slotted(.crumb.current) { color: var(--nk-text); }
.nk-breadcrumb .sep { color: var(--nk-text-tertiary); font-size: 12px; }
.nk-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nk-topbar-btn {
padding: 4px 8px; border-radius: var(--nk-radius); cursor: pointer;
color: var(--nk-text-sidebar); font-size: 14px; user-select: none;
border: none; background: transparent; font-family: inherit;
}
.nk-topbar-btn:hover { background: var(--nk-bg-hover); }
.nk-topbar-btn svg,
.nk-topbar-btn ::slotted(svg) {
width: 16px; height: 16px; flex-shrink: 0;
fill: none; stroke: currentColor;
stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
/* Borderless since Notion's 2025 topbar: a plain word next to the icons. */
.nk-share-btn { font-size: 14px; padding: 4px 8px; }
/* Passive text among the actions – "Edited 2 min ago": tertiary, one line.
A phone drops it (B12), as Notion's mobile topbar shows only the page and
what can be done with it. */
.nk-topbar-meta,
.nk-topbar-actions ::slotted(.nk-topbar-meta) { padding: 4px 8px; font-size: 12px; color: var(--nk-text-tertiary); white-space: nowrap; }
.nk-theme-toggle { font-size: 15px; width: 30px; height: 28px; padding: 0; }
/* ---- Tab bar (phones, installed PWAs) ----
A bottom row of up to five destinations, the thumb-reachable twin of the
sidebar the breakpoint hides. Last child of .nk-main it sits below the
scrolling page; in a document that scrolls itself it sticks to the
viewport bottom. Hidden above 860px; `always` shows it at every width
(previews, phone frames), `floating` turns it into a capsule.
No view-transition-name here: the bar stays put between pages. ---- */
.nk-tab-bar {
display: none; flex: none; align-items: stretch; gap: 2px;
position: sticky; bottom: 0; z-index: 30;
/* Safe areas: the bottom inset replaces the 6px padding rather than
adding to it – the labels end where iOS ends its own tab bar, right
above the home indicator. Left/right cover the Dynamic Island in
landscape; the background still runs edge to edge. */
box-sizing: border-box; height: calc(var(--nk-tab-bar-height) - 6px + max(6px, env(safe-area-inset-bottom, 0px)));
padding: 6px max(4px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
background: var(--nk-bg-sidebar);
border-top: 1px solid var(--nk-border);
}
.nk-tab-bar.always { display: flex; }
/* `fixed`: pinned to the viewport instead of sitting in the column – for
standalone PWAs where the shell and the screen disagree. The spacer that
follows it keeps the same height in the flow, so the page still ends
above the bar. */
.nk-tab-bar.fixed { position: fixed; left: 0; right: 0; bottom: 0; }
.nk-tab-bar-spacer { display: none; flex: none; height: calc(var(--nk-tab-bar-height) - 6px + max(6px, env(safe-area-inset-bottom, 0px))); }
.nk-tab-bar.always.fixed + .nk-tab-bar-spacer { display: block; }
.nk-tab-bar.floating {
position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
bottom: calc(12px + env(safe-area-inset-bottom, 0px));
height: var(--nk-tab-bar-height);
padding: 6px; border: 1px solid var(--nk-border); border-radius: 16px;
box-shadow: var(--nk-shadow-menu);
}
.nk-tab-bar-item {
flex: 1 1 0; min-width: 0;
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
padding: 4px 2px; border: none; border-radius: var(--nk-radius);
background: transparent; font-family: inherit; font-size: 10.5px; line-height: 1.2;
color: var(--nk-text-secondary); text-decoration: none;
cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.nk-tab-bar-item:hover { color: var(--nk-text); background: var(--nk-bg-hover); }
.nk-tab-bar-item.active { color: var(--nk-accent); }
.nk-tab-bar-item:disabled { opacity: .5; cursor: not-allowed; }
.nk-tab-bar-item .icon,
.nk-tab-bar-item ::slotted([slot="icon"]) { font-size: 20px; line-height: 1; }
.nk-tab-bar-item .label,
.nk-tab-bar-item ::slotted(.label) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ============================================================
B2. NAVIGATION / PAGE TREE (PRD 5.2)
============================================================ */
.nk-tree-item {
display: flex; align-items: center; gap: 6px;
padding: 3px 8px 3px 10px;
border-radius: var(--nk-radius);
cursor: pointer; user-select: none;
color: var(--nk-text-sidebar);
position: relative;
/* 28px; 40px inside a sheet, which sets --_nk-row. A private, inherited
value rather than a descendant rule, so it also reaches rows that sit
in shadow roots of their own (NotionKit Elements). Not a token. */
min-height: var(--_nk-row, 28px);
}
.nk-tree-item:hover { background: var(--nk-bg-hover); }
.nk-tree-item.active { background: var(--nk-bg-active); color: var(--nk-text); font-weight: 500; }
/* Explicit form of the footer / settings-nav row height, for a row that is
not a descendant of those containers (a web component's shadow tree). */
.nk-tree-item.compact { min-height: 26px; }
.nk-tree-item .icon,
.nk-tree-item ::slotted(.icon),
.nk-tree-item ::slotted([slot="icon"]) { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nk-tree-item .label,
.nk-tree-item ::slotted(.label) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-tree-item .actions {
margin-left: auto; display: none; gap: 2px; color: var(--nk-text-tertiary);
}
.nk-tree-item:hover .actions { display: flex; }
.nk-tree-item .actions span { padding: 0 3px; border-radius: 3px; font-size: 12px; }
.nk-tree-item .actions span:hover { background: var(--nk-bg-active); }
.nk-tree-children { margin-left: 14px; border-left: 1px solid var(--nk-border); padding-left: 4px; overflow: hidden; }
.nk-tree-children.collapsed { display: none; }
.nk-toggle-arrow {
width: 16px; height: 16px; flex-shrink: 0;
display: inline-flex; align-items: center; justify-content: center;
font-size: 9px; color: var(--nk-text-tertiary);
border-radius: 3px; transition: transform .15s;
}
.nk-toggle-arrow.open { transform: rotate(90deg); }
.nk-kbd-hint { margin-left: auto; display: flex; gap: 3px; align-items: center; }
.nk-kbd {
font-family: inherit; font-size: 10.5px; background: var(--nk-bg-callout);
border: 1px solid var(--nk-border-strong); border-bottom-width: 2px;
border-radius: 4px; padding: 0 4px;
}
/* ============================================================
B3. PAGE SHELL & DOCUMENT (PRD 5.3)
============================================================ */
.nk-page-scroll { flex: 1; overflow-y: auto; }
.nk-page-scroll::-webkit-scrollbar { width: 10px; }
.nk-page-scroll::-webkit-scrollbar-thumb { background: var(--nk-border-strong); border-radius: 5px; border: 2px solid var(--nk-bg); }
/* The band's height is the token --nk-cover-height (200px), set on :root or
on one cover – Notion's own takes about 30vh, clamp(200px, 30vh, 300px)
comes close. */
.nk-cover {
height: var(--nk-cover-height);
background:
radial-gradient(ellipse at 20% 40%, color-mix(in srgb, var(--nk-decor-purple) 35%, transparent), transparent 55%),
radial-gradient(ellipse at 80% 20%, color-mix(in srgb, var(--nk-decor-blue) 35%, transparent), transparent 55%),
radial-gradient(ellipse at 60% 90%, color-mix(in srgb, var(--nk-decor-orange) 25%, transparent), transparent 55%),
var(--nk-bg-callout);
}
/* A picture instead of the gradient: an <img> inside fills the band and is
cropped, never stretched; object-position moves the crop, as Notion's
"Reposition" does. The gradient stays underneath while it loads. */
.nk-cover > img,
.nk-cover ::slotted(img) { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Document text is 16px/1.5, one step above the 14px UI chrome – Notion's
own split between page and app. Tables, tags and controls keep 14px. */
.nk-page { max-width: 760px; margin: 0 auto; padding: 24px max(64px, env(safe-area-inset-right, 0px)) 120px max(64px, env(safe-area-inset-left, 0px)); font-size: 16px; line-height: 1.5; }
/* Page options, as in Notion's page menu, set per page and not per app:
`full` lifts the 760px cap so the column fills the window – up to
--nk-page-full-max, none by default: a dashboard of tables may want more
than 760px but no 1600px lines – and `small` sets the document text one
step down to 14px. Heading, lead, prose and editor are sized in em and
follow; title, properties, tables and controls keep their size. */
.nk-page.full { max-width: var(--nk-page-full-max); }
.nk-page.small { font-size: 14px; }
/* With a cover the icon overlaps its bottom edge and the page needs no top
padding; without a cover it sits inside the padding, fully visible even in
a scroll container. A cover without an icon keeps the padding, so the
title never touches the picture – Notion leaves room there too. Class
markup: the cover is the page's previous sibling and the icon its first
child. Elements: <nk-page> sets `covered` on the page box when both are
there. */
.nk-cover + .nk-page:has(> .nk-page-icon:not([hidden])),
.nk-page.covered { padding-top: 0; }
.nk-page-icon,
.nk-page ::slotted(.nk-page-icon),
.nk-page ::slotted([slot="icon"]) {
font-size: 64px; line-height: 1; margin-top: 0;
cursor: pointer; user-select: none;
display: inline-block;
}
.nk-cover + .nk-page .nk-page-icon,
.nk-cover + .nk-page ::slotted(.nk-page-icon),
.nk-cover + .nk-page ::slotted([slot="icon"]),
.nk-page.covered .nk-page-icon,
.nk-page.covered ::slotted(.nk-page-icon),
.nk-page.covered ::slotted([slot="icon"]) { margin-top: -42px; }
.nk-page-title {
font-size: var(--_nk-title, 40px); font-weight: 700; line-height: 1.2; margin: 8px 0 4px;
outline: none; letter-spacing: 0;
}
.nk-page-meta {
color: var(--nk-text-tertiary); font-size: 13px; margin-bottom: 24px;
display: flex; gap: 16px;
}
/* Page properties, as Notion lists them under the title of a database page:
one row each, the name in a 160px column with its type icon, the value
beside it. Both halves take the hover wash, as each opens its own editor
in Notion. Takes the place of .nk-page-meta on a page that is a row.
The value keeps at least 220px: in a column narrower than 380px – a side
panel, a third of the page – it moves under its name instead of breaking
an address into syllables. */
.nk-props { display: flex; flex-direction: column; margin: 0 0 var(--nk-block-space, 20px); font-size: 14px; line-height: 1.5; }
/* .flush: no outer margin – inside a panel, a cell or a flex column with a
gap of its own, where the margin meant for the flow under a title only
adds to their spacing. */
.nk-props.flush { margin: 0; }
.nk-prop { display: flex; flex-wrap: wrap; align-items: flex-start; min-width: 0; }
.nk-prop .p-name {
flex: 0 0 160px; min-width: 0; min-height: 34px; padding: 0 6px;
display: flex; align-items: center; gap: 6px; overflow: hidden;
border-radius: var(--nk-radius); color: var(--nk-text-secondary); white-space: nowrap; user-select: none;
}
.nk-prop .p-icon,
.nk-prop ::slotted([slot="icon"]) { width: 16px; flex-shrink: 0; text-align: center; font-size: 13px; }
.nk-prop .p-value {
flex: 1 1 220px; min-width: 0; min-height: 34px; padding: 5px 8px;
display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px;
border-radius: var(--nk-radius); overflow-wrap: anywhere;
}
/* .text: a value that is text – a sentence, an address, a model name with a
tag – flows and wraps as text instead of setting its parts one under the
other; tags and people keep the row of items. */
.nk-prop .p-value.text { display: block; align-content: center; }
.nk-prop .p-name:hover,
.nk-prop .p-value:hover { background: var(--nk-bg-hover); }
/* Lead and heading are sized in em, so `small` and a small parent carry
them along – 16px and 24px on a page, as before. */
.nk-page p.lead { font-size: 1em; line-height: 1.6; color: var(--nk-text-secondary); margin-bottom: 20px; }
.nk-page ::slotted(p.lead) { font-size: 1em; line-height: 1.6; color: var(--nk-text-secondary); margin-bottom: 20px !important; }
.nk-heading {
font-size: 1.5em; font-weight: 600; line-height: 1.3; margin: 32px 0 10px;
display: flex; align-items: center; gap: 8px;
}
/* ============================================================
B4. CONTENT ELEMENTS (PRD 5.4)
============================================================ */
/* A block's outer margin – callout, quote, code, divider, database, panels,
properties and the rest below – is meant for the flow of a page. A column
that spaces its children with a gap of its own sets --nk-block-space: 0
once, on the column, and every block inside drops it; `.flush` drops it on
one block. Headings keep theirs, they open a section. The property is no
token: unset, each block keeps its own margin. */
:is(.nk-props, .nk-callout, .nk-bookmark, .nk-toggle, .nk-divider, .nk-quote, .nk-code, .nk-database, .nk-danger-zone, .nk-gallery-grid,
.nk-template-btn, .nk-synced, .nk-banner, .nk-panels, .nk-skeleton, .nk-steps, .nk-comments, .nk-block-host, .nk-model-card,
.nk-ai-input-row).flush { margin-top: 0; margin-bottom: 0; }
.nk-callout {
display: flex; gap: 10px; align-items: flex-start;
background: var(--nk-bg-callout);
border-radius: var(--nk-radius);
padding: 16px 16px 16px 12px; margin: var(--nk-block-space, 16px) 0;
line-height: 1.5;
}
.nk-callout .c-icon,
.nk-callout ::slotted(.c-icon),
.nk-callout ::slotted([slot="icon"]) { font-size: 17px; }
/* Bookmark, Notion's link block: title, two lines of description and the
address with its icon on the left, the page's preview image on the right
in a third, 240px at most – a 1200×630 og:image fits it nearly whole in
a page column and is cropped at the centre on a phone. The whole box is the
link. Without an image the text takes the width, without a description
the box gets lower. */
.nk-bookmark {
display: flex; min-width: 0; margin: var(--nk-block-space, 8px) 0; overflow: hidden;
border: 1px solid var(--nk-border); border-radius: var(--nk-radius);
color: var(--nk-text); text-decoration: none; transition: background .12s ease;
}
.nk-bookmark:hover { background: var(--nk-bg-hover); }
.nk-bookmark .bm-text { flex: 1 1 0; min-width: 0; padding: 12px 14px 14px; font-size: 14px; line-height: 20px; }
.nk-bookmark .bm-title { display: block; min-height: 24px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-bookmark .bm-desc {
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
max-height: 32px; font-size: 12px; line-height: 16px; color: var(--nk-text-secondary);
}
.nk-bookmark .bm-url { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; line-height: 16px; white-space: nowrap; }
.nk-bookmark .bm-url > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nk-bookmark .bm-favicon { flex: none; width: 16px; height: 16px; }
.nk-bookmark .bm-cover { position: relative; flex: 0 0 33%; max-width: 240px; }
.nk-bookmark .bm-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nk-todo { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; }
.nk-todo input[type="checkbox"] {
appearance: none; width: 16px; height: 16px; margin-top: 3px;
border: 1.4px solid var(--nk-border-strong); border-radius: 2px;
cursor: pointer; flex-shrink: 0; position: relative;
background: var(--nk-bg);
}
.nk-todo input[type="checkbox"]:checked { background: var(--nk-accent); border-color: var(--nk-accent); }
.nk-todo input[type="checkbox"]:checked::after {
content: "✓"; color: var(--nk-on-accent); font-size: 11px;
position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.nk-todo input:checked + span { text-decoration: line-through; color: var(--nk-text-tertiary); }
.nk-todo input:disabled { opacity: .5; cursor: not-allowed; }
/* The summary marker is a pseudo-element and therefore cannot be
reached on slotted content — <nk-toggle> must render its own
summary in the shadow tree rather than accept one via slot. */
.nk-toggle { margin: var(--nk-block-space, 6px) 0; }
.nk-toggle summary {
cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px;
padding: 4px 6px; border-radius: var(--nk-radius); font-weight: 500;
user-select: none;
}
.nk-toggle summary::-webkit-details-marker { display: none; }
.nk-toggle summary:hover { background: var(--nk-bg-hover); }
.nk-toggle summary::before {
content: "▸"; color: var(--nk-text-tertiary); font-size: 11px;
transition: transform .15s; display: inline-block;
}
.nk-toggle[open] summary::before { transform: rotate(90deg); }
.nk-toggle .toggle-body,
.nk-toggle ::slotted(.toggle-body) { padding: 4px 0 8px 26px; color: var(--nk-text-secondary); line-height: 1.55; }
.nk-divider { border: none; border-top: 1px solid var(--nk-border); margin: var(--nk-block-space, 24px) 0; }
.nk-quote {
border-left: 3px solid var(--nk-text); padding: 2px 0 2px 14px;
margin: var(--nk-block-space, 16px) 0; color: var(--nk-text-secondary);
line-height: 1.5;
}
.nk-quote .q-cite { display: block; margin-top: 6px; font-size: 12.5px; color: var(--nk-text-tertiary); }
/* ---- Inline ---- */
.nk-mention {
display: inline-flex; align-items: center; gap: 4px; padding: 0 4px;
border-radius: 4px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.nk-mention:hover { background: var(--nk-bg-hover); }
.nk-mention.person { color: var(--nk-text); }
.nk-mention.person .mini-avatar,
.nk-mention.person .nk-avatar,
.nk-mention.person ::slotted(.mini-avatar),
.nk-mention.person ::slotted([slot="avatar"]) {
width: 16px; height: 16px; border-radius: 50%; color: var(--nk-on-accent);
font-size: 8.5px; font-weight: 600;
display: inline-flex; align-items: center; justify-content: center;
}
.nk-mention.page { color: var(--nk-text-secondary); text-decoration: underline; text-decoration-color: var(--nk-border-strong); text-underline-offset: 2px; }
.nk-mention.date { color: var(--nk-color-orange); }
.nk-inline-code {
font-family: var(--nk-font-mono); font-size: 85%;
color: var(--nk-danger); background: color-mix(in srgb, var(--nk-danger) 8%, transparent);
border-radius: 4px; padding: 1px 5px;
}
.nk-code {
background: var(--nk-bg-code); border: 1px solid var(--nk-border);
border-radius: var(--nk-radius); padding: 20px 24px;
font-family: var(--nk-font-mono);
font-size: 13px; line-height: 1.6; margin: var(--nk-block-space, 14px) 0; overflow-x: auto;
color: var(--nk-text-secondary);
white-space: pre; position: relative;
}
.nk-code .lang {
position: absolute; top: 6px; right: 10px;
font-size: 11px; color: var(--nk-text-tertiary); font-family: var(--nk-font);
}
.nk-code .tag,
.nk-code ::slotted(.tag) { color: var(--nk-accent); }
.nk-code .attr,
.nk-code ::slotted(.attr) { color: var(--nk-color-orange); }
/* ============================================================
B5. DATABASE VIEWS (PRD 5.5)
============================================================ */
.nk-database { margin: var(--nk-block-space, 12px) 0 var(--nk-block-space, 8px); }
.nk-db-tabs {
display: flex; gap: 2px; align-items: center;
padding: 0 0 6px; margin-bottom: 0; font-size: 14px;
}
/* View tabs are pills since Notion's 2025 redesign: the current view sits on
the active wash, the others are plain words. No underline, no rule. */
.nk-db-tab {
padding: 4px 8px; cursor: pointer; color: var(--nk-text-secondary);
border-radius: var(--nk-radius); user-select: none; line-height: 20px;
display: flex; align-items: center; gap: 6px;
/* A tab keeps its one line: in a scrolling strip it must not shrink and wrap. */
flex-shrink: 0; white-space: nowrap;
}
.nk-db-tab:hover { color: var(--nk-text); background: var(--nk-bg-hover); }
.nk-db-tab.active { color: var(--nk-text); background: var(--nk-bg-active); font-weight: 500; }
/* The quiet + that adds a view. */
.nk-db-tab.add { color: var(--nk-text-tertiary); }
.nk-db-tab .badge,
.nk-db-tab ::slotted(.badge) {
background: var(--nk-bg-callout); border-radius: 8px;
font-size: 11px; padding: 0 6px; color: var(--nk-text-tertiary);
}
/* The database header as Notion lays it out: the view tabs on the left, the
view's tools on the right – Filter, Sort, search and "New". A tool that
is in effect, a set filter, takes the accent. When the row gets narrow
the tabs scroll sideways and the tools keep their place. */
.nk-db-toolbar { display: flex; align-items: center; gap: 8px; min-width: 0; padding-bottom: 6px; }
.nk-db-toolbar > .nk-db-tabs { flex: 1 1 auto; min-width: 0; padding-bottom: 0; overflow-x: auto; scrollbar-width: none; }
.nk-db-toolbar > .nk-db-tabs::-webkit-scrollbar { display: none; }
.nk-db-toolbar .tools { flex: none; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nk-db-tool {
display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px;
border: none; border-radius: var(--nk-radius); background: transparent;
font-family: inherit; font-size: 14px; color: var(--nk-text-secondary);
white-space: nowrap; cursor: pointer; user-select: none;
}
.nk-db-tool:hover { background: var(--nk-bg-hover); color: var(--nk-text); }
.nk-db-tool.active { color: var(--nk-accent); }
/* The filters in effect, as pills under the toolbar – Notion's
"Status: Open ▾". A set filter takes an accent tint; `.add` is the quiet
"+ Filter" at the end. The pill is one button, or a box holding the
label button and a `.fp-remove` × when a filter can be removed in place. */
.nk-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; }
.nk-filter-pill {
display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
border: 1px solid var(--nk-border-strong); border-radius: 12px; background: transparent;
font-family: inherit; font-size: 13px; line-height: 1; color: var(--nk-text-secondary);
white-space: nowrap; cursor: pointer; user-select: none;
}
.nk-filter-pill:hover { background: var(--nk-bg-hover); }
.nk-filter-pill.active {
color: var(--nk-accent); border-color: color-mix(in srgb, var(--nk-accent) 35%, transparent);
background: color-mix(in srgb, var(--nk-accent) 6%, transparent);
}
.nk-filter-pill.add { border-color: transparent; color: var(--nk-text-tertiary); }
.nk-filter-pill.add:hover { color: var(--nk-text-secondary); }
.nk-filter-pill button { padding: 0; border: none; background: none; font: inherit; color: inherit; cursor: pointer; }
.nk-filter-pill .fp-remove {
display: inline-flex; align-items: center; justify-content: center;
width: 16px; height: 16px; margin-right: -4px; border-radius: 50%; font-size: 13px;
}
.nk-filter-pill .fp-remove:hover { background: color-mix(in srgb, currentColor 15%, transparent); }
/* Horizontal scrolling instead of breaking — the mobile contract for
wide tables (PRD 6.3a.4). */
.nk-table-wrap { overflow-x: auto; }
.nk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
/* 36px rows, 14px throughout, hairlines between columns as well as rows –
measured on a live Notion table. Cells stay on one line; `.wrap` on the
table or on a cell lets text break, as Notion's "wrap column" does. */
.nk-table th {
text-align: left; font-weight: 400; color: var(--nk-text-secondary);
height: 36px; padding: 0 8px; border-bottom: 1px solid var(--nk-border);
border-right: 1px solid var(--nk-border);
font-size: 14px; white-space: nowrap; user-select: none; cursor: pointer;
}
.nk-table th:hover { background: var(--nk-bg-hover); }
.nk-table th .th-icon,
.nk-table th ::slotted(.th-icon) { margin-right: 6px; font-size: 13px; color: var(--nk-text-tertiary); }
.nk-table td {
height: 36px; padding: 6px 8px; line-height: 1.5;
border-bottom: 1px solid var(--nk-border); border-right: 1px solid var(--nk-border);
white-space: nowrap; vertical-align: middle;
}
.nk-table th:last-child, .nk-table td:last-child { border-right: none; }
.nk-table.wrap td, .nk-table td.wrap { white-space: normal; vertical-align: top; }
.nk-table tbody tr:hover { background: var(--nk-bg-hover); }
.nk-table .row-title { display: flex; align-items: center; gap: 7px; font-weight: 500; cursor: pointer; }
.nk-table .row-title:hover { text-decoration: underline; text-decoration-color: var(--nk-text-tertiary); }
.nk-table .date-cell { color: var(--nk-text-secondary); }
/* Numbers stand right-aligned in figures of equal width, as Notion sets a
number property; its header stays left like every other. */
.nk-table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* Actions for a row – “Retry”, “Discard” – as small buttons at the right
edge of their cell; the header of that column sorts nothing. */
.nk-table .row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.nk-table th.actions { cursor: default; }
.nk-table th.actions:hover { background: none; }
/* A text cell with a tone and a second line: .td-text takes one of Notion's
nine text colours – an error in orange – and .td-desc sets a quiet line
under the value – the next run under an error, the sender under a
subject. The row grows with it. */
.nk-table .td-desc { display: block; font-size: 12px; line-height: 16px; color: var(--nk-text-tertiary); }
.nk-table .td-text.gray { color: var(--nk-color-gray); }
.nk-table .td-text.brown { color: var(--nk-color-brown); }
.nk-table .td-text.orange { color: var(--nk-color-orange); }
.nk-table .td-text.yellow { color: var(--nk-color-yellow); }
.nk-table .td-text.green { color: var(--nk-color-green); }
.nk-table .td-text.blue { color: var(--nk-color-blue); }
.nk-table .td-text.purple { color: var(--nk-color-purple); }
.nk-table .td-text.pink { color: var(--nk-color-pink); }
.nk-table .td-text.red { color: var(--nk-color-red); }
.nk-table .person-cell { display: flex; align-items: center; gap: 6px; color: var(--nk-text-secondary); }
.nk-table .person-cell .mini-avatar,
.nk-table .person-cell ::slotted(.mini-avatar) {
width: 20px; height: 20px; border-radius: 50%;
font-size: 10px; color: var(--nk-on-accent); display: inline-flex;
align-items: center; justify-content: center; font-weight: 600;
}
.nk-new-row,
.nk-table .new-row {
color: var(--nk-text-tertiary); cursor: pointer; padding: 8px;
display: flex; align-items: center; gap: 7px; font-size: 14px;
}
.nk-new-row:hover,
.nk-table .new-row:hover { background: var(--nk-bg-hover); }
/* The select option as Notion draws it: 20px tall, 3px corners, the cell's
14px, dark text on a saturated fill. Without a colour it is the grey tag. */
.nk-tag {
display: inline-flex; align-items: center; max-width: 100%;
height: 20px; padding: 0 6px; border-radius: 3px;
font-size: 14px; font-weight: 400; line-height: 20px; white-space: nowrap;
overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
background: var(--nk-tag-gray-bg); color: var(--nk-tag-gray-text);
}
.nk-tag.gray { background: var(--nk-tag-gray-bg); color: var(--nk-tag-gray-text); }
.nk-tag.brown { background: var(--nk-tag-brown-bg); color: var(--nk-tag-brown-text); }
.nk-tag.orange { background: var(--nk-tag-orange-bg); color: var(--nk-tag-orange-text); }
.nk-tag.yellow { background: var(--nk-tag-yellow-bg); color: var(--nk-tag-yellow-text); }
.nk-tag.green { background: var(--nk-tag-green-bg); color: var(--nk-tag-green-text); }
.nk-tag.blue { background: var(--nk-tag-blue-bg); color: var(--nk-tag-blue-text); }
.nk-tag.purple { background: var(--nk-tag-purple-bg); color: var(--nk-tag-purple-text); }
.nk-tag.pink { background: var(--nk-tag-pink-bg); color: var(--nk-tag-pink-text); }
.nk-tag.red { background: var(--nk-tag-red-bg); color: var(--nk-tag-red-text); }
.nk-progress {
width: 110px; height: 6px; border-radius: 3px;
background: var(--nk-tint-blue); overflow: hidden; display: inline-block;
}
.nk-progress > i { display: block; height: 100%; background: var(--nk-color-blue); border-radius: 3px; }
/* `wide` fills its row – a property value, a panel, a course overview. In
a flex row it grows from 60px, so the label keeps its place beside it
instead of wrapping below; elsewhere it is simply 100% wide. */
/* In a flex column – a panel – the 60px basis would become the bar's height;
max-height keeps it a bar. */
.nk-progress.wide { width: 100%; flex: 1 1 60px; max-height: 6px; }
.nk-progress-label { font-size: 12px; color: var(--nk-text-tertiary); margin-left: 7px; white-space: nowrap; }
/* A bar and its label as one row: in a flex column – a panel – the two would
stand one under the other. The label sits beside the bar, on its middle;
a wide row fills its line like the wide bar, and max-height keeps it from
growing in a column the way the bar's 60px basis once did.
<nk-progress label> renders one. */
.nk-progress-row { display: inline-flex; align-items: center; max-width: 100%; vertical-align: middle; }
.nk-progress-row:has(> .nk-progress.wide) { display: flex; flex: 1 1 60px; width: 100%; max-height: max-content; }
/* List view: one line per row – icon, title, a few properties on the right –
as a Notion database shows it under "List". Hairlines between rows and
the hover wash across the row, like a table without columns. The title
gives way first and ends in an ellipsis; the properties keep their place. */
.nk-list { display: flex; flex-direction: column; font-size: 14px; }
.nk-list-item {
display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden;
min-height: 36px; padding: 4px 6px; border-bottom: 1px solid var(--nk-border);
color: inherit; text-decoration: none; cursor: pointer;
}
.nk-list-item:hover { background: var(--nk-bg-hover); }
/* .static: a row that is no target itself – a file with its own Remove
button – takes neither the hand nor the hover wash. */
.nk-list-item.static { cursor: default; }
.nk-list-item.static:hover { background: none; }
.nk-list > .nk-list-item:last-child,
.nk-list ::slotted(.nk-list-item:last-child),
.nk-list-item.last { border-bottom: none; }
.nk-list-item .l-icon,
.nk-list-item ::slotted([slot="icon"]) { width: 20px; flex-shrink: 0; text-align: center; font-size: 15px; }
.nk-list-item .l-title,
.nk-list-item ::slotted(.l-title) { flex: 1 1 auto; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-list-item .l-meta,
.nk-list-item ::slotted(.l-meta) { flex: none; display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; color: var(--nk-text-secondary); white-space: nowrap; }
/* Calendar view, the database as Notion's month: a head with the month and
the date picker's .cal-nav buttons (Today, ‹ ›), the weekdays, and a cell per day
with its number top right – today's on a red pill – and the rows due that
day as small cards (.cv-item). Days of the next and previous month
(`.out`) and days not worked (`.off`) are washed. `weeks` adds a column of
ISO calendar weeks. The cells share the width, so seven always fit. */
.nk-calendar-view { font-size: 14px; }
.nk-calendar-view .cv-head { display: flex; align-items: center; gap: 4px; padding: 2px 0 8px; }
.nk-calendar-view .cv-title { flex: 1; font-weight: 600; white-space: nowrap; }
.nk-calendar-view .cv-grid {