Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

theme editor #840

Open
mydearxym opened this issue Sep 23, 2020 · 0 comments
Open

theme editor #840

mydearxym opened this issue Sep 23, 2020 · 0 comments
Assignees
Labels

Comments

@mydearxym
Copy link
Member

mydearxym commented Sep 23, 2020

use css-variable in styled-component

image

then we can let user to edit those css-variables in bowser, export the data as a theme skin

Get/Set css-variable in javascript

// get
getComputedStyle(document.documentElement)
    .getPropertyValue('--theme-hello')

// set
document.documentElement.style
    .setProperty('--theme-hello', 'pink');
@mydearxym mydearxym self-assigned this Sep 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant