New Landing How can we help? Atelier Header logo size not functioning correctly after update v1.66

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Atelier
  • #202974
    Saskia
    Member
    Post count: 20

    I’m using a logo which is 92px high, but am displaying it at 46px (half-height) so it’s sharper on mobile devices.

    In the theme settings under ‘Logo Options’ I have the logo set to max-height of 46px, with padding of 10px above and below. With these settings, the header was displaying at 66px high and everything worked nicely.

    Now, after the v1.66 update, the theme seems to be ignoring the logo max-height setting. What happens now is the logo gets scaled to the full height of the header at 66px with no padding above or below the logo.

    I did some snooping in the sf-custom-styles.php file and found what I think is a bug.
    At line 896 there is this code:
    echo '.full-center #logo.has-img a > img {max-height: '.$header_height.';}';

    I think that header_height variable is wrong, so I changed it to:
    echo '.full-center #logo.has-img a > img {max-height: '.$logo_height.';}';

    And now it works perfectly, just like it did before.

    Is that a bug?

    #202975
    Saskia
    Member
    Post count: 20

    Oops, ok after some more snooping I don’t think that was the cause of the problem.

    It seems there is another piece of code which was added since the last update which is causing the issue:

    This code is newly added:

    $header_height_num = str_replace( $header_height, 'px', '' );
    				if ( $logo_maxheight > $header_height_num) {
    					$logo_maxheight = $header_height_num;

    I think that’s where it’s causing the logo to display at the same height as the header and it’s ignoring the max-height setting in the theme options. Possibly a bug?

    #202978
    Saskia
    Member
    Post count: 20

    For a visual explanation, see the attached images.
    In the theme options I have logo max height set to 46px, and logo padding set to 10px.
    In the image ‘Header-logo-correct’ the logo is showing correctly at 46px height with 10px padding above and below, making the header a total of 66px height.
    In the image ‘Header-logo-too-big’ the logo is showing at 66px height, with no padding above and below and the header is still 66px height. I think what’s happening now is it’s taking the logo max height (46px), adding the padding (10px+10px) which gives the header height of 66px, and then forcing the logo to be the same height which is not correct.

    Attachments:
    You must be logged in to view attached files.
    #203256
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    That’s odd, will check the files however I’ve not noticed this on our demos that have been updated

    – Kyle

    #203857
    MBzwo
    Member
    Post count: 45

    I have the same problem 🙂

    #203963
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Will fix this for the next update, if you want to fix it now go to atelier/includes/sf-custom-styles.php and edit line 896:

     // LOGO STYLES
    			if ( $logo_height != "" ) {
    			    echo '#logo.has-img, .header-left, .header-right {height:' . $logo_height . 'px;}';
    			    echo '#mobile-logo {max-height:' . $logo_height . 'px;}';
    			    echo '#mobile-logo.has-img img {max-height:' . $logo_height . 'px;}';
    			    echo '.full-center #logo.has-img a > img {max-height: '.$header_height.';}';
    			    echo '.header-left, .header-right {line-height:' . $logo_height . 'px;}';
    			}

    It should be $logo_height instead of $header_height

    – Kyle

    #204772
    Saskia
    Member
    Post count: 20

    Thanks Kyle.

    #204801
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register