ant-design / cssinjs

https://ant-design.github.io/cssinjs
MIT License
247 stars 61 forks source link

feat: StyleProvider support `transformCSS` to convert with legacy browser #67

Closed zombieJ closed 1 year ago

zombieJ commented 1 year ago

close https://github.com/ant-design/cssinjs/issues/21

import legacyLogicalProperties from '@ant-design/cssinjs/lib/transform/legacyLogicalProperties';

export default () => (
  <StyleProvider transformCSS={[legacyLogicalProperties]}>
    <MyApp />
  </StyleProvider>
);
github-actions[bot] commented 1 year ago

🎊 PR Preview c63381f2c78f56fd952d0f6f04cbd5951c60a78f has been successfully built and deployed to https://ant-design-cssinjs-preview-pr-67.surge.sh

:clock1: Build time: 93.199s

🤖 By surge-preview

codecov-commenter commented 1 year ago

Codecov Report

Base: 91.02% // Head: 91.38% // Increases project coverage by +0.36% :tada:

Coverage data is based on head (c63381f) compared to base (748b61b). Patch coverage: 94.73% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #67 +/- ## ========================================== + Coverage 91.02% 91.38% +0.36% ========================================== Files 11 12 +1 Lines 490 534 +44 Branches 157 180 +23 ========================================== + Hits 446 488 +42 - Misses 44 46 +2 ``` | [Impacted Files](https://codecov.io/gh/ant-design/cssinjs/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design) | Coverage Δ | | |---|---|---| | [src/StyleContext.tsx](https://codecov.io/gh/ant-design/cssinjs/pull/67/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design#diff-c3JjL1N0eWxlQ29udGV4dC50c3g=) | `92.50% <ø> (+0.19%)` | :arrow_up: | | [src/transformers/legacyLogicalProperties.ts](https://codecov.io/gh/ant-design/cssinjs/pull/67/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design#diff-c3JjL3RyYW5zZm9ybWVycy9sZWdhY3lMb2dpY2FsUHJvcGVydGllcy50cw==) | `93.75% <93.75%> (ø)` | | | [src/hooks/useStyleRegister.tsx](https://codecov.io/gh/ant-design/cssinjs/pull/67/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design#diff-c3JjL2hvb2tzL3VzZVN0eWxlUmVnaXN0ZXIudHN4) | `98.03% <100.00%> (+0.08%)` | :arrow_up: | | [src/Cache.ts](https://codecov.io/gh/ant-design/cssinjs/pull/67/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design#diff-c3JjL0NhY2hlLnRz) | `100.00% <0.00%> (ø)` | | | [src/theme/ThemeCache.ts](https://codecov.io/gh/ant-design/cssinjs/pull/67/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design#diff-c3JjL3RoZW1lL1RoZW1lQ2FjaGUudHM=) | `100.00% <0.00%> (ø)` | | | [src/util.ts](https://codecov.io/gh/ant-design/cssinjs/pull/67/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design#diff-c3JjL3V0aWwudHM=) | `78.07% <0.00%> (+0.19%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.