rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.7k stars 320 forks source link

[Bug]: dark:bg-gray-800 being overwridden by table tbody tr:nth-child(2n) #1555

Closed kinger251285 closed 4 months ago

kinger251285 commented 7 months ago

What happened?

In dark mode the alternate rows of the data table are not displaying the correct background colour should alternate between bg-gray-700 & bg-gray-800. Instead the bg-gray-800 (even row) gets overwridden by the below:

table tbody tr:nth-child(2n) { --tw-bg-opacity: 1; background-color: rgb(248 250 252/var(--tw-bg-opacity)); }

It looks like it refers to the below in laravel-livewire-tables/tree/master/resources/css/numberRange.css:

table[tableType='rappasoft-laravel-livewire-tables']>tbody>tr:nth-child(even of tr.rappasoft-striped-row) { background-color: var(--rappasoft-table-striped-bgcolor-even, indigo) !important; }

table[tableType='rappasoft-laravel-livewire-tables']>tbody>tr:nth-child(odd of tr.rappasoft-striped-row) { background-color: var(--rappasoft-table-striped-bgcolor-odd, white) !important; }

I cannot see any css files in my vendor folder for this package otherwise i would have removed these lines to test 100%.

How to reproduce the bug

Via standard use of package, as above.

Package Version

2.7

PHP Version

8.1.x

Laravel Version

9.2

Alpine Version

3.9.1

Theme

Tailwind 3.x

Notes

No response

Error Message

No response

lrljoe commented 7 months ago

Does this still happen in v2.15?

kinger251285 commented 7 months ago

Does this still happen in v2.15?

Hi @lrljoe

The package we are using is version 2.7 and the site is production only. So don't really want to downgrade the package unless it causes any other issues.

Do you think upgrading may fix it?

stale[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

lrljoe commented 6 months ago

@kinger251285 - Apologies, been focused on v3.0 for a while now.

v2.15 is actually an upgrade to 2.7 (it's 2.15 not 2.1.5).

I'm much more readily available on the official Discord

Are you considering upgrading to Livewire 3.x at any point?

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.