Skip to content

Commit db8e187

Browse files
committed
Support VendorProperties in types
1 parent 77d5216 commit db8e187

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

packages/css/src/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export type ResponsiveStyleValue<T> = T | Array<T | null>
2222
*/
2323
export interface CSSProperties
2424
extends CSS.StandardProperties<number | string>,
25-
CSS.SvgProperties<number | string> {}
25+
CSS.SvgProperties<number | string>,
26+
CSS.VendorProperties<number | string>
27+
{}
2628

2729
/**
2830
* Map of all CSS pseudo selectors (`:hover`, `:focus`, ...)

packages/css/test/index.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ test('works with the css prop', () => {
196196
})
197197

198198
test('works with functional arguments', () => {
199-
const result = css(t => ({
199+
const result = css((t) => ({
200200
color: t.colors.primary,
201201
}))(theme)
202202
expect(result).toEqual({
@@ -206,7 +206,7 @@ test('works with functional arguments', () => {
206206

207207
test('supports functional values', () => {
208208
const result = css({
209-
color: t => t.colors.primary,
209+
color: (t) => t.colors.primary,
210210
})(theme)
211211
expect(result).toEqual({
212212
color: 'tomato',
@@ -285,7 +285,7 @@ test('handles negative margins from scale that is an object', () => {
285285
const result = css({
286286
mt: '-s',
287287
mx: '-m',
288-
})({...theme, space: { s: '16px', m: '32px' }})
288+
})({ ...theme, space: { s: '16px', m: '32px' } })
289289
expect(result).toEqual({
290290
marginTop: '-16px',
291291
marginLeft: '-32px',
@@ -344,7 +344,7 @@ test('ignores array values longer than breakpoints', () => {
344344

345345
test('functional values can return responsive arrays', () => {
346346
const result = css({
347-
color: t => [t.colors.primary, t.colors.secondary],
347+
color: (t) => [t.colors.primary, t.colors.secondary],
348348
})(theme)
349349
expect(result).toEqual({
350350
'@media screen and (min-width: 40em)': {
@@ -494,3 +494,9 @@ test('returns correct media query order 2', () => {
494494
'paddingBottom',
495495
])
496496
})
497+
498+
test('supports vendor properties', () => {
499+
expect(css({ WebkitOverflowScrolling: 'touch' })(theme)).toStrictEqual({
500+
WebkitOverflowScrolling: 'touch',
501+
})
502+
})

packages/sidenav/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const Sidenav = forwardRef<
130130
transition: 'transform .2s ease-out',
131131
transform: [open ? 'translateX(0)' : 'translate(-100%)', 'none'],
132132
bg: ['background', 'transparent'],
133-
...{ WebkitOverflowScrolling: 'touch' },
133+
WebkitOverflowScrolling: 'touch',
134134
}}
135135
/>
136136
</MDXProvider>
@@ -267,7 +267,7 @@ export const AccordionNav = forwardRef<
267267
transition: 'transform .2s ease-out',
268268
transform: [open ? 'translateX(0)' : 'translate(-100%)', 'none'],
269269
bg: ['background', 'transparent'],
270-
...{ WebkitOverflowScrolling: 'touch' },
270+
WebkitOverflowScrolling: 'touch',
271271
}}>
272272
<ul
273273
sx={{

0 commit comments

Comments
 (0)