-
Notifications
You must be signed in to change notification settings - Fork 330
Description
📚 Subject area/topic
/concepts/components/class-style.mdx
📋 Page(s) affected (or suggested, for new content)
https://docs.solidjs.com/concepts/components/class-style
📋 Description of content that is out-of-date or incorrect
The SolidJS Docs claims that
Classes are defined in CSS files, which are then imported into the component files that use them. You can import these files using the import statement at the top of your component file. Once imported into a component, the classes are scoped to that component and any of its children.
import "./Card.css";
However, this is not the case. We can test this by creating a new solidjs project with npm create vite
(I tried npm init solid
, but I got an ERROR Subdirectory not found
error when creating the project.) and then creating two components containing the same class but with different properties.
AFAIK SolidJS does not package a css scoping solution of it's own, and importing css files just does whatever vite does under the hood (which makes the css global) so I don't understand why the docs claim otherwise in the concepts.
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response