website icon indicating copy to clipboard operation
website copied to clipboard

Exstylus

Open simeydk opened this issue 3 years ago • 4 comments

This PR removes stylus as requested in #670.

At present it does to by resolving all stylus variables in-place. Alternatively I could refactor this into CSS custom properties?

Is this what you had in mind? or would you prefer the CSS to be structured differently?

simeydk avatar Mar 24 '22 20:03 simeydk

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/wesbos/Syntax/CREcaHg4NT4yXvVPqC7n33z9vU5P
✅ Preview: https://syntax-git-fork-simeydk-exstylus-wesbos.vercel.app

vercel[bot] avatar Mar 24 '22 20:03 vercel[bot]

thanks a ton! I think we want to at least keep the nesting and variables. CSS doesn't have nesting, but perhaps some sort of plugin?

wesbos avatar Mar 24 '22 21:03 wesbos

OK I'll give it a go. Is this the kind of plugin you had in mind? https://github.com/postcss/postcss-nested

simeydk avatar Mar 24 '22 21:03 simeydk

OK I've given it another go.

  • This time it's still got the variables, but as CSS variables.
  • The only snag is that the colour functions (ligthen() and darken()) don't work, so I hardcoded their values in the variables file
  • I added the postcss-nested plugin to achieve nesting, but otherwise it's standard CSS now
  • I also moved the head stuff from _document.js to _app.js, as requested in #675

Let me know if you're happy with this or have any issues

simeydk avatar Mar 25 '22 19:03 simeydk