Skip to content

Commit c6047fb

Browse files
authored
css: Remove custom container properties type (#1666)
1 parent 352fc19 commit c6047fb

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

.changeset/shaggy-walls-sit.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@vanilla-extract/css': patch
3+
---
4+
5+
Remove custom container properties type
6+
7+
The [`csstype`] package used by Vanilla Extract now provides types for container properties, so the custom type definitions that were previously necessary have been removed.
8+
9+
[`csstype`]: https://www.npmjs.com/package/csstype

packages/css/src/types.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,7 @@ export type Resolve<T> = {
77
[Key in keyof T]: T[Key];
88
} & {};
99

10-
// csstype is yet to ship container property types as they are not in
11-
// the output MDN spec files yet. Remove this once that's done.
12-
// https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Container_Queries
13-
interface ContainerProperties {
14-
container?: string;
15-
containerType?: 'size' | 'inline-size' | (string & {});
16-
containerName?: string;
17-
}
18-
19-
type CSSTypeProperties = Properties<number | (string & {})> &
20-
ContainerProperties;
10+
type CSSTypeProperties = Properties<number | (string & {})>;
2111

2212
export type CSSProperties = {
2313
[Property in keyof CSSTypeProperties]:

0 commit comments

Comments
 (0)