Jump to content


Photo
- - - - -

Pagelines LESS Compiler Recommendation

framework less compiler

  • Please log in to reply
3 replies to this topic

#1 dokether

dokether

    Advanced Member

  • Members


  • 30 posts
  • LocationEdmonton, AB
  • Framework Version:2.4.2
  • Country: Country Flag

Posted 19 January 2013 - 04:42 AM

Hey Guys,

 

I have just a small recommendation for the next iterative upgrade of Pagelines. If you can, I would really appreciate it if you could tell your compiler to stick the child theme's style.less file in AFTER you stick the main wp-admin chosen styles in. I'm working on a site right now that I'm using a custom font on, so I've setup the fonts and some mixins in the style.less file, however, all of it is getting overridden because the styles chosen in the backend are being added to the compiled stylesheet after the child theme's .less styles. Just to make this a bit more tangible:

 

 
@font-face {
    font-family: 'FontinRegular';
    src: url(@{plChildRoot}/lib/fontin/fontin_sans_r_45b-webfont.eot);
    src: url(@{plChildRoot}/lib/fontin/fontin_sans_r_45b-webfont.eot?#iefix) format('embedded-opentype'),
         url(@{plChildRoot}/lib/fontin/fontin_sans_r_45b-webfont.woff) format('woff'),
         url(@{plChildRoot}/lib/fontin/fontin_sans_r_45b-webfont.ttf) format('truetype'),
         url(@{plChildRoot}/lib/fontin/fontin_sans_r_45b-webfont.svg#fontin_sans_rgregular) format('svg');
    font-weight: normal;
    font-style: normal;
}
// Font Mixin
.fontinRegular(){ font-family: FontinRegular, Helvetica, Verdana, Arial, sans-serif;}
// Add Mixin
.site-title{
	.fontinRegular();
}

And when I look at the stylesheet, Firebug shows it coming up like this:

 
// line 8949
thead, h1, h2, h3, h4, h5, h6, .site-title {
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: bold;
}
// line 7207
.site-title {
    font-family: FontinBold,FontinRegular,Helvetica,Verdana,Arial,sans-serif;
}

In essence meaning my custom font is being overridden because the default/wp-admin styles are being added in afterward. So I have to add an !important into the .fontinRegular() mixin so that it doesn't get wiped out by the other style calls.

 

You would make my life, and really any other developer's life much easier if my child theme's style.less is the last one to be added to the compiler :)

 

Thank you!



#2 Rob

Rob

    One Smart Egg

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

Posted 19 January 2013 - 05:14 AM

Hi,

 

Thank you for making this suggestion.  I've moved the topic to a different category to make sure it gets the attention it deserves from our developers.

 

I see you've found a solution with the !important tag, and was about to suggest an option of placing the font call in Custom Code, but that really defeats your purpose.

 

I'm going to bring this to our developers' attention directly.

 

Again, many thanks for alerting us to this issue.



#3 dokether

dokether

    Advanced Member

  • Members


  • 30 posts
  • LocationEdmonton, AB
  • Framework Version:2.4.2
  • Country: Country Flag

Posted 20 January 2013 - 06:53 AM

You're most welcome! I absolutely love this framework and don't have enough good things to say about it, but something like this will make a huge difference for some of the more experienced developers like myself that prefer hacking away in the actual files vs. the wordpress backend. And sorry for posting in the wrong category, was a little late at night when I came to the awareness and wasn't thinking when I posted -_-



#4 Rob

Rob

    One Smart Egg

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

Posted 22 January 2013 - 04:27 AM

No worries.  That's why they give me moderator privileges.







Also tagged with one or more of these keywords: framework, less, compiler