WordPress / wporg-parent-2021

18 stars 10 forks source link

Remove Sass #1

Open iandunn opened 2 years ago

iandunn commented 2 years ago

ideally, the theme would use postcss like wporg-mu-plugins does.

xref https://github.com/WordPress/wporg-mu-plugins/pull/6#pullrequestreview-760297312

the sooner we do it, the easier it'll be, but i'm also leery of getting bogged down in non-essentials right now 🤔

8270ecd1f04223c53a9ffcc6a81fa118f5ba8a09 added %footer-archive-dark, %local-header-off-white, etc. If PostCSS doesn't have a similar concept, we might be able to convert them to regular classes, and have the templates add the class, but that would rely on https://github.com/WordPress/gutenberg/issues/32939

we currently import some mixins, breakpoints, etc from gutenberg's sass. i'm not sure a good solution for that

there may be a tool that'll convert most sass to postcss automatically

ryelle commented 2 years ago

Does this issue mean to remove Sass entirely? What would be the benefit to that? Most of the issues with complexity were fixed in the CSS refactor, and we're still using Sass features like mixins and extends.

iandunn commented 2 years ago

Originally we planned on using PostCSS for the project; using SASS was just an artifact of BlockBase.

Using PostCSS would make it consistent w/ the global header and be more modern.

Integrating w/ Gutenberg dependencies might be tricky though.

ryelle commented 2 years ago

I'm going to transfer this issue over to the parent theme repo — i think removing Sass from that theme & future children will be easier than trying to remove it from here, where we're so tied in to mixins & extends (we can always reconsider the idea if/when we make News a proper child of that parent).