Jump to content
jefflewispagelines

Change Default Banner_Text_Padding

Recommended Posts

jefflewispagelines

In the banners section.php, the default logic to add a "style" attribute is to include style="padding: 20px 40px" in the banner-text-pad div. This would by default, overrule any css from a child theme. It even overrules the padding in pageline banner's style.less seen below.

 

/sections/banners/style.less

 

.banner-text-pad {
   padding: 10px 30px;
}

 

/sections/banners/section.php

...

 

$pad = ploption('banner_text_padding', $oset);
$banner_text_padding = ($pad) ? sprintf('padding:%s;', $pad) : "padding: 20px 40px";
...
...
<div class="banner-text-pad pprand-pad" style="<?php echo $banner_text_padding;?>">
...
 
Can we change section.php to not use a style="" tag and rely on css for the default from Pagelines?

Share this post


Link to post
Share on other sites
Rob

I will bring this to the attention of our developers. 


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Simon

It only uses that default if you dont add a padding:

(optional) Set the padding for the text area. Use CSS shorthand, for example:<strong> 25px 30px 25px 35px</strong> for top, right, bottom, then left padding.<br/><br/><strong>Heads Up</strong> If you do not set this option, the banner will attempt to vertically align the text for you.

Share this post


Link to post
Share on other sites
jefflewispagelines
It only uses that default if you dont add a padding:

(optional) Set the padding for the text area. Use CSS shorthand, for example:<strong> 25px 30px 25px 35px</strong> for top, right, bottom, then left padding.<br/><br/><strong>Heads Up</strong> If you do not set this option, the banner will attempt to vertically align the text for you.

 

Do you mean it only uses this style if a user does not specify padding in the Pagelines UI for the banner?  If so, yes that is correct. I am referring to how it effects child theme development and the css of child themes. As it is today, PageLins puts a hard-coded padding value in the "style" attribute of the <div> tag, which will overrule css rules. This does not seem optimal and not consistent with the rest of Pagelines.  Requiring the users of a child theme to manually add the padding value in the PageLine UI is not ideal.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×