Skip to content

Commit

Permalink
set default size for embedded SVGs
Browse files Browse the repository at this point in the history
many templates fail to set proper sizes for admin icons etc. This will
prevent SVGs from blowing up by default - of course templates should
still overwrite this default.
  • Loading branch information
splitbrain committed Nov 27, 2021
1 parent b9a4556 commit b43eead
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/styles/all.css
Expand Up @@ -70,3 +70,8 @@ em em.u {
img.icon.smiley {
height: 1.2em;
}

svg {

This comment has been minimized.

Copy link
@jdehaan

jdehaan Jul 21, 2022

I suggest adding a css class semantically tied to that use case and avoid bad style global overrides. What is maybe good for admin templates is bad for plugins, they have no chance to override this as they come first in the css chain and would need to set styles on the elements which is cumbersome in some cases.

Turns out that it can be tweaked by making more precise styles. I leave this comment here as it might help others in need.

width: auto;
height: 1.2em;
}

0 comments on commit b43eead

Please sign in to comment.