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

Limit Globs effect in one step and prevent inheritance #2329

Open
abraverm opened this issue Feb 4, 2025 · 0 comments
Open

Limit Globs effect in one step and prevent inheritance #2329

abraverm opened this issue Feb 4, 2025 · 0 comments

Comments

@abraverm
Copy link

abraverm commented Feb 4, 2025

In steps, when glob is applied, it is inherited to the following step:

steps: {
  1: {
    **: {
      style.fill: green
     }
     x: green
   } 
   2: {
   # every container becomes green
   }
}

Step 2 should inherit the "compiled" version of (1) rather than the definition.
Definitely some benefit current behaviour, but for them it is easy to re-apply the glob with an import ..., but the opposite will need to carefully use it or avoid it at all.

Example: When #1862 implemented, change the oppacity of previous steps

classes: {
  previous-step.style.opacity: 0.4
}
steps: {
  1: {
    **: {
      # append `step-1` class and use it as a tag 
      class: &step-1
     }
   } 
   2: {
     **: {
       &class: step-1
       # append class `previous-step`
       class: &previous-step
     }
     **: {
       !&class: previous-step
       class: &step-2
     }
   }
}
@cyborg-ts cyborg-ts added this to D2 Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant