From 10ad3a0fbdb00e1283f4016553587f1f1f4118c0 Mon Sep 17 00:00:00 2001 From: Conway Anderson Date: Tue, 21 Mar 2017 00:39:37 -0700 Subject: [PATCH] Clarity update for customize-theme.en-US.md (#5411) First attempt at making the docs for the recommended form of theme customization more specific. The goal is to make this section more accessible to beginners. --- docs/react/customize-theme.en-US.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/react/customize-theme.en-US.md b/docs/react/customize-theme.en-US.md index 187ab5cc01..52461cb968 100644 --- a/docs/react/customize-theme.en-US.md +++ b/docs/react/customize-theme.en-US.md @@ -39,8 +39,9 @@ This approach is available only when using [antd-init](https://github.com/ant-de Note: -- Importing style from less files is necessary. Please specify `style` option of `babel-plugin-import` to be `true`. -- You should write `theme` field in [.roadhogrc](https://github.com/dvajs/dva-example-user-dashboard/commit/d6da33b3a6e18eb7f003752a4b00b5a660747c31) rather then `package.json` when using `dva-cli@0.7.0+`. +- Importing style from less files is necessary. Here's an example if you're using the `antd-demo` from [getting started](/docs/react/getting-started): in `index.js`, replace `import './index.css'` with `import 'antd/dist/antd.less'` +- Please specify the `style` option of `babel-plugin-import` to be `true`, instead of `css`. This is required for importing the `less` version of antd. This can be done in `webpack.config.js`. +- When using `dva-cli@0.7.0+`, you should add the `theme` block to [.roadhogrc](https://github.com/dvajs/dva-example-user-dashboard/commit/d6da33b3a6e18eb7f003752a4b00b5a660747c31) instead of `package.json`. - If you want to override `@icon-url`, the quotes must be contained in value like `"@icon-url": "'your-icon-font-path'"` ([A fix sample](https://github.com/visvadw/dvajs-user-dashboard/pull/2)). ### 2) Overriding Less variables (alternative way)