foundry-ironsworn
foundry-ironsworn copied to clipboard
migrate from LESS to SCSS (via PostCSS)
SCSS has better tooling, including better Stylelint support (which would be really helpful in taming all the CSS we have). It's also more extensible, and has some exciting plugins (like chroma.js support, and support for advanced colour spaces). Functionally speaking, I don't know of anything we'd lose if we made the switch.
This is also a good opportunity to migrate the pre-processor to PostCSS's SASS plugin, so that all CSS transforms are being managed in one place and we have finer control over what order they fire in.
- [x] run script to migrate
*.less
files: https://github.com/debba/less2scss - [x] finish cleanup of script results
- [x] finish migrating
*.vue
files - [x] set up basic stylelint configuration
- [x] lint everything (where practical)
- [x] enforce style conventions
update on this:
- the migration close to done and theoretically could be merged, but...
- in my other projects i'm working on are using 100% PostCSS (with plugins to polyfill e.g. CSS draft nesting, and relying on CSS modules for composition)
- the above works pretty well for tooling with e.g. stylelint so far (might have more to do with me becoming more familiar with the whole, like, ecosystem there)
- i've been playing with @adobe/leonardo (specifically its
leonardo-color-contrast
package) some, which could manage a lot of the nuts and bolts of color interpolation themes. its TS support is presently broken, but i've got an open PR for that https://github.com/adobe/leonardo/pull/207
in the interest of only having to do this stuff once, it might be better to go straight to a PostCSS instead of bothering with SASS at all. which means more work for me right now but less work for everyone long term. i'm going to open a branch based on the SASS migration branch to explore this.