reflex-dev / reflex

🕸️ Web apps in pure Python 🐍
https://reflex.dev
Apache License 2.0
20.15k stars 1.16k forks source link

pc.html does not pay attention to tags #613

Closed hirscr closed 1 month ago

hirscr commented 1 year ago

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

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):

Additional context Add any other context about the problem here.

Kaushal-Dhungel commented 1 year ago

Hi, Can I work on this issue?

Alek99 commented 1 year ago

Hi, Can I work on this issue?

Yes you can work on this issue. Thanks!

masenf commented 11 months ago

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.

kylelee1027 commented 6 months ago

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

picklelo commented 6 months ago

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.

masenf commented 6 months ago

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.

kylelee1027 commented 6 months ago

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?

masenf commented 6 months ago

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.