Jump to content
Sign in to follow this  
shannoga

Less is not taking effect

Recommended Posts

shannoga

Hi Happy with the integration of less I am trying to use less in my custom sections, I have added the less code to the custom code area in the website but less didn't take effect. I tries adding it to my base theme css file and it didn't work to. I then tries to use the twitter bootstrap less or the page lines pre defined less but this didn't worked also. Do I need to activate it? Where can I put the less code in my base theme? Thanks Shani

Share this post


Link to post
Share on other sites
Stefan
Hey Shani, Weird! LESS should be working in the Base theme CSS or in the Custom Code Box. Try the advice given out in this thread: http://www.pagelines.com/forum/discussion/20385/how-to-add-custom-less-to-a-child-theme-in-2.2./p1 Did you try de-activating your plug-ins to see if any has any issues? In addition, can you try replicating the issue on a clean/different install?

Share this post


Link to post
Share on other sites
shannoga
I will test it and report, thanks

Share this post


Link to post
Share on other sites
Jenny
Also make sure you don't have errors in you CSS.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
shannoga
I checked again It seems that it will work on the Custom Code Box. But still is it not working on my base template. I tried to add a style.less to my base theme directory, should I import it somewhere or is it imported by the framework? Any way I still can not make it work. BTW I validated my css and no visible problems. Any guide or explanation on how to integrate less in a base theme or sections? Thanks Shani

Share this post


Link to post
Share on other sites
Danny
Hi Shani, Basically in order to LESS CSS, you can either do: 1. Add your LESS CSS to Custom Code > CSS Rules. 2. Create a style.less file (nothing needs to be added) and then upload this to either your child theme directory, so it's in the same location as style.css 3. Create a style.less file (nothing needs to be added) and then upload it to the PageLines Customisation folder, in the same location as style.css Once you have done one of the above, you can start to be amazed by LESS CSS. **A useful tip, if you plan on using LESS via either child theme or PageLines Customisation plug-in, you can then add all your custom CSS to the style.less file. The style.css file will only read normal CSS, however the style.less file will both LESS CSS & CSS.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
trizerticus
There seems to be one other quirk that I have at least run into and that the style.less file unlike the style.css does not update dynamically. that is if you edit it, and then save it you do not see the results immediately. the only remedy that I have found that works for this is to goto Pagelines > Site Options and select any one of the tabs and then click the Save Button. This seems to update the Pagelines Framework and then the new LESS CSS should show up.

Share this post


Link to post
Share on other sites
Danny
Basically, when you save, it compiles all the less files and saves the compiled css into the database. Saving your settings again, re-compiles your LESS files and CSS.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×