Jump to content


Photo
- - - - -

Less is not taking effect


  • Please log in to reply
7 replies to this topic

#1 shannoga

shannoga

    Member

  • Members

  • 18 posts
  • Country: Country Flag

Posted 10 July 2012 - 09:42 AM

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

#2 Stefan

Stefan

    Business Manager

  • Administrators
  • 158 posts
  • LocationTransylvania
  • Framework Version:trunk
  • Country: Country Flag

Posted 10 July 2012 - 01:00 PM

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:

Please Login or Register to see this Hidden Content

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?

#3 shannoga

shannoga

    Member

  • Members

  • 18 posts
  • Country: Country Flag

Posted 10 July 2012 - 03:18 PM

I will test it and report, thanks

#4 Jenny

Jenny

    Advocate

  • Unicorn Store Dev

  • 2924 posts
  • LocationWV
  • Country: Country Flag

Posted 10 July 2012 - 04:10 PM

Also make sure you don't have errors in you CSS.

#5 shannoga

shannoga

    Member

  • Members

  • 18 posts
  • Country: Country Flag

Posted 10 July 2012 - 08:14 PM

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

#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 17129 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 11 July 2012 - 09:41 AM

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.

#7 trizerticus

trizerticus

    Member

  • Members

  • 23 posts
  • Framework Version:2.3.3
  • Country: Country Flag

Posted 12 July 2012 - 08:02 AM

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.

#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 17129 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 12 July 2012 - 10:30 AM

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.