HasanMerkit can you share your full custom CSS including the import statement? Do you see a difference if you place it before or after the other code?
There could also be issues with importing CSS files through Less. It's possible the file gets parsed as a Less file. Maybe there's something in the file that causes variables to be re-declared or something?
Have you tried pasting the content of the CSS file in the custom Less field directly?
You can load additional CSS files through the extend.php
file at the root of the forum (same folder as composer.json
and flarum
executable). Add a new entry in the PHP array []
like (new Extend\Frontend('forum'))->css('/path/to/less/file.less'),
. I believe that the file will still be parsed as Less even if it has .css
extension though. This is the intended way to load additional CSS from a file. Less imports across extensions or to arbitrary file paths are not officially tested/supported.
EDIT: if you are trying to use a native CSS include, make sure you use the proper syntax. I believe Less has a different syntax/escape for it otherwise it will be read as a Less import. But I don't know it at the top of my head.