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

✨ Master CSS Parent Combinator #234

Open
1aron opened this issue Jun 15, 2023 · 0 comments
Open

✨ Master CSS Parent Combinator #234

1aron opened this issue Jun 15, 2023 · 0 comments
Milestone

Comments

@1aron
Copy link
Member

1aron commented Jun 15, 2023

Description

Suppose there is an SVG to be filled with black when the parent button is disabled.

<button disabled>
    <svg>...</svg>
</button>

Current

Reactive Syntax

<button disabled>
    <svg class="[disabled]>{fill:black}">...</svg>
</button>

Generated CSS:

[disabled]>.\[disabled\]\>\{fill\:black\} {
    fill: #000000
}

Expect

Parent Combinator

<button disabled>
    <svg class="fill:black<[disabled]">...</svg>
</button>

Generated CSS:

[disabled]>.\{fill\:black\}\<\[disabled\] {
    fill: #000000
}

There is a child combinator > in native CSS, but there has been no syntax for selecting the parent.

But now, using the syntactic features of Master CSS, it is easy to create parent combinators <.

@1aron 1aron added the css label Jun 15, 2023
@1aron 1aron added this to the Master CSS 2.X milestone Jun 15, 2023
@1aron 1aron unassigned 1aron and BenSeage Jul 23, 2023
@1aron 1aron removed the css label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants