riptano / docs-ui

The UI and theme for DataStax Docs.
https://riptano.github.io/docs-ui/
Mozilla Public License 2.0
2 stars 0 forks source link

Preload fonts + real theme flicker fix + mixins for theme + deps updates + nvm update #8

Closed colegoldsmith closed 11 months ago

colegoldsmith commented 11 months ago

Preloading fonts

Adding a head to tell the browser to preload our fonts. This fixes the FOUT issue

Real theme flicker fix

By adding the script which adds the data-theme to the html tag to the head section, it runs before the content is rendered and avoids the flicker.

Mixins for theme

Instead of repeating the theme variables for the prefers theme and html[data-theme] we can use a mixin to write it once

Deps updates

I found updating the postcss-custom-variables to work better, but required an npm upgrade. While doing so I upgraded the rest of the postcss deps

Nvm update

Since one of our upgraded deps required an npm upgrade I changed the nvm to match the datastax-docs-site repo