-
-
Notifications
You must be signed in to change notification settings - Fork 389
Use CSSTOM in default unit plugin #893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
7859449
fd768a7
720be61
bb16b03
177df9a
f5e5446
8fa565c
b0fa5c3
c37b14c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,12 @@ export type { | |
| FontFaceRule | ||
| } | ||
|
|
||
| /** | ||
| * Export a constant indicating if this browser has CSSTOM support. | ||
| * https://developers.google.com/web/updates/2018/03/cssom | ||
| */ | ||
| export const hasCSSTOMSupport = Boolean(window && window.CSS && window.CSS.number) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in node window will not exist, accessing it will throw error
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead either we have to use typeof window or just use |
||
|
|
||
| /** | ||
| * Extracts a styles object with only rules that contain function values. | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| const CSS = (global.CSS: any) | ||
|
|
||
| const env = process.env.NODE_ENV | ||
|
|
||
| const escapeRegex = /([[\].#*$><+~=|^:(),"'`])/g | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice