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

counter-increment is not working #1599

Closed
ritiksoni00 opened this issue Mar 18, 2022 · 3 comments
Closed

counter-increment is not working #1599

ritiksoni00 opened this issue Mar 18, 2022 · 3 comments

Comments

@ritiksoni00
Copy link

<div style="--incr: 4">a</div>
<div style="--incr: 6">b</div>
<div style="--incr: 4">c</div>
<div style="--incr: 4">d</div>
<div style="--incr: 4">e</div>
<div style="--incr: 4">f</div>
<div style="--incr: 4">g</div>
div {
  counter-increment: sum var(--incr);
}

div::after {
  content: "-" counter(sum)
}

not supported counter-increment.

the sum is always zero using weasyprint. it should be incremented as in the given example.

example

#1592

@liZe
Copy link
Member

liZe commented Mar 18, 2022

You’re right, var doesn’t work in counter-increment. That’s a problem explained in #1219. It wouldn’t be that complicated to fix, but it definitely requires deep changes in the way CSS properties are handled.

@liZe liZe closed this as completed Mar 18, 2022
@ritiksoni00
Copy link
Author

i didn't get this by reading the issue you provide? and why var doesn’t work in counter-increment?

@liZe
Copy link
Member

liZe commented Mar 25, 2022

why var doesn’t work in counter-increment

#1219 explains that var is not supported for properties that have multiple values separated by a space, like counter-increment.

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