This repository was archived by the owner on May 11, 2020. It is now read-only.
File tree 4 files changed +2
-10
lines changed
4 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,10 @@ We are using [Less](http://lesscss.org/) as the development language for styling
17
17
18
18
Run ` ng add ng-zorro-antd --theme ` ,then modified the file ` src/theme.less ` .
19
19
20
- > Note: ` ng add ng-zorro-antd --theme ` will [ downgrade] ( https://github.com/angular/angular-cli/issues/10430 ) the version of ` less ` to ` 2.7 ` .
21
-
22
20
### Without schematics
23
21
24
22
Create a standalone less file named ` theme.less ` in ` src ` folder, and add the path of it to the list of ` styles ` in ` angular.json ` file.
25
23
26
- > Note: You have to [ downgrade] ( https://github.com/angular/angular-cli/issues/10430 ) the version of ` less ` to ` 2.7 ` .
27
-
28
24
``` json
29
25
...
30
26
"styles" : [
Original file line number Diff line number Diff line change @@ -16,14 +16,10 @@ Ant Design 的样式使用了 [Less](http://lesscss.org/) 作为开发语言,
16
16
17
17
在初始化项目时 ` ng add ng-zorro-antd --theme ` 即可自动配置好自定义主题的相关文件,修改 ` src/theme.less ` 文件内容就可以自定义主题。
18
18
19
- > 注意:使用 ` ng add ng-zorro-antd --theme ` 时会[ 自动] ( https://github.com/angular/angular-cli/issues/10430 ) 降级 ` less ` 到 ` 2.7 ` 版本
20
-
21
19
### 手动修改
22
20
23
21
在 ` src ` 目录下建立一个单独的 ` theme.less ` 文件,在 ` angular.json ` 文件的 ` styles ` 列表加入该文件
24
22
25
- > 注意:由于 ` less ` 在 ` 3.0 ` 以上版本默认禁用了 ` javascriptEnabled ` ,需要手动降级 ` less ` 到 ` 2.7 ` 版本
26
-
27
23
``` json
28
24
...
29
25
"styles" : [
Original file line number Diff line number Diff line change 80
80
"karma-coverage-istanbul-reporter" : " ~1.4.2" ,
81
81
"karma-jasmine" : " ~1.1.1" ,
82
82
"karma-jasmine-html-reporter" : " ^0.2.2" ,
83
- "less" : " ^2.7.3 " ,
83
+ "less" : " ^3.0.0 " ,
84
84
"less-plugin-clean-css" : " ^1.5.1" ,
85
85
"marked" : " ^0.3.6" ,
86
86
"ng-packagr" : " ^4.0.0" ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import { Schema } from './schema';
21
21
import schematicsFixIcon from '../fix-icon/index' ;
22
22
23
23
const ADD_CONFIG = {
24
- LESS_VERSION : '^2.7.3 ' ,
24
+ LESS_VERSION : '^3.0.0 ' ,
25
25
CUSTOM_THEME_PATH : 'src/theme.less' ,
26
26
COMPILED_THEME_PATH : 'node_modules/ng-zorro-antd/ng-zorro-antd.min.css' ,
27
27
BOOT_PAGE_PATH : 'src/app/app.component.html' ,
You can’t perform that action at this time.
0 commit comments