@crystal-ui/core 2.6.0 → 2.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/assets/crystal.css +225 -1
- package/docs/catalogue.md +5 -5
- package/docs/components.md +19 -0
- package/package.json +1 -1
- package/tokens/catalogue.json +24 -10
- package/tokens/surface-recipes.json +1154 -76
- package/tokens/surfaces.json +10 -9
package/assets/crystal.css
CHANGED
|
@@ -66,6 +66,8 @@
|
|
|
66
66
|
[data-effects=opaque] :is(.cr-resin,.cr-glass)::before,[data-effects=opaque] :is(.cr-resin,.cr-glass)::after{display:none}
|
|
67
67
|
@media(prefers-reduced-transparency:reduce){:is(.cr-resin,.cr-glass)::before,:is(.cr-resin,.cr-glass)::after{display:none}}
|
|
68
68
|
@media(forced-colors:active){:is(.cr-resin,.cr-glass)::before,:is(.cr-resin,.cr-glass)::after{display:none}}
|
|
69
|
+
/* The Resin divider (2.7.0) is a line the pointer holds; in forced colours it is drawn in CanvasText, not erased to Canvas. */
|
|
70
|
+
@media(forced-colors:active){:is(.cr-resin,.cr-glass).divider{background:CanvasText!important}}
|
|
69
71
|
|
|
70
72
|
/* The host supplies activation state; this primitive never samples the desktop. */
|
|
71
73
|
:is(.cr-plastic,.cr-foundation)[data-window-active="false"]{background-color:var(--cr-plastic-inactive);background-image:none}
|
|
@@ -300,6 +302,9 @@ dialog.cr-dialog{position:fixed}
|
|
|
300
302
|
.cr-dialog::backdrop,.cr-mirage{background:var(--cr-mirage-fallback-fill);-webkit-backdrop-filter:none;backdrop-filter:none}
|
|
301
303
|
}
|
|
302
304
|
|
|
305
|
+
/* The opaque setting is a request for no translucency, and a scrim is the largest translucent area on screen:
|
|
306
|
+
it takes the same flat fill as reduced transparency (2.7.0). */
|
|
307
|
+
[data-effects=opaque] .cr-mirage,[data-effects=opaque] .cr-dialog::backdrop{background:var(--cr-mirage-fallback-fill);-webkit-backdrop-filter:none;backdrop-filter:none}
|
|
303
308
|
/* Mirage draws its chroma from the actual backdrop, never an invented overlay gradient. */
|
|
304
309
|
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
|
|
305
310
|
.cr-dialog::backdrop,.cr-mirage{background:var(--cr-mirage-fallback-fill)}
|
|
@@ -392,7 +397,12 @@ dialog.cr-dialog{position:fixed}
|
|
|
392
397
|
.cr-field-shell :focus-visible {
|
|
393
398
|
outline: 0;
|
|
394
399
|
}
|
|
395
|
-
|
|
400
|
+
/* The three recipes that take the coat off a control (a bare control, a
|
|
401
|
+
navigation entry and a drag handle) have no coat to make opaque. `:where()`
|
|
402
|
+
keeps this rule's specificity at (0,2,1); without the exclusion it outranked
|
|
403
|
+
their (0,2,0) recipes and drew the surface behind them, and the shorthand
|
|
404
|
+
erased the drag handle's grip (fixed in 2.7.0). */
|
|
405
|
+
[data-effects=opaque] :is(button,a.cr-button,.cr-control,.cr-field-shell,.cr-resin-haze,.cr-status):where(:not(.cr-bare,.cr-nav-item,.cr-drag-handle)) {
|
|
396
406
|
background: var(--cr-surface);
|
|
397
407
|
-webkit-backdrop-filter: none;
|
|
398
408
|
backdrop-filter: none;
|
|
@@ -1230,6 +1240,7 @@ span.cr-status>span {
|
|
|
1230
1240
|
content: none;
|
|
1231
1241
|
display: none;
|
|
1232
1242
|
}
|
|
1243
|
+
|
|
1233
1244
|
/* Resting state only: focus is a box-shadow recipe, and a blanket `none`
|
|
1234
1245
|
would silently reduce it to a bare outline. */
|
|
1235
1246
|
.cr-bare:not(:focus-visible) {
|
|
@@ -1832,6 +1843,219 @@ dialog.cr-dialog:has(> .cr-dialog-body):not([open]) {
|
|
|
1832
1843
|
box-shadow: none;
|
|
1833
1844
|
}
|
|
1834
1845
|
}
|
|
1846
|
+
/* ---------------------------------------------------------------------------
|
|
1847
|
+
Material variants, 2.7.0 (R-28, proposals/2026-11-16-library-material-
|
|
1848
|
+
upstream.md).
|
|
1849
|
+
|
|
1850
|
+
A platform library that needed a surface Crystal had not published wrote it
|
|
1851
|
+
by hand: a Haze fill inset inside a card, a Frost pane without its grain, a
|
|
1852
|
+
Resin handle with no rim. Ruled 16 November 2026, those are corrections the
|
|
1853
|
+
standard takes in, not add-ons, and where a library's surface had drifted
|
|
1854
|
+
from the base recipe the drift is published here as a named variant rather
|
|
1855
|
+
than left in the library. Each variant states only what differs from the
|
|
1856
|
+
surface it modifies, so the base recipe's fallbacks still apply to
|
|
1857
|
+
everything it does not restate, and each variant that restates a fill or a
|
|
1858
|
+
border restates its own reduced-transparency, opaque, no-backdrop and
|
|
1859
|
+
forced-colours routes.
|
|
1860
|
+
|
|
1861
|
+
Selector note: every variant is the surface compound plus one class,
|
|
1862
|
+
`:is(.cr-haze,.cr-surface).flat`, specificity (0,2,0), authored in this
|
|
1863
|
+
layer. That beats the Resin coat `:is(button, …)` (0,1,1) on the
|
|
1864
|
+
properties a variant states, so a `<button>` that wears a variant gets the
|
|
1865
|
+
variant's fill and border, and keeps the coat's pseudo-layers unless the
|
|
1866
|
+
variant says otherwise. A control that must lose the whole coat wears
|
|
1867
|
+
`.cr-bare` as well.
|
|
1868
|
+
|
|
1869
|
+
Supported compositions: `.cr-haze.flat.sunken`, `.cr-frost.pane.flat`,
|
|
1870
|
+
`.cr-frost.docked.flat`, `.cr-frost.sheet.flat`.
|
|
1871
|
+
Other pairs compose by property but are not part of the contract.
|
|
1872
|
+
--------------------------------------------------------------------------- */
|
|
1873
|
+
|
|
1874
|
+
/* Haze, inset. A reading card: the feathered fill stops `--cr-haze-inset` (8px)
|
|
1875
|
+
short of the box, so content padding is measured from the fill and the card
|
|
1876
|
+
has no border box of its own. No shadow under the fill: an inset card sits
|
|
1877
|
+
in a page, it does not float over it. Alerts, empty states, results,
|
|
1878
|
+
product and cart cards, reviews, summaries, a chart's plot. */
|
|
1879
|
+
:is(.cr-haze,.cr-surface).inset {
|
|
1880
|
+
border: 0;
|
|
1881
|
+
}
|
|
1882
|
+
:is(.cr-haze,.cr-surface).inset::before {
|
|
1883
|
+
inset: var(--cr-haze-inset);
|
|
1884
|
+
box-shadow: none;
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
/* Haze, flush. The same card filled to its own edge, for a tile whose content
|
|
1888
|
+
is the card: a gallery thumbnail, a carousel slide, an organisation chart's
|
|
1889
|
+
node, a swatch. */
|
|
1890
|
+
:is(.cr-haze,.cr-surface).flush {
|
|
1891
|
+
border: 0;
|
|
1892
|
+
}
|
|
1893
|
+
:is(.cr-haze,.cr-surface).flush::before {
|
|
1894
|
+
inset: 0;
|
|
1895
|
+
box-shadow: none;
|
|
1896
|
+
}
|
|
1897
|
+
@media (forced-colors:active) {
|
|
1898
|
+
:is(.cr-haze,.cr-surface):is(.inset,.flush) {
|
|
1899
|
+
border: 1px solid CanvasText;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
/* Haze, flat. The fill on the element itself, with no feather and no layer:
|
|
1904
|
+
a row in a list or an accordion, a placeholder. A row is one of many and is
|
|
1905
|
+
drawn edge to edge against its neighbours, so a feathered perimeter would
|
|
1906
|
+
blur the seams. `.sunken` is the flat fill recessed: where the fill gives way
|
|
1907
|
+
to the opaque surface, it gives way to the alternate surface instead, so an
|
|
1908
|
+
image placeholder still reads as a well. */
|
|
1909
|
+
:is(.cr-haze,.cr-surface).flat {
|
|
1910
|
+
border: 0;
|
|
1911
|
+
background: var(--cr-haze-fill);
|
|
1912
|
+
}
|
|
1913
|
+
:is(.cr-haze,.cr-surface).flat::before {
|
|
1914
|
+
display: none;
|
|
1915
|
+
}
|
|
1916
|
+
[data-effects=opaque] :is(.cr-haze,.cr-surface).flat {
|
|
1917
|
+
background: var(--cr-surface);
|
|
1918
|
+
}
|
|
1919
|
+
[data-effects=opaque] :is(.cr-haze,.cr-surface).flat.sunken {
|
|
1920
|
+
background: var(--cr-surface-alt);
|
|
1921
|
+
}
|
|
1922
|
+
@media (prefers-reduced-transparency:reduce) {
|
|
1923
|
+
:is(.cr-haze,.cr-surface).flat {
|
|
1924
|
+
background: var(--cr-surface);
|
|
1925
|
+
}
|
|
1926
|
+
:is(.cr-haze,.cr-surface).flat.sunken {
|
|
1927
|
+
background: var(--cr-surface-alt);
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
@media (forced-colors:active) {
|
|
1931
|
+
:is(.cr-haze,.cr-surface).flat {
|
|
1932
|
+
background: Canvas;
|
|
1933
|
+
color: CanvasText;
|
|
1934
|
+
border: 1px solid CanvasText;
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
/* Haze, raised. The fill takes the float shadow, as the dialog's does: a
|
|
1939
|
+
reading surface that opens over everything, such as a command palette. */
|
|
1940
|
+
:is(.cr-haze,.cr-surface).raised::before {
|
|
1941
|
+
box-shadow: var(--cr-shadow-float);
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
/* Frost, pane. The content radius, 28px, instead of the panel's 34px: a pane
|
|
1945
|
+
that sits beside content rather than over it, such as a navigation rail, a
|
|
1946
|
+
filter panel, a tour step or a workspace pane. */
|
|
1947
|
+
:is(.cr-frost,.cr-acrylic).pane {
|
|
1948
|
+
border-radius: var(--cr-radius);
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
/* Frost, flat. No grain. A pane that holds a long column of controls or rows
|
|
1952
|
+
shows the grain as noise behind them; the fill, rim, blur and shadow are
|
|
1953
|
+
unchanged. */
|
|
1954
|
+
:is(.cr-frost,.cr-acrylic).flat::before {
|
|
1955
|
+
display: none;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
/* Frost, docked. A pane docked to the edges of the window, such as an app bar
|
|
1959
|
+
or a sidebar: no rim, no radius and no shadow, because it does not float.
|
|
1960
|
+
The side it shares with content is the component's to draw. */
|
|
1961
|
+
:is(.cr-frost,.cr-acrylic).docked {
|
|
1962
|
+
border: 0;
|
|
1963
|
+
border-radius: 0;
|
|
1964
|
+
box-shadow: none;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
/* Frost, sheet. A pane that slides over content from an edge, such as a
|
|
1968
|
+
drawer: the `--cr-edge` rim, the content radius and the float shadow. Which
|
|
1969
|
+
corners square off against the edge is the component's geometry. */
|
|
1970
|
+
:is(.cr-frost,.cr-acrylic).sheet {
|
|
1971
|
+
border: 1px solid var(--cr-edge);
|
|
1972
|
+
border-radius: var(--cr-radius);
|
|
1973
|
+
box-shadow: var(--cr-shadow-float);
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
/* Frost, reading. A transient Frost surface whose content is read, such as a
|
|
1977
|
+
toast or a popover, holds a Haze reading fill. It is painted on `::after`,
|
|
1978
|
+
because `::before` is the grain, and a fill written there is drawn at the
|
|
1979
|
+
grain's opacity. The inset is `--cr-frost-reading-inset`, defaulting to
|
|
1980
|
+
`--cr-haze-inset`; a component sets the former, never the latter, because
|
|
1981
|
+
controls nested inside read `--cr-haze-inset` for their own pads. */
|
|
1982
|
+
:is(.cr-frost,.cr-acrylic).reading {
|
|
1983
|
+
--cr-frost-reading-inset: var(--cr-haze-inset);
|
|
1984
|
+
}
|
|
1985
|
+
:is(.cr-frost,.cr-acrylic).reading::after {
|
|
1986
|
+
content: '';
|
|
1987
|
+
position: absolute;
|
|
1988
|
+
inset: var(--cr-frost-reading-inset);
|
|
1989
|
+
z-index: -1;
|
|
1990
|
+
pointer-events: none;
|
|
1991
|
+
border-radius: inherit;
|
|
1992
|
+
background: var(--cr-haze-fill);
|
|
1993
|
+
filter: blur(var(--cr-haze-feather));
|
|
1994
|
+
}
|
|
1995
|
+
[data-effects=opaque] :is(.cr-frost,.cr-acrylic).reading::after {
|
|
1996
|
+
background: var(--cr-surface);
|
|
1997
|
+
filter: none;
|
|
1998
|
+
}
|
|
1999
|
+
@media (prefers-reduced-transparency:reduce) {
|
|
2000
|
+
:is(.cr-frost,.cr-acrylic).reading::after {
|
|
2001
|
+
background: var(--cr-surface);
|
|
2002
|
+
filter: none;
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
@media (forced-colors:active) {
|
|
2006
|
+
:is(.cr-frost,.cr-acrylic).reading::after {
|
|
2007
|
+
display: none;
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
/* Resin, flat. No sheen. A Resin plane that is a mark rather than a control,
|
|
2012
|
+
such as a stepper's or a timeline's marker: the fill,
|
|
2013
|
+
rim, blur and float shadow, without the optical highlight layers. */
|
|
2014
|
+
:is(.cr-resin,.cr-glass).flat::before,
|
|
2015
|
+
:is(.cr-resin,.cr-glass).flat::after {
|
|
2016
|
+
display: none;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
/* Resin, divider. The handle between two resizable regions: the Resin fill
|
|
2020
|
+
and blur only, with no rim, shadow or sheen, because it is a line the
|
|
2021
|
+
pointer can hold rather than a plane. Where the fill gives way, it becomes
|
|
2022
|
+
the outline colour, not the surface, so the line stays visible on the
|
|
2023
|
+
surface it divides. */
|
|
2024
|
+
:is(.cr-resin,.cr-glass).divider {
|
|
2025
|
+
border: 0;
|
|
2026
|
+
box-shadow: none;
|
|
2027
|
+
}
|
|
2028
|
+
:is(.cr-resin,.cr-glass).divider::before,
|
|
2029
|
+
:is(.cr-resin,.cr-glass).divider::after {
|
|
2030
|
+
display: none;
|
|
2031
|
+
}
|
|
2032
|
+
[data-effects=opaque] :is(.cr-resin,.cr-glass).divider {
|
|
2033
|
+
background: var(--cr-outline);
|
|
2034
|
+
-webkit-backdrop-filter: none;
|
|
2035
|
+
backdrop-filter: none;
|
|
2036
|
+
}
|
|
2037
|
+
@media (prefers-reduced-transparency:reduce) {
|
|
2038
|
+
:is(.cr-resin,.cr-glass).divider {
|
|
2039
|
+
background: var(--cr-outline);
|
|
2040
|
+
-webkit-backdrop-filter: none;
|
|
2041
|
+
backdrop-filter: none;
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
|
|
2045
|
+
:is(.cr-resin,.cr-glass).divider {
|
|
2046
|
+
background: var(--cr-outline);
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
/* Forced colours: the divider is drawn in CanvasText. That rule sits in the
|
|
2050
|
+
reset layer beside the base forced-colours rule, because the base rule's
|
|
2051
|
+
`background: Canvas !important` is there, and an important declaration in an
|
|
2052
|
+
earlier layer beats one in this layer whatever its specificity. */
|
|
2053
|
+
|
|
2054
|
+
/* Field shell, block. The shell as a block that fills its row, for a field
|
|
2055
|
+
laid out in a form rather than set in a line of text. */
|
|
2056
|
+
.cr-field-shell.block {
|
|
2057
|
+
display: flex;
|
|
2058
|
+
}
|
|
1835
2059
|
|
|
1836
2060
|
/* A count (D-27).
|
|
1837
2061
|
*
|
package/docs/catalogue.md
CHANGED
|
@@ -33,15 +33,15 @@ Every component is made of one or more of these surfaces. Its Surface row names
|
|
|
33
33
|
| Surface | Materials | Recipe | Components | Use |
|
|
34
34
|
| --- | --- | --- | --- | --- |
|
|
35
35
|
| <a id="surface-plastic"></a>**Plastic foundation** `plastic` | Plastic | <code>.cr-plastic</code> | 6 | The root scene or window. One contextual, opaque foundation per view; never a component. |
|
|
36
|
-
| <a id="surface-frost"></a>**Frost panel** `frost` | Frost | <code>.cr-frost</code> | 48 | Intermediate task frames and every transient surface that opens over content: side panels, drawers, sheets and app bars, and menus, popovers, tooltips and toasts (R15e). Reading content inside it sits on Haze. `.cr-frost.bar` is a transient overlay shaped as a row of controls, a pill with 4px padding: the selection toolbar over highlighted text. |
|
|
37
|
-
| <a id="surface-haze"></a>**Haze reading surface** `haze` | Haze | <code>.cr-haze</code> | 88 | Anything read: cards, rows, panels, wells, forms, messages, decisions. 80% fill, 1.95px feather on an isolated paint layer, crisp foreground. `.cr-well` is the same recipe recessed into a Frost or Resin frame. `.cr-haze.overlay` is the recessed overlay: a transient overlay opened inside a pane that is already lifted, drawn as a flat Haze fill with the `--cr-edge` rim and the content shadow, so it can be told from the pane it sits in. |
|
|
38
|
-
| <a id="surface-resin"></a>**Resin plane** `resin` | Resin | <code>.cr-resin</code> | 12 | One floating Resin plane with no reading fill of its own, pill-shaped unless it is a panel: a player's transport bar, a pinned element, a Resin handle over imagery or between regions. Controls inside it lose their own backdrop filter, because Resin never contains Resin. A plane whose controls are labels to be read holds a Haze fill as well, and is a dock. `.cr-resin.transport` is the media transport: the pill with 4px block and 12px inline padding around its 48px controls (58px tall with its rim), with tabular time readouts, wrapping to a second row in a player narrower than 420px. `.cr-media` is the stage it sits on (the content radius, the letterbox, `--cr-media-aspect` and `--cr-media-fit`), and `.cr-media-bar` is the region inset 12px, or the safe area in full screen, that holds the transport. |
|
|
36
|
+
| <a id="surface-frost"></a>**Frost panel** `frost` | Frost | <code>.cr-frost</code> | 48 | Intermediate task frames and every transient surface that opens over content: side panels, drawers, sheets and app bars, and menus, popovers, tooltips and toasts (R15e). Reading content inside it sits on Haze. `.cr-frost.bar` is a transient overlay shaped as a row of controls, a pill with 4px padding: the selection toolbar over highlighted text. `.pane` takes the content radius, for a pane beside content: a navigation rail, a filter panel, a workspace pane. `.flat` drops the grain. `.docked` is a pane docked to the window's edges, with no rim, radius or shadow: an app bar, a sidebar. `.sheet` slides over content from an edge, with the `--cr-edge` rim, the content radius and the float shadow: a drawer. `.reading` holds a Haze reading fill on `::after`, inset by `--cr-frost-reading-inset` (default `--cr-haze-inset`): a toast, a popover. `.flat` composes with `.pane`, `.docked` and `.sheet` (2.7.0). |
|
|
37
|
+
| <a id="surface-haze"></a>**Haze reading surface** `haze` | Haze | <code>.cr-haze</code> | 88 | Anything read: cards, rows, panels, wells, forms, messages, decisions. 80% fill, 1.95px feather on an isolated paint layer, crisp foreground. `.cr-well` is the same recipe recessed into a Frost or Resin frame. `.cr-haze.overlay` is the recessed overlay: a transient overlay opened inside a pane that is already lifted, drawn as a flat Haze fill with the `--cr-edge` rim and the content shadow, so it can be told from the pane it sits in. `.inset` is a reading card with no border box, its fill inset by `--cr-haze-inset` and no shadow under it: an alert, a result, a product card. `.flush` is the same card filled to its own edge: a thumbnail, a slide, a chart node. `.flat` is the fill on the element itself, with no feather and no layer: a list or accordion row. `.flat.sunken` falls back to the alternate surface instead of the surface: a placeholder. `.raised` gives the fill the float shadow: a command palette (2.7.0). |
|
|
38
|
+
| <a id="surface-resin"></a>**Resin plane** `resin` | Resin | <code>.cr-resin</code> | 12 | One floating Resin plane with no reading fill of its own, pill-shaped unless it is a panel: a player's transport bar, a pinned element, a Resin handle over imagery or between regions. Controls inside it lose their own backdrop filter, because Resin never contains Resin. A plane whose controls are labels to be read holds a Haze fill as well, and is a dock. `.cr-resin.transport` is the media transport: the pill with 4px block and 12px inline padding around its 48px controls (58px tall with its rim), with tabular time readouts, wrapping to a second row in a player narrower than 420px. `.cr-media` is the stage it sits on (the content radius, the letterbox, `--cr-media-aspect` and `--cr-media-fit`), and `.cr-media-bar` is the region inset 12px, or the safe area in full screen, that holds the transport. `.flat` drops the sheen layers, for a plane that is a mark rather than a control: a step or timeline marker. `.divider` is the handle between resizable regions: the Resin fill and blur only, with no rim, shadow or sheen, falling back to the outline colour (2.7.0). |
|
|
39
39
|
| <a id="surface-resin-panel"></a>**Resin panel** `resin-panel` | Resin | <code>.cr-resin.panel</code> | 1 | The Resin plane with the content radius instead of the pill, for a floating control plane that is a rectangle: a floating window, a media control bar wider than it is tall. Same fill, rim, blur and float shadow; only the geometry changes. |
|
|
40
40
|
| <a id="surface-control"></a>**Resin control** `control` | Resin + Haze | <code>.cr-button</code> | 16 | An action: a Resin shell with the 8px-inset Haze reading pad and the optical sheen. Pill geometry with `.cr-button`, which coats a `button` or an `a`; `.cr-control` coats any element. `.primary` tints the pad, `.quiet` removes it, `.danger` adds the destructive boundary. Selected state is the primary pad plus label weight 800. |
|
|
41
|
-
| <a id="surface-field"></a>**Field shell** `field` | Resin + Haze | <code>.cr-field-shell</code> | 28 | The Resin surround of a native text entry, with the Haze well the value is read on and the circular field-state badge. The native control keeps its functional boundary and semantics. `.cr-editor` is the editable surface inside a rich text field: the shared prose vocabulary (headings, lists, checklists, marks, insertions and deletions) with the primary caret and a 28% primary selection, distinct from the primary-soft highlight (D-34). `.cr-editor-toolbar` is its toolbar, above the text on a fine pointer and below it, clear of the touch keyboard, on a coarse one. |
|
|
41
|
+
| <a id="surface-field"></a>**Field shell** `field` | Resin + Haze | <code>.cr-field-shell</code> | 28 | The Resin surround of a native text entry, with the Haze well the value is read on and the circular field-state badge. The native control keeps its functional boundary and semantics. `.cr-editor` is the editable surface inside a rich text field: the shared prose vocabulary (headings, lists, checklists, marks, insertions and deletions) with the primary caret and a 28% primary selection, distinct from the primary-soft highlight (D-34). `.cr-editor-toolbar` is its toolbar, above the text on a fine pointer and below it, clear of the touch keyboard, on a coarse one. `.block` is the shell as a block that fills its row, for a field laid out in a form (2.7.0). |
|
|
42
42
|
| <a id="surface-compact"></a>**Compact display** `compact` | Resin + Haze | <code>.cr-resin-haze</code> | 5 | Small information displays that sit on content: tags, badges, labels, keyboard caps. A Resin shell with the inset Haze pad, 18px radius. Not for anything that opens. Transient overlays are Frost. `.count` is the size for a count: a 20px circle that grows to a pill, filled to its own edge, with no block padding. |
|
|
43
43
|
| <a id="surface-stone"></a>**Stone label backing** `stone` | Stone | <code>.cr-stone</code> | 3 | A label over an unknown or moving backdrop: a caption on media, a status bar over a scene. 55% light / 60% dark fill, feathered like Haze, crisp text. `.cr-media-caption` is a caption cue rendered by the library: the Stone backing on a box above the transport, never under it. `.large`, `.larger` and `.solid` are the reader's caption style: a cue 1.25 or 1.5 times the size, and a cue on the opaque surface. `::cue` on a `.cr-media` video is the flat fill for the browser's own renderer, which follows the reader's system caption settings. |
|
|
44
|
-
| <a id="surface-mirage"></a>**Mirage scrim** `mirage` | Mirage | <code>.cr-mirage</code> | 10 | The chromatic diffusion of the real scene behind a modal. Never a content surface; the decision surface above it is Haze. |
|
|
44
|
+
| <a id="surface-mirage"></a>**Mirage scrim** `mirage` | Mirage | <code>.cr-mirage</code> | 10 | The chromatic diffusion of the real scene behind a modal. Never a content surface; the decision surface above it is Haze. The opaque setting draws it as the flat fallback fill, as reduced transparency does (2.7.0). |
|
|
45
45
|
| <a id="surface-dialog"></a>**Dialog** `dialog` | Haze + Mirage | <code>.cr-dialog</code> | 2 | A Haze decision surface over a Mirage scrim, with the float shadow. Modality, focus and dismissal are the product's. The surface does not scroll: `.cr-dialog-body`, worn with `.cr-scroll-frost`, scrolls inside it, so the title stays in view and the edge fade does not dissolve the surface. `position: fixed` is for a native `<dialog>`; on any other element the host positions it. |
|
|
46
46
|
| <a id="surface-indicator"></a>**Indicator** `indicator` | Haze | <code>.cr-indicator</code> | 2 | A 20px informational circle painting Haze on an isolated layer, or, as `.cr-indicator.pill`, the primary fill that travels behind the selected segment of a strip (D-37): tabs, a segmented control, the dock, bottom navigation or a toggle button group. The circle is Haze rather than Resin, because it sits on a surface that is often already translucent. Neither is ever the only mark of a selection: the selected segment keeps its label weight, and the circle never marks one at all. |
|
|
47
47
|
| <a id="surface-status"></a>**Status badge** `status` | Resin + Haze | <code>.cr-status</code> | 1 | The semantic ink and surface pair behind a symbol, with words beside it. Status colours are independent of the palette and are never redefined by it. |
|
package/docs/components.md
CHANGED
|
@@ -112,6 +112,25 @@ The media and text recipes of 2.4.0 add no surface. Each is a selector on a surf
|
|
|
112
112
|
|
|
113
113
|
A native switch is a checkbox with a track, `<input type="checkbox" role="switch">`, styled by element like the checkbox and radio. The track reads `--cr-switch-track-width` and `-height`, the thumb is the opaque surface, and the on state is the primary-soft pair.
|
|
114
114
|
|
|
115
|
+
The material variants of 2.7.0 add no surface either. Each was a surface a platform library had drawn by hand because Crystal had not published it; ruled on 16 November 2026, those are corrections the standard takes in, and where a library's surface had drifted from the base recipe the drift is published as a named variant. Each variant states only what differs from the surface it modifies, so the base recipe's opaque, reduced-transparency, no-backdrop and forced-colours routes still apply to everything else, and each variant that restates a fill or a border carries its own routes. A variant is the surface compound plus one class, authored in the component layer, so on a `<button>` it beats the Resin coat on what it states; a control that must lose the whole coat wears `.cr-bare` as well.
|
|
116
|
+
|
|
117
|
+
| Variant | Surface | What it is |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| `.cr-haze.inset` | Haze reading surface | A reading card with no border box: the feathered fill stops `--cr-haze-inset` (8px) short of the box, with no shadow under it. An alert, an empty state, a result, a product or cart card, a review, a chart's plot. Forced colours draw a CanvasText boundary. |
|
|
120
|
+
| `.cr-haze.flush` | Haze reading surface | The same card filled to its own edge, for a tile whose content is the card: a thumbnail, a slide, an organisation chart's node, a swatch. |
|
|
121
|
+
| `.cr-haze.flat`, `.flat.sunken` | Haze reading surface | The fill on the element itself, with no feather and no layer: a row in a list or an accordion, drawn edge to edge against its neighbours. It becomes the surface where translucency gives way; `.sunken` becomes the alternate surface instead, for a placeholder that should still read as a well. |
|
|
122
|
+
| `.cr-haze.raised` | Haze reading surface | The fill takes the float shadow, as the dialog's does: a reading surface opened over everything, such as a command palette. |
|
|
123
|
+
| `.cr-frost.pane` | Frost panel | The content radius, 28px, instead of the panel's 34px, for a pane beside content: a navigation rail, a filter panel, a tour step, a workspace pane. |
|
|
124
|
+
| `.cr-frost.flat` | Frost panel | No grain, for a pane holding a long column of controls or rows. Composes with `.pane`, `.docked` and `.sheet`. |
|
|
125
|
+
| `.cr-frost.docked` | Frost panel | A pane docked to the window's edges, such as an app bar or a sidebar: no rim, radius or shadow. The side it shares with content is the component's to draw. |
|
|
126
|
+
| `.cr-frost.sheet` | Frost panel | A pane that slides over content from an edge, such as a drawer: the `--cr-edge` rim, the content radius and the float shadow. Which corners square off against the edge is the component's geometry. |
|
|
127
|
+
| `.cr-frost.reading` | Frost panel | A transient Frost surface whose content is read, such as a toast or a popover, holding a Haze reading fill on `::after`, because `::before` is the grain. The inset is `--cr-frost-reading-inset`, which defaults to `--cr-haze-inset`; set the former, never the latter, because controls inside read `--cr-haze-inset` for their own pads. |
|
|
128
|
+
| `.cr-resin.flat` | Resin plane | No sheen: a plane that is a mark rather than a control, such as a step or timeline marker. |
|
|
129
|
+
| `.cr-resin.divider` | Resin plane | The handle between resizable regions: the Resin fill and blur only, with no rim, shadow or sheen. Where the fill gives way it becomes the outline colour, so the line stays visible on the surface it divides, and CanvasText in forced colours. |
|
|
130
|
+
| `.cr-field-shell.block` | Field shell | The shell as a block that fills its row, for a field laid out in a form rather than set in a line of text. |
|
|
131
|
+
|
|
132
|
+
Two existing recipes changed in 2.7.0. `.cr-mirage` and a dialog's `::backdrop` now take the flat fallback fill with no backdrop filter under `[data-effects=opaque]`, as they already did under reduced transparency; before, the opaque setting left the largest translucent area on screen translucent. And `.cr-bare`, `.cr-nav-item` and `.cr-drag-handle` on a `<button>` now stay transparent under `[data-effects=opaque]`: the coat's opaque route had outranked them, drawing the surface behind a bare control and erasing the drag handle's grip.
|
|
133
|
+
|
|
115
134
|
### Interaction surface geometry
|
|
116
135
|
|
|
117
136
|
Use a broad, luminous Resin rim with an 8px inset reading fill and diffuse paired shadows. Avoid thin dark perimeter strokes on ordinary action buttons; native text-entry fields retain a functional boundary and every control retains a visible keyboard focus ring. Standalone actions use generous padding and full pill geometry.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystal-ui/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Crystal, Meridian's design system: design tokens, material stylesheets, a token resolver, a headless state core, motion recipes, icons and the specification.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
package/tokens/catalogue.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$description": "Crystal component catalogue, combined. Generated from core/tokens/catalogue/.",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"surfaces": [
|
|
5
5
|
{
|
|
6
6
|
"id": "plastic",
|
|
@@ -18,9 +18,14 @@
|
|
|
18
18
|
"Frost"
|
|
19
19
|
],
|
|
20
20
|
"class": ".cr-frost",
|
|
21
|
-
"use": "Intermediate task frames and every transient surface that opens over content: side panels, drawers, sheets and app bars, and menus, popovers, tooltips and toasts (R15e). Reading content inside it sits on Haze. `.cr-frost.bar` is a transient overlay shaped as a row of controls, a pill with 4px padding: the selection toolbar over highlighted text.",
|
|
21
|
+
"use": "Intermediate task frames and every transient surface that opens over content: side panels, drawers, sheets and app bars, and menus, popovers, tooltips and toasts (R15e). Reading content inside it sits on Haze. `.cr-frost.bar` is a transient overlay shaped as a row of controls, a pill with 4px padding: the selection toolbar over highlighted text. `.pane` takes the content radius, for a pane beside content: a navigation rail, a filter panel, a workspace pane. `.flat` drops the grain. `.docked` is a pane docked to the window's edges, with no rim, radius or shadow: an app bar, a sidebar. `.sheet` slides over content from an edge, with the `--cr-edge` rim, the content radius and the float shadow: a drawer. `.reading` holds a Haze reading fill on `::after`, inset by `--cr-frost-reading-inset` (default `--cr-haze-inset`): a toast, a popover. `.flat` composes with `.pane`, `.docked` and `.sheet` (2.7.0).",
|
|
22
22
|
"also": [
|
|
23
|
-
".cr-frost.bar"
|
|
23
|
+
".cr-frost.bar",
|
|
24
|
+
".cr-frost.pane",
|
|
25
|
+
".cr-frost.flat",
|
|
26
|
+
".cr-frost.docked",
|
|
27
|
+
".cr-frost.sheet",
|
|
28
|
+
".cr-frost.reading"
|
|
24
29
|
]
|
|
25
30
|
},
|
|
26
31
|
{
|
|
@@ -30,9 +35,14 @@
|
|
|
30
35
|
"Haze"
|
|
31
36
|
],
|
|
32
37
|
"class": ".cr-haze",
|
|
33
|
-
"use": "Anything read: cards, rows, panels, wells, forms, messages, decisions. 80% fill, 1.95px feather on an isolated paint layer, crisp foreground. `.cr-well` is the same recipe recessed into a Frost or Resin frame. `.cr-haze.overlay` is the recessed overlay: a transient overlay opened inside a pane that is already lifted, drawn as a flat Haze fill with the `--cr-edge` rim and the content shadow, so it can be told from the pane it sits in.",
|
|
38
|
+
"use": "Anything read: cards, rows, panels, wells, forms, messages, decisions. 80% fill, 1.95px feather on an isolated paint layer, crisp foreground. `.cr-well` is the same recipe recessed into a Frost or Resin frame. `.cr-haze.overlay` is the recessed overlay: a transient overlay opened inside a pane that is already lifted, drawn as a flat Haze fill with the `--cr-edge` rim and the content shadow, so it can be told from the pane it sits in. `.inset` is a reading card with no border box, its fill inset by `--cr-haze-inset` and no shadow under it: an alert, a result, a product card. `.flush` is the same card filled to its own edge: a thumbnail, a slide, a chart node. `.flat` is the fill on the element itself, with no feather and no layer: a list or accordion row. `.flat.sunken` falls back to the alternate surface instead of the surface: a placeholder. `.raised` gives the fill the float shadow: a command palette (2.7.0).",
|
|
34
39
|
"also": [
|
|
35
|
-
".cr-haze.overlay"
|
|
40
|
+
".cr-haze.overlay",
|
|
41
|
+
".cr-haze.inset",
|
|
42
|
+
".cr-haze.flush",
|
|
43
|
+
".cr-haze.flat",
|
|
44
|
+
".cr-haze.flat.sunken",
|
|
45
|
+
".cr-haze.raised"
|
|
36
46
|
]
|
|
37
47
|
},
|
|
38
48
|
{
|
|
@@ -42,9 +52,11 @@
|
|
|
42
52
|
"Resin"
|
|
43
53
|
],
|
|
44
54
|
"class": ".cr-resin",
|
|
45
|
-
"use": "One floating Resin plane with no reading fill of its own, pill-shaped unless it is a panel: a player's transport bar, a pinned element, a Resin handle over imagery or between regions. Controls inside it lose their own backdrop filter, because Resin never contains Resin. A plane whose controls are labels to be read holds a Haze fill as well, and is a dock. `.cr-resin.transport` is the media transport: the pill with 4px block and 12px inline padding around its 48px controls (58px tall with its rim), with tabular time readouts, wrapping to a second row in a player narrower than 420px. `.cr-media` is the stage it sits on (the content radius, the letterbox, `--cr-media-aspect` and `--cr-media-fit`), and `.cr-media-bar` is the region inset 12px, or the safe area in full screen, that holds the transport.",
|
|
55
|
+
"use": "One floating Resin plane with no reading fill of its own, pill-shaped unless it is a panel: a player's transport bar, a pinned element, a Resin handle over imagery or between regions. Controls inside it lose their own backdrop filter, because Resin never contains Resin. A plane whose controls are labels to be read holds a Haze fill as well, and is a dock. `.cr-resin.transport` is the media transport: the pill with 4px block and 12px inline padding around its 48px controls (58px tall with its rim), with tabular time readouts, wrapping to a second row in a player narrower than 420px. `.cr-media` is the stage it sits on (the content radius, the letterbox, `--cr-media-aspect` and `--cr-media-fit`), and `.cr-media-bar` is the region inset 12px, or the safe area in full screen, that holds the transport. `.flat` drops the sheen layers, for a plane that is a mark rather than a control: a step or timeline marker. `.divider` is the handle between resizable regions: the Resin fill and blur only, with no rim, shadow or sheen, falling back to the outline colour (2.7.0).",
|
|
46
56
|
"also": [
|
|
47
|
-
".cr-resin.transport"
|
|
57
|
+
".cr-resin.transport",
|
|
58
|
+
".cr-resin.flat",
|
|
59
|
+
".cr-resin.divider"
|
|
48
60
|
]
|
|
49
61
|
},
|
|
50
62
|
{
|
|
@@ -84,11 +96,13 @@
|
|
|
84
96
|
"Haze"
|
|
85
97
|
],
|
|
86
98
|
"class": ".cr-field-shell",
|
|
87
|
-
"use": "The Resin surround of a native text entry, with the Haze well the value is read on and the circular field-state badge. The native control keeps its functional boundary and semantics. `.cr-editor` is the editable surface inside a rich text field: the shared prose vocabulary (headings, lists, checklists, marks, insertions and deletions) with the primary caret and a 28% primary selection, distinct from the primary-soft highlight (D-34). `.cr-editor-toolbar` is its toolbar, above the text on a fine pointer and below it, clear of the touch keyboard, on a coarse one.",
|
|
99
|
+
"use": "The Resin surround of a native text entry, with the Haze well the value is read on and the circular field-state badge. The native control keeps its functional boundary and semantics. `.cr-editor` is the editable surface inside a rich text field: the shared prose vocabulary (headings, lists, checklists, marks, insertions and deletions) with the primary caret and a 28% primary selection, distinct from the primary-soft highlight (D-34). `.cr-editor-toolbar` is its toolbar, above the text on a fine pointer and below it, clear of the touch keyboard, on a coarse one. `.block` is the shell as a block that fills its row, for a field laid out in a form (2.7.0).",
|
|
88
100
|
"also": [
|
|
89
|
-
".cr-editor"
|
|
101
|
+
".cr-editor",
|
|
102
|
+
".cr-field-shell.block"
|
|
90
103
|
],
|
|
91
104
|
"partial": {
|
|
105
|
+
".cr-field-shell.block": "The shell's display only: worn with `.cr-field-shell`, which carries the coat.",
|
|
92
106
|
".cr-editor": "A part: the document inside the field shell, which carries the Resin surround and the Haze well."
|
|
93
107
|
}
|
|
94
108
|
},
|
|
@@ -141,7 +155,7 @@
|
|
|
141
155
|
"also": [
|
|
142
156
|
".cr-dialog::backdrop"
|
|
143
157
|
],
|
|
144
|
-
"use": "The chromatic diffusion of the real scene behind a modal. Never a content surface; the decision surface above it is Haze."
|
|
158
|
+
"use": "The chromatic diffusion of the real scene behind a modal. Never a content surface; the decision surface above it is Haze. The opaque setting draws it as the flat fallback fill, as reduced transparency does (2.7.0)."
|
|
145
159
|
},
|
|
146
160
|
{
|
|
147
161
|
"id": "dialog",
|