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

Typography - headings inconsistencies #517

Open
jjagielka opened this issue Apr 3, 2023 · 5 comments
Open

Typography - headings inconsistencies #517

jjagielka opened this issue Apr 3, 2023 · 5 comments

Comments

@jjagielka
Copy link

Describe the bug
Section Typography - Headings defines inconsistent styles.

The most used heading h1 presents 3 different definitions. Which one is the standard one?

<h1 class="mb-4 text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white">
<h1 class="mb-4 text-3xl font-extrabold text-gray-900 dark:text-white md:text-5xl lg:text-6xl">
<h1 class="text-5xl font-extrabold dark:text-white">

h2 shows some deviations as well. Which one should I pick as an official one

<h2 class="text-4xl font-extrabold dark:text-white">
<h2 class="mb-4 text-3xl font-extrabold leading-none tracking-tight text-gray-900 md:text-4xl dark:text-white">
<h2 class="text-4xl font-bold dark:text-white">

Other small headings have some simple definitions like:

<h3 class="text-3xl font-bold dark:text-white">Heading 3</h3>

Shouldn't they have responsive sizing as well?


Flowbite - consistently inconsistent.

@zoltanszogyenyi
Copy link
Member

Hey @jjagielka,

Thanks for reporting - can you please share the source of these heading tags?

Do consider that these headings are contextually different so whether they are used in hero sections, an article format, or in various other sections it can be larger or smaller.

Based on the given context I can check for consistency issues.

Cheers,
Zoltan

@jjagielka
Copy link
Author

I've collected examples from one page only:
https://flowbite.com/docs/typography/headings/

@zoltanszogyenyi
Copy link
Member

We're missing the responsive classes, but these should be the standard ones:

The thing with typography is that it's never really the same other than some standard sizes. Meaning, for hero sections you can use larger than normal font sizes, whereas for actual typography for a new article you would use a smaller one even.

I'll update the responsive classes though, heading 1 should have text-3xl on smaller devices and heading 2 should have text-2xl.

@jjagielka
Copy link
Author

Responsive sizing is one thing. The other is tracking and leading. Should we use it or not?

Note as well that h2 is font-extrabold and sometimes font-bold.

Text color very often is set as dark:text-white only. Should we relay on color inheritance or enforce color in light mode?

@zoltanszogyenyi
Copy link
Member

@robert1508 let's check this out, we haven't touched this typography page for a long time

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

No branches or pull requests

2 participants