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

Fix(Heading1)!: πŸ› Incorrect Text Size on Production Compared to Localhost ❗ #163

Closed
krsiakdaniel opened this issue Dec 13, 2024 · 5 comments Β· Fixed by #172
Closed
Assignees
Labels
Hotfix A quick fix to address an urgent issue. Revert Reverts a previous commit.
Milestone

Comments

@krsiakdaniel
Copy link
Owner

krsiakdaniel commented Dec 13, 2024

Describe the bug

Latest <Heading1 /> text is correct on localhost but wrong and small on production.

Steps to reproduce bug

  1. Go to localhost and production.
  2. Compare headings sizes.
  3. See error.

Expected behavior

Font sizes should be the same.

Desktop

  • OS: Mac OS
  • Browser: EDGE
  • Version: Version 131.0.2903.86 (Official build) (arm64)

Screenshots

Image

@krsiakdaniel krsiakdaniel added the Fix Fixes a bug. label Dec 13, 2024
@krsiakdaniel krsiakdaniel added this to the 2024 - Dec milestone Dec 13, 2024
@krsiakdaniel krsiakdaniel self-assigned this Dec 13, 2024
@krsiakdaniel krsiakdaniel moved this to Ready in krsiak.cz Dec 13, 2024
@krsiakdaniel
Copy link
Owner Author

krsiakdaniel commented Dec 13, 2024

INFO

  • ❗ Had to rollback latest deploy to previous functional version.
  • ❗ Need to debug this and fix it before future deployments.

RELATED PR

@krsiakdaniel krsiakdaniel moved this from Ready to In progress in krsiak.cz Dec 13, 2024
@krsiakdaniel
Copy link
Owner Author

krsiakdaniel commented Dec 14, 2024

DEBUGGING

βœ… Function parameters work correctly and arguments values are passed:

Image


βœ… The same applies to other CSS, example text-violet-600.

Image


βœ… These fonts sizes are working text-sm, text-md, text-lg, text-xl, text-2xl, text-3xl, text-4xl and included in production.

POSSIBLE BUG REASON

❌ It seems like the larger text sizes are not being included in production build:

  • text-violet-600 text-5xl sm:text-6xl lg:text-7xl

The same applies for:

  • text-8xl, text-9xl

@krsiakdaniel
Copy link
Owner Author

krsiakdaniel commented Dec 14, 2024

ℹ️ Possible solution, need to test it in new build in deploy preview.

Safelisting Classes: If you have classes that are conditionally used or dynamically generated, you can safelist them to ensure they are not purged. This is done using the safelist option in Tailwind configuration.

Info: If you need to make sure Tailwind generates certain class names that don’t exist in content files, use safelist option.

Docs: https://tailwindcss.com/docs/content-configuration#safelisting-classes

@krsiakdaniel krsiakdaniel added the Revert Reverts a previous commit. label Dec 14, 2024
@krsiakdaniel krsiakdaniel changed the title Fix(Heading1)!: πŸ› Incorrect Text Size on Production Compared to Localhost Fix(Heading1)!: πŸ› Incorrect Text Size on Production Compared to Localhost ❗ Dec 14, 2024
@krsiakdaniel
Copy link
Owner Author

krsiakdaniel commented Dec 14, 2024

When fixed, resolve conversations in PR: #162

@krsiakdaniel
Copy link
Owner Author

krsiakdaniel commented Dec 14, 2024

PR

Testing

Font sizes tested in new deploy preview. All pages have correct <Heading1 /> sizes.

before:

after:

Sreenshots

Image

@krsiakdaniel krsiakdaniel pinned this issue Dec 14, 2024
@krsiakdaniel krsiakdaniel moved this from In progress to In review in krsiak.cz Dec 14, 2024
@krsiakdaniel krsiakdaniel added Hotfix A quick fix to address an urgent issue. and removed Fix Fixes a bug. labels Dec 14, 2024
@github-project-automation github-project-automation bot moved this from In review to Done in krsiak.cz Dec 14, 2024
krsiakdaniel added a commit that referenced this issue Dec 14, 2024
krsiakdaniel added a commit that referenced this issue Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hotfix A quick fix to address an urgent issue. Revert Reverts a previous commit.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant