fix: give header brand icon a fixed size
The brand <img> sized itself with width/height:100%, but it isn't wrapped in a sized container like the fallback letter-mark is, and its flex-item parent has no definite size for the percentage to resolve against - so it rendered at whatever intrinsic size the favicon happened to report instead of a consistent icon size.
This commit is contained in:
1 parent
6c364623fd
commit
a90f4eb71f
1 file changed
+7
-3
@@ -75,11 +75,15 @@
|
||||
}
|
||||
|
||||
.sc-brand-icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* Fixed instead of percentage-based: the icon isn't wrapped in a sized container (unlike
|
||||
.sc-brand-mark, which this rule mirrors), and .sc-brand's own width is content-driven, so
|
||||
a percentage here has no definite box to resolve against and lets the image render at
|
||||
whatever intrinsic size its source happens to have. */
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
padding: 0.25rem;
|
||||
object-fit: contain;
|
||||
border-radius: inherit;
|
||||
border-radius: var(--sc-radius-md);
|
||||
}
|
||||
|
||||
.sc-nav {
|
||||
|
||||
Reference in new issue
Block a user