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

@footnote::before is not discarded #2215

Open
rhn opened this issue Jul 31, 2024 · 1 comment
Open

@footnote::before is not discarded #2215

rhn opened this issue Jul 31, 2024 · 1 comment
Labels
bug Existing features not working as expected

Comments

@rhn
Copy link

rhn commented Jul 31, 2024

The spec mentions the "footnote rule", but doesn't actually specify how to create it.

I tried to create a 20% wide rule with @footnote::before:

@page
   @footnote::before {
        display: block;
        width: 20%;
        border-top: solid 0.2mm;
    }
}

but the "::before" seems to be stripped and the rule applied to the entire area instead:

ss

Is it reasonable to expect "::before" to apply to the footnote area?

@liZe
Copy link
Member

liZe commented Aug 1, 2024

Hi!

The spec mentions the "footnote rule", but doesn't actually specify how to create it.

Here’s a simple example that will help.

Is it reasonable to expect "::before" to apply to the footnote area?

::before is a pseudo-element, it can only be applied to selectors. So it can’t be applied to @footnote and should give a warning (and discard the whole block) instead of being ignored.

(Let’s keep this issue open to track this bug.)

You can get what you want by removing the width and using a border gradient:

border-image: linear-gradient(to right, black 20%, transparent 20%) 1;

@liZe liZe added the bug Existing features not working as expected label Aug 1, 2024
@liZe liZe changed the title @footnote::before does not work @footnote::before is not discarded Aug 28, 2024
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

2 participants