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 Block: Styles are applying to elements that happen to have the .fn class. #52136

Closed
shazahm1 opened this issue Jun 29, 2023 · 3 comments · Fixed by #52179
Closed

Footnote Block: Styles are applying to elements that happen to have the .fn class. #52136

shazahm1 opened this issue Jun 29, 2023 · 3 comments · Fixed by #52179
Assignees
Labels
[Block] Footnotes Affects the Footnotes Block [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended

Comments

@shazahm1
Copy link

Description

The styles for this block select the .fn class globally. This makes any page content with this class render offscreen due to the text-indent property and replaced with [1]. The is the offending CSS:

.fn {
    counter-increment: footnotes;
    display: inline-block;
    font-size: smaller;
    text-indent: -9999999px;
    vertical-align: super
}

.fn:after {
    content: "[" counter(footnotes) "]";
    float: left;
    text-indent: 0
}

The class name needs to be more specific, or the CSS sector more specific.

Step-by-step reproduction instructions

Add the fn class to any page element.

Screenshots, screen recording, code snippet

footnote-block

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@carolinan
Copy link
Contributor

carolinan commented Jun 30, 2023

I was able to reproduce this.

The default comments in classic themes use this class:
https://core.trac.wordpress.org/browser/tags/6.2/src/wp-includes/class-walker-comment.php#L335

Screenshot 2023-06-30 at 09 01 41

@carolinan carolinan added [Block] Footnotes Affects the Footnotes Block [Type] Bug An existing feature does not function as intended labels Jun 30, 2023
@Rayme
Copy link

Rayme commented Jun 30, 2023

I meet this issue too. I can't find the .fn {xxx} in style.css file. All I can do is to disable the Gutenburg plugin

@huhexian
Copy link

My friend met this issue too, then we helped him investigate the cause and found that it was caused by the Gutenberg plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Footnotes Affects the Footnotes Block [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

7 participants