reflex icon indicating copy to clipboard operation
reflex copied to clipboard

pc.html does not pay attention to tags

Open hirscr opened this issue 2 years ago β€’ 8 comments

Describe the bug header tags like <h1></h1> have no effect on the text between the tabs

To Reproduce you can just look at your own docs on website

  • Code/Link to Repo:](https://pynecone.io/docs/library/other/html)

Expected behavior header tags should produce bolded and englarged text

Screenshots If applicable, add screenshots to help explain your problem.

** Specifics (please complete the following information):**

  • Python Version: 3.9
  • Pynecone Version: latest
  • OS: mac
  • Browser (Optional): safari, chrome

Additional context Add any other context about the problem here.

hirscr avatar Feb 27 '23 23:02 hirscr

Hi, Can I work on this issue?

Kaushal-Dhungel avatar Apr 22 '23 16:04 Kaushal-Dhungel

Hi, Can I work on this issue?

Yes you can work on this issue. Thanks!

Alek99 avatar Apr 22 '23 17:04 Alek99

The problem here is that reflex has a CSS reset which removes all distinctions between headings. So unless your site is using tailwind typography or setting your own CSS rules for the headings, they are going to appear visually identical.

masenf avatar Nov 27 '23 23:11 masenf

Hello, can I work on this if it's still an issue?

kylelee1027 avatar Apr 24 '24 04:04 kylelee1027

This is still an issue, but not sure what the solution is. As mentioned above the css is getting reset within the Reflex app, so not sure how to get the original one back.

picklelo avatar Apr 26 '24 18:04 picklelo

This has been attempted a few times in the past. See https://github.com/reflex-dev/reflex/issues/1529

In that issue i have an example code which restores "nice looking" default styles for headers and other components via the tailwind/typography package and the prose class.

If you're planning to fix this issue, then i would suggest a similar route as described in that bug.

masenf avatar Apr 26 '24 18:04 masenf

I thought that maybe adding the typography plugin as a default value for tailwind in the reflex config would work but it didn't :( or maybe I just implemented it wrong?

kylelee1027 avatar Apr 26 '24 22:04 kylelee1027

You also need to add the class_name="prose" to the rx.html as a default. I think a recent PR just added rx-Html as another default class name, so you should be able to piggy back on that.

masenf avatar Apr 27 '24 00:04 masenf