Archived

This topic is now archived and is closed to further replies.

Pagelines LESS Compiler Recommendation


4 posts in this topic

Posted · Report post

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!

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

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 -_-

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites