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

The var() function doesn't work as part of border shorthand property #898

Closed
ham2anv opened this issue Jul 12, 2019 · 3 comments
Closed
Labels
bug Existing features not working as expected

Comments

@ham2anv
Copy link

ham2anv commented Jul 12, 2019

Not sure if this applies to other properties, but I ran into this today in the border shorthand property. The following:

border: 0.15rem solid var(--highlight, black);

throws the error "WARNING: Ignored border: 0.15rem solid var(--highlight, black) at 8:5, invalid value.". Breaking the var() out into its own border-color property fixes the issue.

@liZe liZe added the bug Existing features not working as expected label Jul 13, 2019
@mikevoets
Copy link

mikevoets commented Jul 15, 2020

The same seems to happen when concatenating var with other text:

E.g. where --table-label: 'Table', the following declaration:

content: 'var(--table-label) ' 1. ';

results in "Table", and not "Table 1. "

@mikevoets
Copy link

mikevoets commented Jul 19, 2020

The bug described in my comment is unrelated to the OP.

@ham2anv @liZe the issue here is that a variable token is yet undetermined at weasyprint/css/validation/expanders.py:241 so it will raise InvalidValues. It is unknown what kind of declaration a variable is at this point.

@liZe
Copy link
Member

liZe commented Sep 16, 2021

Now covered by #1219.

@liZe liZe closed this as completed Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

No branches or pull requests

3 participants