RepositoryHTMLUSUnited States
LE

leeoniya/dropcss

An exceptionally fast, thorough and tiny unused-CSS cleaner

2.1kstars
64forks
12issues
2views

🗑 DropCSS: Dọn CSS thừa siêu nhanh, chỉ giữ lại phần cần dùng

DropCSS — unused-CSS cleaner nhanh, đầy đủ, nhỏ gọn (~10KB).

DropCSS là một công cụ mã nguồn mở (MIT License) giúp loại bỏ CSS không sử dụng trong HTML. Nó nhận đầu vào là HTML và CSS, sau đó trả về chỉ những đoạn CSS thực sự được dùng. Với bộ parser HTML và CSS tối ưu riêng, DropCSS hoạt động rất nhanh nhưng vẫn giữ độ chính xác cao. Yêu cầu đầu vào phải là HTML/CSS hợp lệ, không tự động xử lý markup bị lỗi.

✨ Điểm nổi bật

  • Hỗ trợ đầy đủ selector: universal, tag, id, class, descendant, child, sibling, attribute, positional, :not()
  • Giữ lại pseudo-class/phần tử: :hover, ::before... không thể kiểm tra tĩnh từ HTML
  • Xóa @font-face và @keyframes không dùng tới
  • Xóa biến CSS thừa và giải quyết biến phức tạp (var lồng nhau)
  • Rất nhỏ gọn: chỉ ~10KB minified
  • Tốc độ cực nhanh: được tối ưu cho trường hợp dùng phổ biến
  • Hook shouldDrop linh hoạt: tùy chỉnh giữ/xóa selector

💡 Vì sao đáng chú ý

DropCSS nhanh hơn các công cụ tương tự như PurifyCSS hay PurgeCSS ở một số benchmark nhờ parser tùy biến. Phù hợp cho build pipeline, CI/CD, hoặc dọn CSS sau khi bundle. Không xử lý markup lỗi nên cần chắc chắn HTML/CSS hợp lệ trước khi chạy.


#CSS #Optimization #UnusedCSS #WebPerformance #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryJavaScript
remarkjs/strip-markdown

plugin remove markdown formatting

173
Oct 22, 2024
RepositoryMDX
twbs/bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

175.0k
Oct 26, 2026
RepositoryJavaScript
Chalarangelo/30-seconds-of-code

Coding articles to level up your development skills

129.3k
Oct 20, 2026
RepositoryC++
electron/electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

123.6k
Oct 27, 2026
RepositoryHTML
you-dont-need/You-Dont-Need-JavaScript

CSS is powerful, you can do a lot of things without JS.

20.6k
Dec 4, 2025
RepositoryHTML
federico-busato/Modern-CPP-Programming

Modern C++ Programming Course (C++03/11/14/17/20/23/26)

16.3k
Apr 19, 2026
RepositoryHTML
adityatelange/hugo-PaperMod

A fast, clean, responsive Hugo theme.

14.0k
Oct 25, 2026
RepositoryHTML
kmario23/deep-learning-drizzle

Drench yourself in Deep Learning, Reinforcement Learning, Machine Learning, Computer Vision, and NLP by learning from these exciting lectures!!

13.0k
Aug 22, 2026
RepositoryHTML
munificent/game-programming-patterns

Source repo for the book

4.6k
Jul 21, 2024