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 for the table text-align: start #346

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lopez-marc
Copy link

After this commit, text alignment in tables no longer works as intended. It appears that text-align: start; does not apply correctly to the table tag.

To address this, I propose applying text-align: start; directly to the th and td tags, ensuring correct alignment.

Copy link

vercel bot commented Apr 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-typography ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2024 0:41am

@adamwathan
Copy link
Member

Hey! Can you explain more what you mean when you say it doesn't apply properly? Looking at our demo site the alignment looks correct to me and has the correct computed style:

image

@lopez-marc
Copy link
Author

Thanks for the quick answer! I hope the following examples are useful to understand my point:

Before the mentioned commit was set left and this was the result:
Bildschirmfoto 2024-04-10 um 17 33 22

How is currently with start the headers are centered:
Bildschirmfoto 2024-04-10 um 17 33 10

This is how it looks with my proposed change:
Bildschirmfoto 2024-04-10 um 17 36 56

And for debugging purposes, if I change in my PR to end:
Bildschirmfoto 2024-04-10 um 17 37 31

@adamwathan
Copy link
Member

Ah I see now, that is absolutely bizarre! 🤯 That almost seems like a browser bug but it's the same in all browsers so there must be a reason. Tweeted about it in case anyone who follows me happens to possess this arcane knowledge:

https://twitter.com/adamwathan/status/1778098728601055467

I think the reason we did this on the table element was to avoid specificity issues or something, wish I could remember exactly why but I have a vague memory of it being important 🤔 Will have to think about if there's a case where it's an issue.

@caendesilva
Copy link

Hey @adamwathan! After updating a minor version of this plugin, the table headers in HydePHP are now center aligned instead of left aligned. This was caught by our Browserstack integration. See hydephp/develop#1689

You can also view our public Browserstack page where this was caught https://percy.io/9d5269d1/hydephp/builds/33912142/changed/1856671999

image

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

Successfully merging this pull request may close these issues.

None yet

3 participants