ElemeFE / ElemeFE/element

[Bug Report] Importing SCSS style results in duplicated styles

Open
#21,460 1 comment 4 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.15.6

### OS/Browsers version
macOS Big Sur 11.6

### Vue version
2.6.14

### Reproduction Link
https://codesandbox.io/s/patient-lake-9ohxy

### Steps to reproduce
1. Import Element SCSS following instructions in https://element.eleme.io/#/en-US/component/custom-theme#update-scss-variables-in-your-project
2. Inspect compiled CSS (printed on screen in reproduction link)

### What is Expected?
Each css rule appears only once

### What is actually happening?
Many CSS rules appear duplicated (some appear 11 times! See e.g. ".el-textarea {")

This probably happens because the smaller files are imported multiple times in different components. For example, "input.scss" is imported both in "index.scss" and "select.scss", leading to duplication

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.