Skip to content

Commit

Permalink
fix: support additional typed at-rules in core
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Aug 20, 2021
1 parent 47e4d0e commit 8ab880d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/core/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Media, Theme, ThemeMap, Utils>
[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<Media, Theme, ThemeMap, Utils>
}
: K extends `@property ${string}`
? CSSUtil.Native.AtRule.Property
: CSSUtil.CSS<Media, Theme, ThemeMap, Utils>
}
): {
(): string
Expand Down

0 comments on commit 8ab880d

Please sign in to comment.