question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom themes support

See original GitHub issue

We use windicss in our project (and love it), and would like to add a high contrast theme. There’s currently support for the dark theme, but would it be possible to add a custom theme in windicss’s config file? Then do something like:

<button class=“bg-green-400 dark:bg-green-500 high-contrast:bg-green-600”>My button with high contrast support</button>

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
IgnisDacommented, Aug 22, 2021

Proposed API

export default defineConfig({
  darkMode: 'class', // deprecate this in v4 (or not if we want to maintain compatibility with tailwind)
  colorSchemes: {
    dark: 'media', // possible values are same as `darkMode` above
    'high-contrast': true, // possible values would be `true` or `false`
    'neon': false
    // and so on
  }
})

I propose that this be the new API to add more color schemes to the configuration.

Would this be fine?

/cc @alexanderniebuhr @antfu

2reactions
alexanderniebuhrcommented, Aug 24, 2021

@IgnisDa haven’t got any feedback of the rest of the team. Probably not deprecating the darkMode field would be better. But otherwise the proposal looks good for me. I think you can make a PR and then post your RFC in there, you might expect to get some questions and change the API. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theme Support | Block Editor Handbook
The new Blocks include baseline support in all themes, enhancements to opt-in to and the ability to extend and customize.
Read more >
Theme support - Shopify Help Center
While Shopify doesn't support extensive or advanced theme customizations, there are several other support resources available. Forum to discuss theme designs.
Read more >
Generate Theme Support Function - GenerateWP
Theme Support Generator. Use this tool to create custom code for Theme Features with add_theme_support() function. Fill in the user-friendly form. Click the...
Read more >
20 Add Theme Support Custom Background - YouTube
How to add custom background in wordpress theme developmentAdvanced WordPress Theme Development | Wordpress theme development ...
Read more >
Customizing your help center theme - Zendesk help
Custom themes are not supported by Zendesk and are not automatically updated when new features are released (see About standard themes and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found