From 8ab880dba0b08cf888a90f7b4118e292e5d7099b Mon Sep 17 00:00:00 2001 From: Jonathan Neal Date: Fri, 20 Aug 2021 18:02:19 -0400 Subject: [PATCH] fix: support additional typed at-rules in core --- packages/core/types/stitches.d.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/core/types/stitches.d.ts b/packages/core/types/stitches.d.ts index 144ee36c..75494804 100644 --- a/packages/core/types/stitches.d.ts +++ b/packages/core/types/stitches.d.ts @@ -28,8 +28,20 @@ export default interface Stitches< style: { /** The **@import** CSS at-rule imports style rules from other style sheets. */ '@import'?: unknown + /** The **@font-face** CSS at-rule specifies a custom font with which to display text. */ + '@font-face'?: unknown } & { - [K in Prelude]: K extends '@import' ? string : CSSUtil.CSS + [K in Prelude]: K extends '@import' + ? string + : K extends '@font-face' + ? CSSUtil.Native.AtRule.FontFace | CSSUtil.Native.AtRule.FontFace[] + : K extends `@keyframes ${string}` + ? { + [KeyFrame in string]: CSSUtil.CSS + } + : K extends `@property ${string}` + ? CSSUtil.Native.AtRule.Property + : CSSUtil.CSS } ): { (): string