@kolkrabbi/kol-theme 0.141.0 → 0.142.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/kol-components-molecules.css +110 -0
- package/package.json +1 -1
|
@@ -1834,3 +1834,113 @@
|
|
|
1834
1834
|
color: var(--kol-tone-pressed-fg);
|
|
1835
1835
|
}
|
|
1836
1836
|
|
|
1837
|
+
|
|
1838
|
+
/* ─────────────────────────── DocsToc · rail ───────────────────────────
|
|
1839
|
+
* The fisheye rail render of `DocsToc` (`variant="rail"`, docstoc-rail-variant,
|
|
1840
|
+
* kol-client-olina 2026-09-03 — built and run there before filing).
|
|
1841
|
+
*
|
|
1842
|
+
* `--m` is the gaussian magnitude (0..1) the component writes per row on
|
|
1843
|
+
* pointer move; EVERY visual here derives from it, so the JS sets one number
|
|
1844
|
+
* per row and the cascade does the rest. This is CSS rather than utilities
|
|
1845
|
+
* because each rule reads a custom property through `calc()` and sets a
|
|
1846
|
+
* child's resting state from the row's variable — neither is expressible as a
|
|
1847
|
+
* Tailwind class, which is the §5 test for when a rule belongs in the theme.
|
|
1848
|
+
* ────────────────────────────────────────────────────────────────────── */
|
|
1849
|
+
|
|
1850
|
+
.kol-toc {
|
|
1851
|
+
position: fixed;
|
|
1852
|
+
top: 50%;
|
|
1853
|
+
transform: translateY(-50%);
|
|
1854
|
+
z-index: var(--kol-z-sticky);
|
|
1855
|
+
display: flex;
|
|
1856
|
+
flex-direction: column;
|
|
1857
|
+
padding-block: var(--kol-spacing-8);
|
|
1858
|
+
}
|
|
1859
|
+
/* The lens scales about the edge the rail is pinned to, so the column's outer
|
|
1860
|
+
* edge stays a straight line while the type breathes. The wide inner padding is
|
|
1861
|
+
* the lens's room to grow into without the labels colliding with the page. */
|
|
1862
|
+
.kol-toc--right {
|
|
1863
|
+
right: 0;
|
|
1864
|
+
align-items: flex-end;
|
|
1865
|
+
padding-right: var(--kol-spacing-6);
|
|
1866
|
+
padding-left: var(--kol-spacing-16);
|
|
1867
|
+
}
|
|
1868
|
+
.kol-toc--left {
|
|
1869
|
+
left: 0;
|
|
1870
|
+
align-items: flex-start;
|
|
1871
|
+
padding-left: var(--kol-spacing-6);
|
|
1872
|
+
padding-right: var(--kol-spacing-16);
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
.kol-toc-row {
|
|
1876
|
+
--m: 0;
|
|
1877
|
+
display: flex;
|
|
1878
|
+
align-items: center;
|
|
1879
|
+
gap: var(--kol-spacing-3);
|
|
1880
|
+
padding-block: 2px;
|
|
1881
|
+
text-decoration: none;
|
|
1882
|
+
}
|
|
1883
|
+
.kol-toc--right .kol-toc-row { justify-content: flex-end; }
|
|
1884
|
+
.kol-toc--left .kol-toc-row { flex-direction: row-reverse; justify-content: flex-end; }
|
|
1885
|
+
|
|
1886
|
+
/* Away from the pointer the row is small and quiet; under it, large and lit.
|
|
1887
|
+
* BOTH directions matter — grow-only reads as a bump, not a scrub. */
|
|
1888
|
+
.kol-toc-label {
|
|
1889
|
+
/* `transform` is ignored on a non-replaced INLINE element, and this label is
|
|
1890
|
+
* a bare <span>: the scale below did nothing at all until this line. It cost
|
|
1891
|
+
* the filer a round trip with the user — opacity and width worked and only
|
|
1892
|
+
* the scale did not. */
|
|
1893
|
+
display: inline-block;
|
|
1894
|
+
white-space: nowrap;
|
|
1895
|
+
opacity: calc(0.26 + 0.74 * var(--m));
|
|
1896
|
+
transform: scale(calc(0.78 + 0.42 * var(--m)));
|
|
1897
|
+
will-change: transform, opacity;
|
|
1898
|
+
}
|
|
1899
|
+
.kol-toc--right .kol-toc-label { transform-origin: right center; }
|
|
1900
|
+
.kol-toc--left .kol-toc-label { transform-origin: left center; }
|
|
1901
|
+
|
|
1902
|
+
.kol-toc-rule {
|
|
1903
|
+
height: 1px;
|
|
1904
|
+
background: var(--kol-fg-24);
|
|
1905
|
+
width: calc(8px + 26px * var(--m));
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
/* The section you are actually IN reads at rest — full ink and a size step — so
|
|
1909
|
+
* the column says where you are before the pointer arrives. It rests where an
|
|
1910
|
+
* inactive row lands only under the lens. */
|
|
1911
|
+
.kol-toc-row[data-active] .kol-toc-label {
|
|
1912
|
+
opacity: calc(0.92 + 0.08 * var(--m));
|
|
1913
|
+
transform: scale(calc(1 + 0.2 * var(--m)));
|
|
1914
|
+
color: var(--kol-fg-96);
|
|
1915
|
+
}
|
|
1916
|
+
.kol-toc-row[data-active] .kol-toc-rule {
|
|
1917
|
+
width: calc(22px + 26px * var(--m));
|
|
1918
|
+
background: var(--kol-fg-64);
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
/* Settle on leave — NEVER while the pointer is driving. A transition on a
|
|
1922
|
+
* continuous input lags behind the cursor and reads as sluggish; the component
|
|
1923
|
+
* stamps `data-live` on pointer-enter, which is what this selector reads. */
|
|
1924
|
+
.kol-toc:not([data-live]) .kol-toc-label,
|
|
1925
|
+
.kol-toc:not([data-live]) .kol-toc-rule {
|
|
1926
|
+
transition: opacity 260ms ease-out, transform 260ms ease-out, width 260ms ease-out;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
/* Graduations — the ruler between the labels. Shorter and fainter than a
|
|
1930
|
+
* heading's stroke at every point of the curve, so the labelled marks stay the
|
|
1931
|
+
* ones you read; they exist to give the lens something continuous to cross.
|
|
1932
|
+
* 3px pitch: ten between labels puts a section at ~52px, so a thirteen-section
|
|
1933
|
+
* page still stands inside a laptop viewport. */
|
|
1934
|
+
.kol-toc-tick { height: 3px; padding-block: 0; }
|
|
1935
|
+
.kol-toc-tick .kol-toc-rule {
|
|
1936
|
+
width: calc(5px + 11px * var(--m));
|
|
1937
|
+
background: var(--kol-fg-12);
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1941
|
+
.kol-toc-label { opacity: 1; transform: none; }
|
|
1942
|
+
.kol-toc-rule { width: 12px; }
|
|
1943
|
+
.kol-toc-row[data-active] .kol-toc-rule { width: 24px; }
|
|
1944
|
+
.kol-toc-tick .kol-toc-rule { width: 5px; }
|
|
1945
|
+
.kol-toc-label, .kol-toc-rule { transition: none; }
|
|
1946
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.142.0",
|
|
4
4
|
"description": "KOL (Kolkrabbi) design-system tokens + base CSS — brand-neutral. The canonical token/cascade layer every other KOL package and consumer builds on.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|