Skip to content

Commit 679b97b

Browse files
committed
fix: vertically center icons in flex rows
1 parent 7c2f142 commit 679b97b

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:host {
2+
display: inline-flex;
3+
}
4+
5+
// Block removes the inline-baseline descender gap, so the glyph sits on the
6+
// true vertical centre inside flex rows (buttons, links, captions).
7+
svg {
8+
display: block;
9+
}

src/app/shared/components/icon/icon.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { SocialIcon } from '@core/models/portfolio.interface';
66
selector: 'app-icon',
77
changeDetection: ChangeDetectionStrategy.OnPush,
88
templateUrl: './icon.html',
9+
styleUrl: './icon.scss',
910
})
1011
export class Icon {
1112
readonly name = input.required<SocialIcon>();

0 commit comments

Comments
 (0)