mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 23:55:20 +00:00
Add browserslist and improve CSS masks for compatibility (#3471)
Co-authored-by: Nicolas Dorseuil <nicolas@gitbook.io>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"gitbook": patch
|
||||
"@gitbook/icons": patch
|
||||
---
|
||||
|
||||
add browserlists and fix old browser css-masks
|
||||
@@ -111,5 +111,8 @@
|
||||
"e2e-customers": "playwright test e2e/customers.spec.ts",
|
||||
"unit": "bun test {src,packages} --preload ./tests/preload-bun.ts",
|
||||
"typecheck": "tsc --noEmit"
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
">0.3%, chrome >= 64, edge >= 79, firefox >= 67, opera >= 51, safari >= 12 and not dead"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -58,8 +58,12 @@ export const Icon = React.forwardRef(function Icon(
|
||||
{...rest}
|
||||
style={{
|
||||
maskImage: `url(${url})`,
|
||||
//@ts-ignore // For compatibility with older browsers
|
||||
'-webkit-mask-image': `url(${url})`,
|
||||
maskRepeat: 'no-repeat',
|
||||
'-webkit-mask-repeat': 'no-repeat',
|
||||
maskPosition: 'center',
|
||||
'-webkit-mask-position': 'center',
|
||||
...(size ? { width: size, height: size } : {}),
|
||||
...rest.style,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user