Code Monkey home page Code Monkey logo

Comments (8)

deadcoder0904 avatar deadcoder0904 commented on July 24, 2024 1

Firefox Quantum latest v67.0.4 (64-bit). Sucks tho.

from theme-ui.

jxnblk avatar jxnblk commented on July 24, 2024

This is a limitation with how storing the values in localStorage (which happens client-side) and building static HTML at build time work. The side uses the Gatsby Plugin to attempt to minimize the flash of styles, but it would be nice to have a better solution. If you're noticing it on the live theme-ui.com, it'd be helpful to know what browser you're using for debugging

from theme-ui.

MarkosKon avatar MarkosKon commented on July 24, 2024

I notice the flash in theme-ui.com but for every other component other than body. I'm using Chrome 75.0.3770.100.

This is to be expected though, if I understand the code correctly:

from theme-ui.

jxnblk avatar jxnblk commented on July 24, 2024

@MarkosKon thanks! And yes, currently, the flash prevention code only handles body text and background colors

from theme-ui.

MarkosKon avatar MarkosKon commented on July 24, 2024

By the way, as a workaround you can use CSS variables. I created an example.

Points of interest:

Does it make sense to alter the theme-ui code to generate the CSS variables automatically from the theme object?

from theme-ui.

jxnblk avatar jxnblk commented on July 24, 2024

I started an implementation that would work similarly, but also note that custom properties aren’t supported in IE 11 – ideally all colors could handled but this started with only text and background colors to flesh out the basic implementation

from theme-ui.

jxnblk avatar jxnblk commented on July 24, 2024

Since Theme UI uses CSS custom properties now, this is less of an issue, so closing this issue out

from theme-ui.

deadcoder0904 avatar deadcoder0904 commented on July 24, 2024

@jxnblk now it's great. 1 gotcha tho - the theme name is inconsistent now for a second when u refresh after selecting different them than light.

from theme-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.