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

pseudo class with height as calc() doesn't seem to work #1207

Closed
Skylsmoi opened this issue Sep 2, 2020 · 2 comments
Closed

pseudo class with height as calc() doesn't seem to work #1207

Skylsmoi opened this issue Sep 2, 2020 · 2 comments

Comments

@Skylsmoi
Copy link

Skylsmoi commented Sep 2, 2020

Hi,
I'm using python 3.7 and WeasyPrint==51

My issue is to render this:

.myClass::after {
    content: '';
    position: absolute;
    border: 1px solid #000;
    border-right-width: 0;
    border-top-width: 0;
    left: 10px;
    top: calc(0% - 15px);
    width: 7px;
    height: calc(50% + 15px);
    line-height: 16px;
    color: #000;
}

which, using border-left and border-bottom, should render something looking like an L.

On my html render, it works well, but on the pdf render, the border-left isn't rendered.

To fix it, I must not use the function calc() in the height rule.

It seems there is something not working with the height as calc() in a pseudo class.
The issue is the same with ::before and ::after

@liZe
Copy link
Member

liZe commented Sep 2, 2020

Hello, and thanks for your report.

calc() is not supported, that’s why it doesn’t work. This issue is a duplicate of #357.

@liZe liZe closed this as completed Sep 2, 2020
@Skylsmoi
Copy link
Author

Skylsmoi commented Sep 2, 2020

Indeed, thank you

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