laravel-livewire-tables icon indicating copy to clipboard operation
laravel-livewire-tables copied to clipboard

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

Open kinger251285 opened this issue 7 months ago • 5 comments

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

kinger251285 avatar Nov 15 '23 13:11 kinger251285

Does this still happen in v2.15?

lrljoe avatar Nov 18 '23 15:11 lrljoe

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?

kinger251285 avatar Nov 20 '23 12:11 kinger251285

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] avatar Dec 20 '23 19:12 stale[bot]

@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?

lrljoe avatar Dec 29 '23 22:12 lrljoe

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] avatar Jan 30 '24 04:01 stale[bot]

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] avatar Mar 02 '24 06:03 stale[bot]