Skip to content

Missing styles when using styles.layer.css in v9 #826

Description

@helloitsmix

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 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions