How to set custom CSS for NodeType?

Hello everybody,

I am currently developing my first own NodeType. But how can I append a custom css to it? I tried to create a new .scss file in the Resources/Private/Styles directory and add it as an import to the Main.scss file. But thats not working. Is there something I’m missing?

Thanks in advance :slight_smile:

Hi Lukas,

what exactly isn’t working?

If you are working with phpstorm, you can enable the File Watcher to compile your scss:
--no-cache --update --style compressed --sourcemap=none $FileName$:../../Public/Styles/$FileNameWithoutExtension$.min.css

If you want to split up your scss in more than one file, you can import your Main.scss like:
@import "Main.scss";

Hey Rene,

In the directory I mentioned are all the .scss files which are loadedTeamViewer_eOg8nxMQwy

The _Button.scss is my file which I created. After that, I imported it to the Main.scss file like this:
TeamViewer_lU9kKLe0Sx

The problem is, that the css wont be loaded in the backend / frontend.

But the whole scss is compiled to css correctly in Resources/Public/Styles ?
If not: Where is your Main.scss located?

Everything seems to be compiled correctly, except of my Button.scss.

The Main.scss is located in Resources/Private/Fusion

If its helpful: Im using the Neos.Demo Sitepackage

For me it sounds like this scss is never compiled. Very stange because your IDE would throw an error message if “_Button.scss” could not be compiled correctly. Is the Main css file really new created? Plz check the “creation date” in the file system.

But you ran yarn build in the Neos.Demo folder?