Skip to content

Commit

Permalink
fix: add @import to global styles
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Aug 20, 2021
1 parent 972c524 commit 48492c6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions packages/core/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ export default interface Stitches<
* [Read Documentation](https://stitches.dev/docs/variants)
*/
globalCss: {
(style: {
[prelude: string]: CSSUtil.CSS<Media, Theme, ThemeMap, Utils>
}): {
<Prelude extends string>(
style: {
/** The **@import** CSS at-rule imports style rules from other style sheets. */
'@import'?: unknown
} & {
[K in Prelude]: K extends '@import' ? string : CSSUtil.CSS<Media, Theme, ThemeMap, Utils>
}
): {
(): string
}
},
Expand Down
11 changes: 8 additions & 3 deletions packages/react/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ export default interface Stitches<
* [Read Documentation](https://stitches.dev/docs/variants)
*/
globalCss: {
(style: {
[prelude: string]: CSSUtil.CSS<Media, Theme, ThemeMap, Utils>
}): {
<Prelude extends string>(
style: {
/** The **@import** CSS at-rule imports style rules from other style sheets. */
'@import'?: unknown
} & {
[K in Prelude]: K extends '@import' ? string : CSSUtil.CSS<Media, Theme, ThemeMap, Utils>
}
): {
(): string
}
},
Expand Down

0 comments on commit 48492c6

Please sign in to comment.