mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-29 18:57:36 +08:00
Theme: add theme-preview
This commit is contained in:
parent
3e2f7bac8e
commit
13f114200c
@ -29,6 +29,7 @@
|
||||
- [awesome-element](https://github.com/ElementUI/awesome-element)
|
||||
- [FAQ](./FAQ.md)
|
||||
- [Customize Theme](http://element.eleme.io/#/en-US/component/custom-theme)
|
||||
- [Preview and generate theme online](https://elementui.github.io/theme-preview)
|
||||
- Starter Kit
|
||||
- [element-starter](https://github.com/ElementUI/element-starter)
|
||||
- [element-cooking-starter](https://github.com/ElementUI/element-cooking-starter)
|
||||
|
@ -1,5 +1,15 @@
|
||||
## Custom theme
|
||||
Element uses BEM-styled CSS so that you can override styles easily. But if you need to replace styles at a large scale, e.g. change the theme color from blue to orange or green, maybe overriding them one by one is not a good idea, and this is where our theme customization tool kicks in.
|
||||
Element uses BEM-styled CSS so that you can override styles easily. But if you need to replace styles at a large scale, e.g. change the theme color from blue to orange or green, maybe overriding them one by one is not a good idea, and this is where our theme customization tools kick in.
|
||||
|
||||
## Changing theme color
|
||||
If you just want to change the theme color of Element, the [theme preview website](https://elementui.github.io/theme-preview/#/en-US) is recommended.
|
||||
|
||||
The main color of Element is bright and friendly blue. By changing it, you can make Element more visually connected to specific projects.
|
||||
|
||||
The above website enables you to preview theme of a new theme color in real-time, and it can generate a complete style package based on the new theme color for you to download directly (to import new style files in your project, please refer to the 'Import custom theme' or 'Import component theme on demand' part of this section).
|
||||
|
||||
## More customizations
|
||||
If you need more customization than just changing the theme color, please follow these steps:
|
||||
|
||||
### Install related tool
|
||||
First install the theme generator globally or locally. Local install is recommended because in this way, when others clone your project, npm will automatically install it for them.
|
||||
|
@ -1,5 +1,17 @@
|
||||
## 自定义主题
|
||||
Element 默认提供一套主题,CSS 命名采用 BEM 的风格方便使用者覆盖样式。如果你想完全替换主题色或者部分样式,可以使用下面方法。
|
||||
Element 默认提供一套主题,CSS 命名采用 BEM 的风格方便使用者覆盖样式。如果你想完全替换主题色或者部分样式,可以使用下面的方法。
|
||||
|
||||
## 仅替换主题色
|
||||
如果仅希望更换 Element 的主题色,推荐使用[在线主题生成工具](https://elementui.github.io/theme-preview)。
|
||||
|
||||
Element 默认的主题色是鲜艳、友好的蓝色。通过替换主题色,能够让 Element 的视觉更加符合具体项目的定位。
|
||||
|
||||
使用上述工具,可以很方便地实时预览主题色改变之后的视觉,同时它还可以基于新的主题色生成完整的样式文件包,供直接下载使用(关于如何使用下载的主题包,请参考本节「引入自定义主题」和「搭配插件按需引入组件主题」部分)。
|
||||
|
||||
如果希望进行除主题色之外的样式定制,请继续阅读。
|
||||
|
||||
## 深层次的定制
|
||||
如果仅仅改变主题色不能满足你的需求,请按以下步骤进行更深层次的主题定制:
|
||||
|
||||
### 安装工具
|
||||
首先安装「主题生成工具」,可以全局安装或者安装在当前项目下,推荐安装在项目里,方便别人 clone 项目时能直接安装依赖并启动,这里以全局安装做演示。
|
||||
|
Loading…
Reference in New Issue
Block a user