Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

branding: Logo breaks layout (size handling generally inconsistent) #5051

Closed
nkuehn opened this Issue · 5 comments

3 participants

Nikolaus Kühn Matthieu Aubry JimTheFrog
Nikolaus Kühn

Hi,
here's a regression that came in with 2.2.0 (or 2.1.0, which I skipped): If using an own branding logo, the file gets scaled up to 100px height no matter what file I upload, which again leads to the top bar being bloated up to 100px height, as there's no more CSS that restricts the size.

My overall Impression is that there's no consistent concept behind handling the custom logos. A few examples:

  • the backend UI asks for an image at least 110px high, but the code scales the image to 100px height.
  • these size requirements don't fit the CSS of the themes.
  • the size requirement is not enforced, but instead the image is rescaled serverside to 100px with the worst available interpolation algorighm (makes quality worse than the browser would scale and increases the file size, yeah!)
  • 100px seems a random fixation as the height is per-theme and themes can choose any height.

I personally would drop the server-side rescaling completely and just implement a hard enforcing of a minimum pixel height (e.g. for the login screen) and a maximum file size as a security precaution. Leave the Scaling completely to the CSS of the Theme after that. The image is in the Browser cache anyways after the login screen, so there's no performance penalty at all. Just my two cents.
Keywords: theme, branding

Matthieu Aubry
Owner

Thanks for the report: there is a problem and some inconsistencies indeed...

JimTheFrog

I confirm these problems, and suggest that there be no minimum pixel height, or at least something much smaller than 110px, which is way too tall. The default Piwik logo, for example, is 80x21. If the Piwik logo were forced to be 110px high it would be 419px wide, which would take over a quarter of the average screen width!

Also, I'm seeing colors reversed when uploading PNGs. (Happy to provide sample files if needed for testing).

Matthieu Aubry
Owner

In 81b6343: Fixes #5051 Custom Logo rules now are:

  • On Login page, custom logo displayed with width: 240px ```
  • On dashboard and admin pages, custom logo displayed with max-height: 50px;

Please report if you still have some issue (you can delete tmp/assets/* files to re-generate css)

Matthieu Aubry
Owner

Also, I'm seeing colors reversed when uploading PNGs.

This sounds like a different issue, can you please create new ticket with sample PNG we can use to reproduce?

Nikolaus Kühn

Thanks for fixing this in 2.3.0!

Nikolaus Kühn nkuehn added this to the 2.3.0 - Piwik 2.3.0 milestone
Matthieu Aubry mattab was assigned by nkuehn
Frederic Hemberger fhemberger referenced this issue from a commit
Matthieu Aubry mattab Fixes #5051 Custom Logo rules now are:
 * On Login page, custom logo displayed with {{{ width: 240px }}}
 * On dashboard and admin pages, custom logo displayed with  {{{ max-height: 50px; }}}

Please report if you still have some issue (you can delete tmp/assets/* files to re-generate css)
81b6343
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.