Is it possible to develop themes with SCSS and map file? #846
-
What is actually wrong with storing the themes in the /media/themes/ folder? I am currently having problems developing a website with SCSS, because the CSS map file and the SCSS files should be in the same directory as the stylesheet so that you can debug properly in the browser. Is there a quick and dirty way I can do this? |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 19 replies
-
I also work with SASS. My workaround looks like this: Put an empty css file with the theme name (
into your header. Good Luck :) |
Beta Was this translation helpful? Give feedback.
-
I work with SASS but not with the .map files. I use the following folder structure:
|
Beta Was this translation helpful? Give feedback.
-
Tip: You can let us know when your question has been answered, click on |
Beta Was this translation helpful? Give feedback.
-
@markseuffert|s comment about the |
Beta Was this translation helpful? Give feedback.
-
Now there's support for sourcemap files in the latest core, thanks to Robert. When you develop themes with a CSS preprocessor and inspect HTML elements in your web browser's developer tools, it should automatically show you the correct SCSS file and line number. It works in Safari and Firefox, no special settings are required, and probably works in other web browsers too. |
Beta Was this translation helpful? Give feedback.
Please note that direct access to the system folder is not allowed. Files needed for themes are mapped via a virtual location. The core checks with
isSafeFile()
that the mapped files are a well-known file type. You can experiment/modify the source code to add more file types.