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

Table padding styles fail for rowspans #364

Open
hitsthings opened this issue Nov 14, 2024 · 0 comments
Open

Table padding styles fail for rowspans #364

hitsthings opened this issue Nov 14, 2024 · 0 comments

Comments

@hitsthings
Copy link

What version of @tailwindcss/typography are you using?

0.5.12, also on main currently

What version of Node.js are you using?

20

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction repository

https://play.tailwindcss.com/N9NaJJTEfl

Describe your issue

These styles are meant for aligning the first and last column to the edge of the table:

'tbody td:first-child, tfoot td:first-child': {
  paddingInlineStart: '0',
},
'tbody td:last-child, tfoot td:last-child': {
  paddingInlineEnd: '0',
},

But they fail when faced with this markup:

<table>
   <tbody>
       <tr>
           <td rowspan="2">Spans two rows</td>
           <td>Single row</td>
           <td rowspan="2">Spans two rows</td>
       </tr>
       <tr>
           <td>Single row with bad padding</td>
       </tr>
   </tbody>
</table>

The cell in the second row has no inline padding, but is not at the edge of the table. It becomes misaligned from the rest of its column.

See the tailwind play reproduction.

Unfortunately, I don't have a solution except to remove these styles. Currently in the process of attempting to do that via tailwind theme overrides, but not achieved yet.

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

No branches or pull requests

1 participant