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

Gold Nouveau theme dark enhancements not working as expected in v2 #1893

Closed
endigo9740 opened this issue Aug 17, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@endigo9740
Copy link
Contributor

Current Behavior

This theme operates differently than other themes. We've now moved the .dark mode overrides to enhancement styles. But there may be a situation where users don't need or want to use enhancements. We may need to adjust the way themes operate to handle this, or perhaps update the theme itself.

Expected Behavior

Whether enhancement is enabled or not, the base style should apply as expected in light/dark mode

Steps To Reproduce

No response

Link to Reproduction / Stackblitz

No response

More Information

No response

@endigo9740 endigo9740 added the bug Something isn't working label Aug 17, 2023
@endigo9740
Copy link
Contributor Author

endigo9740 commented Aug 17, 2023

Discussed this with @AdrianGonz97 on Discord. Here's the proposal we've come up with - though I welcome more input or ideas...

The idea here is we created a .dark data-theme['theme-name'] selector against the properties_dark values. This allows for dark-mode only overrides, but does not require the use of enhancements:

import type { Theme } from './index.js';

const skeleton = {
    // base
    properties: {
        '--color-primary-50': '219 245 236',
        '--color-primary-100': '207 241 230',
        '--color-primary-200': '195 238 224',
    },
    // dark theme only (optional)
    properties_dark: {
        '--color-primary-50': '219 245 236',
        '--color-primary-100': '207 241 230',
        '--color-primary-200': '195 238 224',
    },
    enhancements: { ... }
} satisfies Theme;

export default skeleton;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants