Jump to content


Photo
- - - - -

How to apply global color.less css?


  • Please log in to reply
3 replies to this topic

#1 bxbmedia

bxbmedia

    Advanced Member

  • Members

  • 79 posts
  • LocationAnn Arbor, MI

Posted 16 May 2012 - 12:52 PM

Greetings,

I'm looking for a way to include some global LESS css to my child theme for 2.0.

The docmentation for this is a little less than ideal ;) but I'm sure there must be a way to do it. I suppose I could override a section that always gets used and add it there, but.. that doesn't sound like the right way to do it.

I have tried adding a color.less file to the root of my child theme, and tried mimicking the parent theme by creating a css folder in the root and placing the same file inside with no luck.

Using latest framework: 2.1.6

#2 Henry Perkins

Henry Perkins

    Friendly Contributor

  • Members
  • 197 posts
  • LocationAustin, TX
  • Framework Version:2.4.4
  • Country: Country Flag

Posted 16 May 2012 - 06:10 PM

@bxbmedia Hey there, The docs for LESS CSS are intended for use with 2.2, and so some of the features and customizations that would be possible in 2.2 are not in 2.1.6. In order to achieve what you're proposing, I believe a filter would have to be used.. I hope this helps, and yeah... The docs are a little plain for it at the moment but that will change before 2.2 is released. :)

#3 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 01 July 2012 - 10:10 PM

Actually, Henry's correct. Our use of LESS was introduced with version 2.2, and is not applicable to 2.1.6. Unless a filter is added or you update, LESS will not work properly in your child template as you desire. Changing sections or adding stylesheets mimicking later versions will not work. Can you tell me if there's some reason you're not updating to 2.2.1?

#4 bxbmedia

bxbmedia

    Advanced Member

  • Members

  • 79 posts
  • LocationAnn Arbor, MI

Posted 02 July 2012 - 08:16 PM

LESS has been a part of the framework since 2.0, it was just limited to sections, although not as robust as 2.2 of course. The docs didn't and still don't have anything there that is specific to 2.2. This is an old thread that I started before 2.2 was released yet - I didn't even know 2.2 was coming at the time and I was looking for a way to use LESS at a theme level, not just sections. I just started using 2.2.1 today on a site I am developing but I'm not sure if I'm going to keep it yet due to an issue I am having with the cached compiled less, but there's another thread for that. Please close this thread, thanks.