Jump to content


Photo
- - - - -

PL core LESS color variables for body and page?

LESS variables color core

Best Answer James B , 19 July 2013 - 10:32 PM

Hi there,

 

I'm not a LESS guru so hold tight in case someone who knows exactly follows up on this. 

 

But as far as I'm aware that's the only preset variable for the main/background colour. From what I can see the @pl-base applies to the main body background and the other variables @darkbase @lightbase work off of that color.

It can be re-used to colour other classes if required by adding them to the css. Like .page-canvas {background:@pl-base;}

 

Or you can make your own variable and use that for the other areas you want to color. Like @pl-content-area for example.

 

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 Erwan

Erwan

    Super Member

  • Members

  • 193 posts
  • Framework Version:Framework 2.4.4 - DMS 1.1.6 & 1.2
  • Country: Country Flag

Posted 19 July 2013 - 09:27 AM

Hi,

 

I use the PL color variable @pl-base in my custom LESS, so that some customizations (e.g. PL or personal LESS mixins) immediately take in account any change in global settings.

 

This @pl-base variable is described as "Page background color" in documentation

Please Login or Register to see this Hidden Content

: actually, it seems to me it's the "Content Background" color defined in Site Options \ Color Control.

 

If they exist (I never managed to find them in documentation, including the "PHP Cross Reference of PageLines Framework"), what are the PL LESS variables referring to "Body background" color and (real) "Page background" color?

 

I most certainly miss something considering there are variables for all other colors defined in Site Options (e.g. @pl-text, @pl-header,...).

 

Many thanks in advance!



#2 James B

James B

    Advocate

  • Moderators
  • 4979 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 19 July 2013 - 10:32 PM   Best Answer

Hi there,

 

I'm not a LESS guru so hold tight in case someone who knows exactly follows up on this. 

 

But as far as I'm aware that's the only preset variable for the main/background colour. From what I can see the @pl-base applies to the main body background and the other variables @darkbase @lightbase work off of that color.

It can be re-used to colour other classes if required by adding them to the css. Like .page-canvas {background:@pl-base;}

 

Or you can make your own variable and use that for the other areas you want to color. Like @pl-content-area for example.

 



#3 Erwan

Erwan

    Super Member

  • Members

  • 193 posts
  • Framework Version:Framework 2.4.4 - DMS 1.1.6 & 1.2
  • Country: Country Flag

Posted 20 July 2013 - 08:09 AM

James,

No, @pl-base doesn't refer to PL "body backround" color but to PL "content background" color defined in site options. It's just a matter of vocabulary that can be confusing: but nevermind, we coul call it "main color" ;)

And yes it's a very useful one, just like all variables linked to this same color i.e. @dark-base, @light-base, @baseContrastSlight, @baseContrast, @baseContrastMore, @baseContrastDark,...

 

It's just weird that the variables for "Body background" & "Page background" colors defined in site options are not available / "preset", as you confirm to me: it would help making customizations fully coherent with site options settings.

Instead, I created my own @pl-set-body-color + @pl-set-page-color variables and must not forget to change their value each time I change the corresponding colors in site settings: not a big deal but
I'm rather perfectionist ^_^ !



#4 Rob

Rob

    One Smart Egg

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

Posted 20 July 2013 - 02:53 PM

It seems you have resolved this matter.  I will let our developers know of your concerns.



#5 Erwan

Erwan

    Super Member

  • Members

  • 193 posts
  • Framework Version:Framework 2.4.4 - DMS 1.1.6 & 1.2
  • Country: Country Flag

Posted 21 July 2013 - 07:17 AM

Yes we can consider... in some way the matter is solved ;) Thanks.



#6 Rob

Rob

    One Smart Egg

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

Posted 21 July 2013 - 02:47 PM

Great!







Also tagged with one or more of these keywords: LESS, variables, color, core