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

theme.json h1 tag font size is override by core heading block font size #61988

Closed
uniquesolution opened this issue May 25, 2024 · 3 comments
Closed
Labels
[Feature] Typography Font and typography-related issues and PRs [Status] Needs More Info Follow-up required in order to be actionable. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended

Comments

@uniquesolution
Copy link

Description

when in theme.json file I add font size for both core/heading and h1 to h6 elements, core/heading font size override the h1 to h6 font size. Due to this by default h1 and h2 tags remain same font size and I have to apply manual font size to various heading blocks based on its tag (h1, h2, h3 etc.)

Step-by-step reproduction instructions

  1. Go to theme.json file of the block theme. and apply any font size to core/heading block, for example
    "styles": {
    "blocks": {
    "core/heading": {
    "typography": {"fontSize": "var(--wp--preset--font-size--large)"}
    }
    }
    }
  2. Now apply different font sizes for heading tags , like h1, h2 etc. For example
    "styles": {
    "elements": {
    "h1": {
    "typography": {"fontSize": "var(--wp--preset--font-size--extra-huge)"}
    }
    }
    } etc.
  3. Now go to any page in backend and add heading block, it always take the default heading size, instead of the h1, h2, etc applied heading size. We have to manually change h1 tag or h2 font size to a desired size. By default h1, h2 elements font size should override heading block font size, but its happening opposite of it.

Screenshots, screen recording, code snippet

No response

Environment info

Wordpress Version - 6.5.3
I am not using gutenberg plugin as separate plugin, but block editor is using gutenberg version available for the wordpress version.

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

Yes

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

No

@uniquesolution uniquesolution added the [Type] Bug An existing feature does not function as intended label May 25, 2024
@jordesign jordesign added Needs Testing Needs further testing to be confirmed. [Feature] Typography Font and typography-related issues and PRs labels May 26, 2024
@carolinan
Copy link
Contributor

Hi
I would like to understand why you are adding a font size to the heading block if you don't want it to apply to heading blocks? (Maybe there is a use case I am not aware about)

Copy link

Hi,
This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jun 28, 2024
@carolinan carolinan added [Status] Needs More Info Follow-up required in order to be actionable. and removed Needs Testing Needs further testing to be confirmed. labels Jun 28, 2024
@uniquesolution
Copy link
Author

you are right @carolinan , actually if we are assigning default font sizes for each h tag, then we don't need to assign font size for heading block. So I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Typography Font and typography-related issues and PRs [Status] Needs More Info Follow-up required in order to be actionable. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants