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

tagsStyles are only applied to the children of tag but not to the element itself #631

Open
7 of 15 tasks
Nikhil-Vats opened this issue May 16, 2023 · 2 comments
Open
7 of 15 tasks
Labels
bug Crush'em all.

Comments

@Nikhil-Vats
Copy link

Decision Table

  • My issue does not look like “The HTML attribute 'xxx' is ignored” (unless we claim support for it)
  • My issue does not look like “The HTML element <yyy> is not rendered”

Good Faith Declaration

Description

The tagsStyles prop are not applied to the tag but rather the children of the tag. So if I use -

<TRenderEngineProvider
    customHTMLElementModels={customHTMLElementModels}
    baseStyle={baseFontStyle}
    tagsStyles={{h1:{fontSize:'17px'}}
    systemFonts={systemFonts}
>

Then h1's font is set by the user agent stylesheet rather than the library and h1's children get font-size: 17px. This is causing an issue in strikethrough behaviour in one of my components.

React Native Information

confer snack

RNRH Version

6.3.1

Tested Platforms

  • Android
  • iOS
  • Web
  • MacOS
  • Windows

Reproduction Platforms

  • Android
  • iOS
  • Web
  • MacOS
  • Windows

Minimal, Reproducible Example

https://snack.expo.dev/hLYeCW0h7

Additional Notes

No response

@Nikhil-Vats Nikhil-Vats added the bug Crush'em all. label May 16, 2023
@Pramod-Aswani1012
Copy link

I would like to solve this issue

@wildan-m
Copy link

wildan-m commented Apr 2, 2024

@Nikhil-Vats have you found any solutions? I've experienced the same situation where defining lineHeight in android will cause it to appear cut off if we set the lineHeight tagStyle higher than baseStyle.lineHeight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Crush'em all.
Projects
None yet
Development

No branches or pull requests

3 participants