-
Notifications
You must be signed in to change notification settings - Fork 135
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
Selector [contenteditable] is not pure. Issue with importing scss file #387
Comments
@oskaryil I've checked this and importing the scss file in a nextjs project with the latest version of ReactGrid should work correctly. Could you provide a sandbox with the reproduced issue? |
Strange. I have a more or less clean project using this template https://github.com/theodorusclarence/ts-nextjs-tailwind-starter. Did you try importing the scss file inside your own scss file? |
Yes, I have prepared a nextjs (14.2.0) template with the latest version of ReactGrid. Please take a look: |
@oskaryil Is this issue still relevant? |
Hey there! This might happen because "non-pure" selectors are not allowed inside module SCSS files. I had this issue when importing my For me, the solution was pretty straightforward:
If you want to know why this happens, please take a look at this discussion EDIT: If you don't want to import the custom variables globally, follow this approach. |
Thanks for this thread. At the moment, |
I agree with the message on the screenshot with black background: add class to make it pure |
@webloopbox Even though I found the usage of |
@Igormandello This selector was likely added with Safari browsers in mind. The most sensible approach would be to apply a CSS class to this. |
@webloopbox I have implemented something really similar to #402 and while testing I noticed something: For example, one way of using it as a module could be: // custom.module.scss
$primary-color: #4285f4;
.my-custom-module {
:global {
@import "@silevis/reactgrid/styles.scss";
.rg-input {
border: none;
}
}
} and then, inside your component: // Component.tsx
import style from "~/styles/custom.module.scss";
export default function Component() {
return (
<div className={style["my-custom-module"]}>
{/* ReactGrid component */}
</div>
);
} Even if we remove the |
Thanks! I just tried doing it this way and it works. I'll proceed with this workaround for now. |
Describe the bug
I'm using sass in a Next.js React project. I'm unable to import the react-grid scss into my scss file.
Current behavior
It's giving me this error:
Expected behavior
I'd like to override the scss variables to edit the styles of the react-grid component.
Screenshots or gifs
Your environment details
The text was updated successfully, but these errors were encountered: