Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start using CSS variables in place of Sass #743

Merged
merged 7 commits into from
Apr 5, 2024
Merged

Conversation

alexwlchan
Copy link
Owner

My Sass is a bit of a mess: I support custom colours per page, plus dark mode, plus a bunch of complexity I've built around the Sass preprocessor. The result is that it's hard to find where CSS stuff is defined and it's often split across multiple files. Yuck!

It's 2024. CSS variables are in 97.47% of browsers. They make a lot of this stuff much easier, so I should use them. (And if you're running a super old browser, you'll get the default colours and/or sans-CSS styling, which should still be fine, given I'm using a lot of semantic HTML.)

This patch takes the first step in that direction:

  • It moves some of the global colours into CSS variables
  • It introduces a components namespace for SCSS files, to make stuff easier to find
  • It starts to consolidate _settings.scss/variables.scss, which is a remnant of a long-ago refactor

For #741

@alexwlchan alexwlchan merged commit e2cb90d into main Apr 5, 2024
2 checks passed
@alexwlchan alexwlchan deleted the use-css-variables branch April 5, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant