facebook / facebook/docusaurus

Ensure proper and stable CSS insertion ordering

Đang mở
#3,678 19 bình luận 2 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
TypeScript
Star
66.2k
Fork
10k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
52

Mô tả

Edit: this issue is now about ensuring that we have a properly specified CSS insertion ordering with the ability to prevent regressions.

For Docusaurus 2.0 (https://github.com/facebook/docusaurus/issues/6113), CSS insertion ordering should become stable and documented. Upgrading Docusaurus should not lead to a different CSS ordering in particular for user-provided custom CSS.

See also https://github.com/facebook/docusaurus/pull/5987#issuecomment-975307942

---

Original bug report below:

## 🐛 Bug Report

During a little refactoring, I realized that the custom CSS files content is **not** at the end of final CSS file `styles.css` (as it expected). This makes it impossible to override the Docusaurus component styles without applying the `!important` rule (which in turn is bad practice).

@slorber could you please investigate this issue? Can we "force" the custom CSS content to be at the end of all other styles?

By the example of Docusaurus website you can see that custom CSS is somewhere in the middle of bundled CSS file.

![image](https://user-images.githubusercontent.com/4408379/97970313-659c1e80-1dd2-11eb-8c15-a2bb3875e502.png)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.