icflorescu / icflorescu/mantine-datatable

Missing styles when using styles.layer.css in v9

Open
#826 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
102
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
First of all, thank you for the enormous work on mantine-datatable — it’s an amazing library and I’ve just started integrating it into my project.

Please keep in mind that I might be missing something or misunderstanding how the new styles system works, so this could also be a configuration issue on my side.

While using version v9, I noticed an issue related to the “layer” styles import. When importing:

import "mantine-datatable/styles.layer.css";

instead of the full styles:

import "mantine-datatable/styles.css";

some styles appear to be missing or not applied correctly. In particular, the table loses certain visual features such as striped rows, and pinned columns appear transparent or incorrectly styled.


To Reproduce
Steps to reproduce the behavior:

  1. Install and set up mantine-datatable v9

  2. Import only the layer styles:

    import "mantine-datatable/styles.layer.css";
    
  3. Create a table with striped enabled and pinned columns

  4. Render the table

  5. Observe missing or incorrect styling


Expected behavior
The table should retain all expected visual styles even when using the styles.layer.css import, including:

  • Striped rows working correctly
  • Proper styling for pinned/fixed columns
  • No transparency or missing background issues

Screenshots

Using styles.layer.css

Image

Using styles.css

Image

Desktop (please complete the following information):

  • OS: Linux Mint 21.3 (x86_64; X-Cinnamon)
  • Browser: Chrome
  • Version: 134.0.6998.205

Smartphone (please complete the following information):

  • Device: iPhone 15
  • OS: iOS 17
  • Browser: Safari
  • Version: Latest

Additional context
Add any other context about the problem here.

Thanks again for the great work on the library 🙌

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the table with styles.layer.css and compare it with styles.css, using striped rows and pinned columns as the entry points. Inspect the layer stylesheet and the table styling behavior; done means both features retain their expected backgrounds and visual styling when only styles.layer.css is imported.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.