Jump to content


Photo
- - - - -

Problem With @import - Less

LESS child theme

  • Please log in to reply
1 reply to this topic

#1 krafit

krafit

    Member

  • Members

  • 15 posts
  • LocationGermany - 'Yeah, we've got the Oktoberfest here'
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 31 October 2012 - 09:23 AM

Hej,

I'm doing my first steps with LESS and tried to split my styles into different files.
But importing into my style.less seems not to work as it's supposed to be. (Probably I'm too dumb to see the mistake)

As long as my LESS-Code (do you say 'code'?) is in the style.less everything is perfectly fine, but as soon as I put it in a file in the subfolder '/less/' of my childtheme it's not taking effect anymore.

I tried
@import with a relative path

Please Login or Register to see this Hidden Content

- it seems to cause a error while compiling, so the page isn't loading anymore.

and I tried an absolute path

Please Login or Register to see this Hidden Content

- the page loads correctly but my style changes don't take effect + I can't find them in the compiled CSS-File.

( + I tried both ' and " )

Thank you very much in advance.

#2 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 31 October 2012 - 11:53 AM

You cant @import less files.

Add your less code to style.less file in the child theme dir, this gets auto compiled.

The /less/ folder is for less file overrides, if you place a dropdowns.less file in there, it will load this instead of the dropdowns.les file in the core framework.

If you really want to stick with your downloads.less filename, you will have to use a filter to add it to the LESS included files.
  • krafit likes this





Also tagged with one or more of these keywords: LESS, child theme