-
Notifications
You must be signed in to change notification settings - Fork 88
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
Change background style target for tab icons #2374
Conversation
Signed-off-by: Louis Chemineau <[email protected]>
35650b4
to
8f3b4cf
Compare
To support the legacy icon methods iirc. But that changed when we added compatibility for the MaterialDesignIcons |
I am a bit puzzled why this only happens for the activity icon. All other icons in the files sidebar of c.nc.c are fine, although they also use the legacy icons and not material design. But your changes fix the problem, so 👍 |
I found out what causes this. The activity icon specifies a width, height and viewBox of 32 px in the svg: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.0" viewBox="0 0 32 32">
<path d="m16 1-10 18h11l-1 12 10-18h-11z" fill="#FFF"/>
</svg> whereas all other icons only specify the (correct) size of 16px, e.g. spreed: <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path d="m7.9992 0.999a6.9993 6.9994 0 0 0-6.9992 6.9996 6.9993 6.9994 0 0 0 6.9992 6.9994 6.9993 6.9994 0 0 0 3.6308-1.024c0.86024 0.34184 2.7871 1.356 3.2457 0.91794 0.47922-0.45765-0.56261-2.6116-0.81238-3.412a6.9993 6.9994 0 0 0 0.935-3.4814 6.9993 6.9994 0 0 0-6.9991-6.9993zm8e-4 2.6611a4.34 4.3401 0 0 1 4.34 4.3401 4.34 4.3401 0 0 1-4.34 4.3398 4.34 4.3401 0 0 1-4.34-4.3398 4.34 4.3401 0 0 1 4.34-4.3401z" fill="#fff" stroke-width=".14"/>
</svg> So for the larger activity icon we have to explicitly set the size correctly. |
/backport to stable4 |
The style was applied to the containing element instead of the icon element.
Don't know why the
background-position: center 8px;
was needed, so I removed it. It was also shifting icons toward the bottom when applied to the icon.Tested in
styleguide
.Fix: nextcloud/activity#669
Problem introduced here: #1939