Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

antd-style

ant-design347.4kMIT3.7.1TypeScript support: included

css-in-js solution for application combine with antd v5 token system and emotion

antd, css-in-js, cssinjs, antd design token, token, design token, token-system, emtion

readme

antd-style

NPM version NPM downloads install size

Test CI status Rlease CI Coverage

docs by dumi Build With father

Introduction

A business-level css-in-js solution built on the Ant Design V5 Token System. It is based on emotion at the bottom.

  • 🧩 Token System: Default integration of Ant Design V5 Token System, making style customization easy, and token consumption flexible and easy to use;
  • 🌓 One-click Dark Mode Switching: Based on antd v5 cssinjs dynamic theme configuration and dark theme algorithm encapsulation, it provides an easy-to-use light and dark theme switching capability for application-level scenarios, making it easier to use;
  • 🎨 Flexible Custom Theme Extension: Ant Design Style provides the functionality of custom tokens and custom styles. When the default tokens of antd cannot meet the style requirements, you can flexibly extend your own theme system and freely consume it in CSS in JS;
  • 🏂 Smooth Migration from less: Need to migrate an old project? Using antd-style can smoothly migrate less in the project to CSS in JS at a lower cost, and provide a better user experience and development experience;
  • ☯️ Good Compatibility with Micro-Apps: Ant Design Style is compatible with qiankun micro-apps by default (but may sacrifice some performance). At the same time, it provides performance optimization options for scenarios that do not require micro-apps;
  • 📱 Easy Adaptation for Responsive Design: Ant Design Style will provide convenient utility functions for responsive applications, helping developers quickly complete responsive theme development;
  • 🪴 Stylish: Ant Design Style provides the ability to compose complex interactive styles through the combination of multiple atomic tokens, achieving a high degree of reusability;
  • 🌰 Documentation and Application Examples: Show various examples of components and applications using Ant Design Style, helping developers get started quickly. (This document is also built using Ant Design Style for styling)

Quick Start

Installation

It is recommended to install using pnpm

pnpm i antd-style -S

Typical Use Cases

Create Styles

import { createStyles } from 'antd-style';

const useStyles = createStyles(({ token, css }) => ({
  // Supports the writing style of css object
  container: {
    backgroundColor: token.colorBgLayout,
    borderRadius: token.borderRadiusLG,
    maxWidth: 400,
    width: '100%',
    height: 180,
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
    flexDirection: 'column',
    marginLeft: 'auto',
    marginRight: 'auto',
  },
  // Also supports obtaining the same writing experience as normal css through css string templates
  card: css`
    box-shadow: ${token.boxShadow};
    padding: ${token.padding}px;
    border-radius: ${token.borderRadius}px;
    color: ${token.colorTextTertiary};
    background: ${token.colorBgContainer};
    transition: all 100ms ${token.motionEaseInBack};

    margin-bottom: 8px;
    cursor: pointer;

    &:hover {
      color: ${token.colorTextSecondary};
      box-shadow: ${token.boxShadowSecondary};
    }
  `,
}));

export default () => {
  // The styles object in the useStyles method is cached by default, so there is no need to worry about re-rendering issues
  const { styles, cx, theme } = useStyles();

  return (
    // Use cx to organize className
    <div className={cx('a-simple-create-style-demo-classname', styles.container)}>
      <div className={styles.card}>createStyles Demo</div>
      {/* The theme object contains all token and theme information */}
      <div>Current theme mode: {theme.appearance}</div>
    </div>
  );
};

CHANGELOG

Details: CHANGELOG

License

MIT

changelog

Changelog

3.7.1 (2024-10-22)

🐛 Bug Fixes

3.7.1-beta.1 (2024-10-22)

🐛 Bug Fixes

3.7.0 (2024-09-28)

✨ Features

  • Remove @emotion/server to adapt SSR in edge runtime, closes #169 (3a6b86c)

3.7.0-beta.1 (2024-09-27)

✨ Features

  • Try to remove @emotion/server to suit SSR in edge runtime (a7d0394)

3.6.3 (2024-09-12)

🐛 Bug Fixes

  • Export the CSSObject type from incorrect package, closes #167 (85db0b3)

3.6.2 (2024-03-24)

🐛 Bug Fixes

  • Fix rerender with ThemeSwitcher (8669b88)

3.6.2-beta.1 (2024-03-24)

🐛 Bug Fixes

  • Fix rerender with ThemeSwitcher (8669b88)

3.6.1 (2023-12-08)

🐛 Bug Fixes

  • 兼容 createInstance 时自定义 prefixCls 的场景, closes #126 (61af366)

3.6.0 (2023-12-08)

✨ Features

  • Support iconPrefixCls and prefixCls on createStyles, closes #125 (f2e72a3)

3.5.2 (2023-11-08)

🐛 Bug Fixes

3.5.1 (2023-11-01)

🐛 Bug Fixes

  • Fix global undefined when using vite, closes #119 (1cc076d)

3.5.0 (2023-09-22)

✨ Features

3.5.0-beta.1 (2023-09-22)

✨ Features

3.4.7 (2023-09-20)

🐛 Bug Fixes

  • Add startTransition on callback function, closes #111 (1b502d1)

3.4.6 (2023-09-15)

🐛 Bug Fixes

  • Fix types due to father lock ts version, closes #109 (9bf726e)

3.4.5 (2023-09-04)

🐛 Bug Fixes

  • The MappingAlgorithm type doesn't exported, closes #103 (046ddd6)

3.4.4 (2023-08-09)

🐛 Bug Fixes

3.4.3 (2023-07-21)

🐛 Bug Fixes

  • Add linters props to StyleProvider, closes #82 (1d21bae)

3.4.2 (2023-07-20)

🐛 Bug Fixes

  • Emotion instance should use same cache, closes #80 (17f804e)

3.4.2-beta.1 (2023-07-20)

🐛 Bug Fixes

  • Emotion instance should use same cache, closes #80 (17f804e)

3.4.1 (2023-07-02)

🐛 Bug Fixes

  • 修正 prefixCls 在嵌套 ThemeProvider 中没有继承的问题, closes #78 (d939a2a)

3.4.1-beta.1 (2023-07-02)

🐛 Bug Fixes

  • 修正 prefixCls 在嵌套 ThemeProvider 中没有继承的问题 (4e5488a)

3.4.0 (2023-07-01)

✨ Features

3.4.0-alpha.1 (2023-07-01)

✨ Features

  • Babel 插件支持显示 key 前缀 (87ae9c4)

3.3.0 (2023-06-05)

✨ Features

  • support gen className by label (d28b19d), closes #62

3.2.3 (2023-06-04)

🐛 Bug Fixes

  • fix suspense error in ssr hydration (d4ce424), closes #61

3.3.0-beta.2 (2023-06-03)

✨ Features

  • CacheManager support delete method (b3b74e9)

🐛 Bug Fixes

  • fix suspense hydration with ssr (9f27b16)

3.3.0-beta.1 (2023-06-03)

✨ Features

  • CacheManager support delete method (595a5a6)

🐛 Bug Fixes

  • fix suspense hydration with ssr (ef61d10)

3.2.2 (2023-06-02)

🐛 Bug Fixes

  • fix ThemeProvider's children to non-required (3c13c7d), closes #58

3.2.1 (2023-05-29)

🐛 Bug Fixes

  • 修正 SSR 样式抽取失效的问题 (a1ba99a)

3.2.1-beta.1 (2023-05-29)

🐛 Bug Fixes

  • 修正 SSR 样式抽取失效的问题 (a1ba99a)

3.2.0 (2023-05-26)

✨ Features

  • add set method to useThemeMode hooks (0273f38), closes #57

3.2.0-beta.2 (2023-05-26)

🐛 Bug Fixes

3.2.0-beta.1 (2023-05-26)

✨ Features

  • add set method to useThemeMode hooks (0d65a9a)

3.1.1 (2023-05-15)

🐛 Bug Fixes

  • 修正 StyleProvider Props 类型不准确的问题 (38d9d34), closes #51

3.1.0 (2023-05-06)

✨ Features

  • 支持 StyleProvider container 与默认位置隔离的样式插入策略 (a51d72a)
  • 支持 StyleProvider 上指定 container 进行样式点插入 (6bdba25)

🐛 Bug Fixes

  • 修正 antd 组件 StyleProvider 的 container 插入位置属性丢失的问题 (d6de186), closes #46
  • 修正 createInstance 的 container 插入位置制定无效的问题 (c0b00c3), closes #47
  • 修正类型定义丢失问题的问题 (afd06b3)

3.1.0-beta.3 (2023-05-05)

✨ Features

  • 支持 StyleProvider container 与默认位置隔离的样式插入策略 (a51d72a)

3.1.0-beta.2 (2023-05-05)

🐛 Bug Fixes

  • 修正类型定义丢失问题的问题 (afd06b3)

3.1.0-beta.1 (2023-05-04)

✨ Features

  • 支持 StyleProvider 上指定 container 进行样式点插入 (6bdba25)

3.0.1-beta.1 (2023-04-23)

🐛 Bug Fixes

  • 修正 antd 组件 StyleProvider 的 container 插入位置属性丢失的问题 (d6de186), closes #46
  • 修正 createInstance 的 container 插入位置制定无效的问题 (c0b00c3), closes #47

3.0.0 (2023-04-04)

♻ Code Refactoring

  • 将 styled 语法替换回 @emotion/styled (4733e00)
  • 移除暴露的静态方法,通过回调接口实现实例的转发 (9b9e340)

✨ Features

  • antd stylish 模块实现 (86e1abb)
  • AppContainer 支持亮暗模式主题切换 (bfd9922)
  • createInstance 方法支持声明自定义 token 默认值 (4122038)
  • createStyles 入参支持 appearance 和 injectGlobal (0b1d947)
  • css 和 cx 对象从独立 instance 中导出 (d927630)
  • extractStaticStyle 提供 antd 的 ids 计数 (47254d3)
  • extractStaticStyle 支持传入 antdCache (d87ddde)
  • extractStaticStyle 支持抽取 antd 样式 (5d0d10c)
  • styled 方法底层实现替换为 styled-component 以默认支持组件选择器 (0ccbcaf)
  • useTheme 中增加 appearance 等主题状态属性 (6ce3b7d)
  • useThemeMode 支持获取当前浏览器主题模式 (a4e2e67)
  • 为 createStyles 添加 isDarkMode 入参 (ee1def0)
  • 为 ThemeProvider 增加主题切换的能力 (e15668a)
  • 为 ThemeProvider 补齐主题切换的能力 (52b68d5)
  • 优化 css-prefix key 为 acss 以减少样式类名体积 (d367033)
  • 优化 StyledProvider 实现逻辑并新增 useEmotion 的 hook (d9d8014)
  • 优化类型定义使用 (d4a57ae)
  • 使用 reactCss 替换 css 对象 (0b42a0a)
  • 初步支持响应式工具函数 (244162d)
  • 在各方法中新增 prefixCls 的参数 (33d23b4)
  • 实现 setupStyled (d66d50d)
  • 导出 sheet 对象,用于测试 qiankun 下样式会丢失的 bug (32f273e)
  • 将 extractStyle 改名为 extractStaticStyle ,与 antd cssinjs 的错开 (89f17dc)
  • 将 r 改名为 responsive (022c25b)
  • 将 stylish 的接口从 styled 方法中移除,二者并不兼容 (90809f9)
  • 将主题配置中的 antd 主题配置与算法导出供自定义时使用 (90a291d)
  • 提供 ssr 抽取方法 extractStyle (8d22e4a)
  • 提供全局 cache 列表存放样式缓存供 SSR 消费 (4777e1b)
  • 支持 useTheme 获取默认的主题变量 (a465bf4)
  • 支持使用 antd-style 的 StyleProvider 做 SSR (6c0b017)
  • 支持基于主题模式的风格定制 (3f5d2cb)
  • 支持嵌套 Provider 后还能获得准确的 theme 值 (8581665)
  • 新增 createInstance 方法,并用 createInstance 重构相关功能导出 (39a05ae)
  • 新增 StyledProvider 以新增多 emotion 实例的能力 (c4feb3b)
  • 新增 useResponse hooks (7e4f632)
  • 替换默认的 css 导出 (8124791)
  • 添加 staticInstanceConfig api 以支持静态实例的配置 (fdca322)
  • 添加 styled api,支持 styled 方法响应自定义 token (a152c33)
  • 移除 styled 的默认导出 (9ced0aa)
  • 移除 useEmotion 方法 (7f7a59e)
  • 移除若干无用 api 并调整样式表实例为 styleManager (8dafbc4)
  • 简化 ThemeProvider 注入 styled 的接口配置 (84f828c)
  • 经过讨论移除 AppContainer 容器组件,直接使用 antd 的 App 即可 (0ff52d3)
  • 自动监听浏览器主题能力兼容 ssr 场景 (283ca09)
  • 自定义增加一个 isDark 字段 (ac0fb23)
  • 调整 stylish 的实现逻辑 (1822b38)
  • 通过实际使用测试,移除 AppContainer 上的 globalStyle props (1d3ee08)

🐛 Bug Fixes

  • cache 设为可选项 (495cd78)
  • ThemeAppearance 字段支持自定义字符 (2bd7007)
  • 优化类型代码导出问题 (e1d4264)
  • 优化类型代码导出问题 (d3cf3ef)
  • 修正 @ant-design/cssinjs 作为 deps (912a59f)
  • 修正 antd theme 配置没有导出的问题 (a374437)
  • 修正 createGlobalStyle 类型找不到的问题 (64fda0f)
  • 修正 createInstance 的 ThemeProvider 会全量覆盖默认的自定义 token 问题 (9477630)
  • 修正 createStyles 的类型定义,避免无法正常跳转 (4bef457)
  • 修正 createStyles 类型不正确的问题 (bacdc0b)
  • 修正 CSS Object 和 CSS String 同时存在时的类型定义问题 (bd38764)
  • 修正 CSS Object 模式下的类型定义问题 (0521200)
  • 修正 cx 下 where 选择器不正常显示的问题 (a641ace)
  • 修正 GetCustom 相关方法类型没导出的问题 (db6727c)
  • 修正 matchBrowserPrefer 在 SSR 下无法正常使用的问题 (660a338)
  • 修正 message、notification 组件 prefix 不对的问题 (01380ee)
  • 修正 reactCss 构建产物判断逻辑问题 (a8288c2)
  • 修正 SSR 下 CacheManager 找不到的问题 (362723a)
  • 修正 styled 导出问题 (8141d78)
  • 修正 styled 类型导出的问题 (74551ed)
  • 修正 StyleProvider 的类型定义 (780bf91)
  • 修正 theme props 类型定义失效的问题 (2c3749c)
  • 修正 ThemeProvider 子组件类型定义问题 (3066b81)
  • 修正 vite 模式下 global 为 undefined 的问题 (d0a19ba)
  • 修正 withTheme 丢失的问题 (c032827)
  • 修正使用 styled ThemeProvider 后 useTheme 方法不响应自定义 token 的问题 (35d87a9)
  • 修正在添加 ThemeProvider 后 customToken 设定会丢失的问题 (936e43b)
  • 修正相关类型导出丢失的问题 (1cb24d9)
  • 修正类型定义 (8a7d053)
  • 修正类型定义不准确的问题 (d318382)
  • 修正类型定义不匹配的问题 (788a3ec)
  • 修正类型定义调整后 ()=>css 的使用方式类型定义不正确的问题 (823ea12)
  • 修正自定义 stylish 的问题 (61f195e)
  • 修正设定主题后仍然响应系统主题的 bug (b44be0c)
  • 将 emotion/server 的引入动态化 (9415799), closes #40
  • 尝试优化类型问题 (b6f2b62)
  • 尝试修正类型定义问题 (207019f)
  • 移除不需使用类型定义 (f9ee190)
  • 经过思考 create({ 单个 css obj }) 这个使用方式不合理,将其移出基础的类型定义对象中 (51ed579)
  • 经过讨论,移除 injectGlobal 在 createStyles 中的入参 (d6d2aaf)
  • 补回 CacheManager 类型 (b95093f)
  • 补回 injectGlobal 方法丢失的问题 (111bcc7)
  • 重构优化类型 (4472a2b)
  • 重构类型定义,使用入参更加准确 (6c94ae6)
  • 默认 cache-key 改为 css (a2b585a)

💥 BREAKING CHANGES

  • stylish 将不再能直接作为 className 使用,需要通过 css 包裹才能生效,将 stylish 的定位变得更加精准 —— 可复用的样式片段
  • useTheme 的默认返回值发生变动,默认返回 antd token 值
  • 不再计划默认支持组件选择器
  • 为了方便用户理解,将 r 改名为 responsive
  • 将 antd-style 中导出的 css 都替换为 @emotion/react 的 css,建立起 css -> styleObject 的心智。

原因:由于 emotion/css 的 css 只产出 className,因此无法做一些复杂操作,例如样式片段复用,需要替换为 react 的版本

  • 由于 emotion/react 版本的 styled 无法默认支持组件选择器。虽然可以用 babel-plugin 配置,但是太过于复杂,因此考虑直接替换为 styled-components
  • 移除 AppContainer
  • 移除 AppContainer 的 globalStyle props
  • 移除 styled.useTheme 的用法,需要调整为 styled.ThemeContext,且 styled 的 ThemeProvider 可以无需注入
  • 移除 useEmotion 方法,用户不应该感知内部实现的实例对象
  • 移除直接暴露的静态实例

3.0.0-beta.22 (2023-03-31)

🐛 Bug Fixes

  • 修正 createGlobalStyle 类型找不到的问题 (64fda0f)

3.0.0-beta.21 (2023-03-29)

🐛 Bug Fixes

  • 将 emotion/server 的引入动态化 (9415799), closes #40

3.0.0-beta.20 (2023-03-28)

🐛 Bug Fixes

  • 修正 @ant-design/cssinjs 作为 deps (912a59f)
  • 修正 vite 模式下 global 为 undefined 的问题 (d0a19ba)

3.0.0-beta.19 (2023-03-19)

✨ Features

  • extractStaticStyle 提供 antd 的 ids 计数 (47254d3)

3.0.0-beta.18 (2023-03-19)

✨ Features

  • extractStaticStyle 支持传入 antdCache (d87ddde)

3.0.0-beta.17 (2023-03-17)

🐛 Bug Fixes

3.0.0-beta.16 (2023-03-15)

🐛 Bug Fixes

  • 修正 StyleProvider 的类型定义 (780bf91)

3.0.0-beta.15 (2023-03-15)

✨ Features

  • extractStaticStyle 支持抽取 antd 样式 (5d0d10c)
  • 支持使用 antd-style 的 StyleProvider 做 SSR (6c0b017)

3.0.0-beta.14 (2023-03-15)

✨ Features

  • 将 extractStyle 改名为 extractStaticStyle ,与 antd cssinjs 的错开 (89f17dc)

3.0.0-beta.13 (2023-03-15)

✨ Features

  • 提供 ssr 抽取方法 extractStyle (8d22e4a)

3.0.0-beta.12 (2023-03-14)

🐛 Bug Fixes

  • 修正 matchBrowserPrefer 在 SSR 下无法正常使用的问题 (660a338)

3.0.0-beta.11 (2023-03-14)

✨ Features

  • useThemeMode 支持获取当前浏览器主题模式 (a4e2e67)

3.0.0-beta.10 (2023-03-01)

✨ Features

  • 优化 css-prefix key 为 acss 以减少样式类名体积 (d367033)

3.0.0-beta.9 (2023-03-01)

🐛 Bug Fixes

  • 修正使用 styled ThemeProvider 后 useTheme 方法不响应自定义 token 的问题 (35d87a9)

3.0.0-beta.8 (2023-02-26)

✨ Features

  • 简化 ThemeProvider 注入 styled 的接口配置 (84f828c)

💥 BREAKING CHANGES

  • 移除 styled.useTheme 的用法,需要调整为 styled.ThemeContext,且 styled 的 ThemeProvider 可以无需注入

3.0.0-beta.7 (2023-02-26)

✨ Features

  • 移除 useEmotion 方法 (7f7a59e)

🐛 Bug Fixes

  • 修正 createInstance 的 ThemeProvider 会全量覆盖默认的自定义 token 问题 (9477630)

💥 BREAKING CHANGES

  • 移除 useEmotion 方法,用户不应该感知内部实现的实例对象

3.0.0-beta.6 (2023-02-23)

🐛 Bug Fixes

  • 补回 CacheManager 类型 (b95093f)

3.0.0-beta.5 (2023-02-23)

🐛 Bug Fixes

  • 修正 SSR 下 CacheManager 找不到的问题 (362723a)

3.0.0-beta.4 (2023-02-23)

3.0.0-beta.3 (2023-02-23)

✨ Features

  • 提供全局 cache 列表存放样式缓存供 SSR 消费 (4777e1b)

🐛 Bug Fixes

  • 默认 cache-key 改为 css (a2b585a)

3.0.0-beta.2 (2023-02-19)

✨ Features

  • 移除 styled 的默认导出 (9ced0aa)

3.0.0-beta.1 (2023-02-19)

✨ Features

  • 支持 antd stylish 模块实现 (86e1abb)
  • createInstance 方法支持声明自定义 token 默认值 (4122038)
  • createStyles 入参支持 appearance 和 injectGlobal (0b1d947)
  • 为 ThemeProvider 增加主题切换的能力 (e15668a)
  • 将 r 改名为 responsive (022c25b)
  • 将 stylish 的接口从 styled 方法中移除,二者并不兼容 (90809f9)
  • 将主题配置中的 antd 主题配置与算法导出供自定义时使用 (90a291d)
  • 支持 useTheme 获取默认的主题变量 (a465bf4)
  • 支持基于主题模式的风格定制 (3f5d2cb)
  • 支持嵌套 Provider 后还能获得准确的 theme 值 (8581665)
  • 新增 createInstance 方法,并用 createInstance 重构相关功能导出 (39a05ae)
  • 新增 StyledProvider 以新增多 emotion 实例的能力 (c4feb3b)
  • 新增 useResponse hooks (7e4f632)
  • 替换默认的 css 导出 (8124791)
  • 添加 staticInstanceConfig api 以支持静态实例的配置 (fdca322)
  • 添加 styled api,支持 styled 方法响应自定义 token (a152c33)
  • 移除若干无用 api 并调整样式表实例为 styleManager (8dafbc4)
  • 经过讨论移除 AppContainer 容器组件,直接使用 antd 的 App 即可 (0ff52d3)
  • 自动监听浏览器主题能力兼容 ssr 场景 (283ca09)
  • 自定义增加一个 isDark 字段 (ac0fb23)
  • 调整 stylish 的实现逻辑 (1822b38)
  • 通过实际使用测试,移除 AppContainer 上的 globalStyle props (1d3ee08)

🐛 Bug Fixes

  • ThemeAppearance 字段支持自定义字符 (2bd7007)
  • 优化类型代码导出问题 (e1d4264)
  • 优化类型代码导出问题 (d3cf3ef)
  • 修正 antd theme 配置没有导出的问题 (a374437)
  • 修正 createStyles 的类型定义,避免无法正常跳转 (4bef457)
  • 修正 createStyles 类型不正确的问题 (bacdc0b)
  • 修正 CSS Object 和 CSS String 同时存在时的类型定义问题 (bd38764)
  • 修正 CSS Object 模式下的类型定义问题 (0521200)
  • 修正 cx 下 where 选择器不正常显示的问题 (a641ace)
  • 修正 GetCustom 相关方法类型没导出的问题 (db6727c)
  • 修正 message、notification 组件 prefix 不对的问题 (01380ee)
  • 修正 reactCss 构建产物判断逻辑问题 (a8288c2)
  • 修正 styled 导出问题 (8141d78)
  • 修正 styled 类型导出的问题 (74551ed)
  • 修正 theme props 类型定义失效的问题 (2c3749c)
  • 修正 ThemeProvider 子组件类型定义问题 (3066b81)
  • 修正 withTheme 丢失的问题 (c032827)
  • 修正在添加 ThemeProvider 后 customToken 设定会丢失的问题 (936e43b)
  • 修正相关类型导出丢失的问题 (1cb24d9)
  • 修正类型定义 (8a7d053)
  • 修正类型定义不准确的问题 (d318382)
  • 修正类型定义不匹配的问题 (788a3ec)
  • 修正类型定义调整后 ()=>css 的使用方式类型定义不正确的问题 (823ea12)
  • 修正自定义 stylish 的问题 (61f195e)
  • 修正设定主题后仍然响应系统主题的 bug (b44be0c)
  • 尝试优化类型问题 (b6f2b62)
  • 尝试修正类型定义问题 (207019f)

💥 BREAKING CHANGES

  • stylish 将不再能直接作为 className 使用,需要通过 cx 包裹才能生效,将 stylish 的定位变得更加精准 —— 可复用的样式片段
  • useTheme 的默认返回值发生变动,默认返回 antd token 值
  • 不再计划默认支持组件选择器
  • 为了方便用户理解,将 r 改名为 responsive
  • 将 antd-style 中导出的 css 都替换为 serializeStyles,建立起 css -> styleObject 的心智。
  • 移除 AppContainer
  • 移除直接暴露的静态实例