diff --git a/.changeset/chilled-lizards-count.md b/.changeset/chilled-lizards-count.md new file mode 100644 index 000000000..a2d104c56 --- /dev/null +++ b/.changeset/chilled-lizards-count.md @@ -0,0 +1,5 @@ +--- +'@vanilla-extract/css': minor +--- + +Add `anchor positioning` rules types diff --git a/packages/css/src/types.ts b/packages/css/src/types.ts index 36cf21b89..54ca2f940 100644 --- a/packages/css/src/types.ts +++ b/packages/css/src/types.ts @@ -1,5 +1,5 @@ import type { CSSVarFunction, MapLeafNodes } from '@vanilla-extract/private'; -import type { AtRule, Properties } from 'csstype'; +import type { AtRule, Globals, Properties } from 'csstype'; import type { SimplePseudos } from './simplePseudos'; @@ -16,8 +16,32 @@ interface ContainerProperties { containerName?: string; } +interface AnchorProperties { + anchorName?: 'none' | `--${string}` | Globals | (string & {}); + positionAnchor?: 'auto' | `--${string}` | Globals; + positionArea?: + | 'none' + | 'all' + | 'bottom' + | 'center' + | 'end' + | 'left' + | 'right' + | 'self-end' + | 'self-start' + | 'start' + | 'top' + | 'x-end' + | 'x-start' + | 'y-end' + | 'y-start' + | Globals + | (string & {}); +} + type CSSTypeProperties = Properties & - ContainerProperties; + ContainerProperties & + AnchorProperties; export type CSSProperties = { [Property in keyof CSSTypeProperties]: