Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Morpheus theme shouldn't force aspect ratio on custom branding logo #4408

Closed
nkuehn opened this issue Dec 19, 2013 · 4 comments
Closed

Morpheus theme shouldn't force aspect ratio on custom branding logo #4408

nkuehn opened this issue Dec 19, 2013 · 4 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@nkuehn
Copy link

nkuehn commented Dec 19, 2013

(found in 2.0.1)

The Morpheus theme currently sets a fixed height and width to the logo in the main interface:

#logo img {
    height: 21px;
    margin-top: 14px;
    width: 82px;
}

That overwrites the default (Zeitgeist?) that just sets 40px height.

I think: As not all Logos (e.g. branding) are made equal concerning their height the CSS shouldn't impose an aspect ratio by setting width and height to a fixed size (the size of the piwik logo). The same accounts for the absoulte height: not all logos work visually in 20px height. The Morpheus theme has space for max 50px high logos, but that looks to dense. The 40px default does in fact make sense.

My suggestion (logically, not directly CSS):

  • set a max-height instead of a fixed height (prevents smaller logos from being blown up to uglyness)
  • preserve aspect ratio (like Zeitgeist does)
  • center the logo vertically (not via setting a fixed "margin-top" that works only for the piwik logo).

Implementation of the vertical centering is a mess although. Vertical centering is one of the uglier areas of CSS (see http://www.vanseodesign.com/css/vertical-centering/ for all of its "beauty").

I just played around with using the (much more powerful and elegant) CSS background-* possibilities. They're nice, but finally not ideal because the width is unknown and the clickable area shouldn't be bigger or smaller than the logo.

A possible quick-fix could be to agree on a bigger fixed logo height (e.g. 34px like the current piwik raw logo file is), remove the width CSS and crack the the vertical-centering nut later.

PS: Same applies to the login screen, would be nice if the logo appears bigger there.

Keywords: theme, branding

@mattab
Copy link
Member

mattab commented Dec 25, 2013

Thanks for the report

@anonymous-matomo-user
Copy link

The suggestions in the bug report sound good to me. Another issue I found was that this setting in the config/piwik.ini.php file:

[branding]
use_custom_logo = 1

doesn't appear to be respected in Piwik 2.x.

@mattab
Copy link
Member

mattab commented Dec 26, 2013

In 5fce035: Adding class to core logo so that only core piwik logo is impacted by morpheus tweaks Fixes #4408
Thanks for the report!

@nkuehn
Copy link
Author

nkuehn commented Dec 26, 2013

Wow, that was quick.

Thanks a lot!

@nkuehn nkuehn added this to the 2.0.3 - Piwik 2.0.3 milestone Jul 8, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants