Skip to content

Commit c4981fd

Browse files
fix(b-avatar): set align-items: center for default slot content (fixes: bootstrap-vue#5205) (bootstrap-vue#5207)
* fix(b-avatar): set `align-items: center` for default slot content (fixes: bootstrap-vue#5205) * Update README.md Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
1 parent 7be5bf3 commit c4981fd

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/components/avatar/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,19 @@ appearance, or if using custom icons or SVGs e.g.:
142142
<b-avatar><custom-icon></custom-icon></b-avatar>
143143
```
144144

145+
**Multi-line text example:**
146+
147+
```html
148+
<template>
149+
<div class="mb-2">
150+
<b-avatar size="4em">Hello<br>World</b-avatar>
151+
<b-avatar size="4em">你好<br>世界</b-avatar>
152+
</div>
153+
</template>
154+
155+
<!-- b-avatar-default-slot-multi-line.vue -->
156+
```
157+
145158
**Notes:**
146159

147160
- The default slot takes precedence over the `text`, `src` and `icon` props.

src/components/avatar/_avatar.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,12 @@
4646
overflow: hidden;
4747
display: flex;
4848
justify-content: center;
49+
align-items: center;
4950
}
5051

5152
.b-avatar-text {
5253
text-transform: uppercase;
5354
white-space: nowrap;
54-
align-items: center;
55-
}
56-
57-
.b-avatar-custom {
58-
vertical-align: middle;
5955
}
6056

6157
> .b-icon {

0 commit comments

Comments
 (0)