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

Increased specificity on selector/baseSelector #17

Open
mbaird4 opened this issue Aug 26, 2021 · 0 comments
Open

Increased specificity on selector/baseSelector #17

mbaird4 opened this issue Aug 26, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@mbaird4
Copy link

mbaird4 commented Aug 26, 2021

More of a question than an issue:

Is it possible to somehow make the selectors more flexible? By passing an array to selector, or so that the selectors don't attach to baseSelector? I've got a kind of complex set up where certain components always need the dark theme, while others always need the light theme (and then a page that the user can choose which theme they want), so the current functionality doesn't really work for me. I need something that could basically do the following:

dark theme applies to body[data-theme="dark"]
light theme applies to body[data-theme="light"], body[data-theme="dark"] .some-light-component

button {
	@apply light:bg-red dark:bg-blue;
}
<body data-theme="dark">
    <div class="some-light-component">
        <!-- button is red -->
        <button></button>
    </div>
</body>

<body data-theme="light">
    <!-- button is red -->
    <button></button>
</body>
    
<body data-theme="dark">
    <!-- button is blue -->
    <button></button>
</body>

Thanks in advance, and thanks for the great work on this project.

@JNavith JNavith added the enhancement New feature or request label Aug 27, 2021
@JNavith JNavith self-assigned this Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants