[2.9.5] Compiling css files using less returns Mermaid error

You made an own skin or theme for phpMyFAQ. You can share it here with others!

Moderator: Thorsten

Post Reply
Breda076
Posts: 4
Joined: Thu Oct 06, 2016 2:41 pm

[2.9.5] Compiling css files using less returns Mermaid error

Post by Breda076 »

HI,

I try to figure out the templating system. I want to change some CSS stuff like colors, etc.

In order to make an own theme, I copies the default folder to a new folder and changed the template in the admin. That works fine.
Then, I figure that the only file I need to change in fact is the style.min.css. However I want to change thing the right way, which is (according to me) update the less files and compile them into the style.css and style.min.css. Am I correct?

When I try to compile the style.less files (on my Ubuntu 14.04 desktop) I tried:

Code: Select all

lessc style.less style.css
. Unfortunately, I get an error (I changed name and path with <name> and <directoy> manually for obvious reasons):

Code: Select all

FileError: '../../../../../components/mermaid/dist/mermaid.forest.css' wasn't found. Tried - /home/<name>/Documents/<directory>/FAQ/components/mermaid/dist/mermaid.forest.css,/home/<name>/Documents/<directory>/FAQ/components/mermaid/dist/mermaid.forest.css,../../../../../components/mermaid/dist/mermaid.forest.css in /home/<name>/Documents/<directory>/FAQ/TEST - phpMYFAQ/assets/template/<templatename>/less/style.less on line 886, column 1:
885 //
886 @import (less)"../../../../../components/mermaid/dist/mermaid.forest.css";
 
Can you please explain what went wrong and how to compile the less files the right way?

Thanks in advance!

Bob
Thorsten
Posts: 15617
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: [2.9.5] Compiling css files using less returns Mermaid e

Post by Thorsten »

Hi,

did you run

Code: Select all

npm install
bower install
?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Breda076
Posts: 4
Joined: Thu Oct 06, 2016 2:41 pm

Re: [2.9.5] Compiling css files using less returns Mermaid e

Post by Breda076 »

Did that. Same result.

If I read the error, there should be a 'Mermaid.forest.css' thingie somewhere. I cannot find it anywhere on my system. What is this file? It is refered to in the style.less

Tried to compile using Koala: same result.
Tried to compile a simple less file (both in terminal as in Koala): successful compiled to .css file.

Regards,
Bob
Thorsten
Posts: 15617
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: [2.9.5] Compiling css files using less returns Mermaid e

Post by Thorsten »

Hi,

if you ran "bower install" you should see a folder called components, there should be a folder called mermaid with the referenced files.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Breda076
Posts: 4
Joined: Thu Oct 06, 2016 2:41 pm

Re: [2.9.5] Compiling css files using less returns Mermaid e

Post by Breda076 »

Hi Thorsten,

Were do I need to run that? On the server or on my desktop?

Just ran

Code: Select all

bower init
and

Code: Select all

bower install
on my desktop. Not one 'mermaid' on my system to be found...

Regards,
Bob
Thorsten
Posts: 15617
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: [2.9.5] Compiling css files using less returns Mermaid e

Post by Thorsten »

Hi,

but it's listed in bower.json: https://github.com/thorsten/phpMyFAQ/bl ... r.json#L20

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Breda076
Posts: 4
Joined: Thu Oct 06, 2016 2:41 pm

Re: [2.9.5] Compiling css files using less returns Mermaid e

Post by Breda076 »

Hi,

managed to install browser and the mermaid thingies from githup, but probably in the wrong path. Where should they reside? The are now located in my custom /asset/template/<template_name>/less/ directory.

Regards,
Bob
tracy123
Posts: 4
Joined: Sun Jan 01, 2017 1:54 am

Re: [2.9.5] Compiling css files using less returns Mermaid e

Post by tracy123 »

Breda076 wrote:Hi,

managed to install browser and the mermaid thingies from githup, but probably in the wrong path. Where should they reside? The are now located in my custom /asset/template/<template_name>/less/ directory.
subchorionichemorrhagehealth care tippoikilothermiahyperthymesiadorsalgia
Regards,
Bob
Thanks for clarification!
Post Reply