File splitting trong CSS là gì?
File splitting trong CSS là gì?
File splitting là chia CSS thành nhiều file nhỏ theo chức năng/ component để dễ bảo trì, thay vì một file khổng lồ.
styles/
base/ reset.css, typography.css, variables.css
layout/ grid.css, header.css, footer.css
components/ button.css, card.css, modal.css
pages/ home.css, checkout.css
utilities/ spacing.css, helpers.css
Kiến trúc: ITCSS, SMACSS, BEM, Atomic CSS, CSS Modules/ CSS-in-JS theo component.
@use/@forward, Less) hoặc PostCSS gộp thành một file khi build.Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.