Skip to content
Permalink
Browse files
fix(b-avatar): set align-items: center for default slot content (fixes
: #5205) (#5207)

* fix(b-avatar): set `align-items: center` for default slot content (fixes: #5205)

* Update README.md

Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
  • Loading branch information
tmorehouse and jacobmllr95 committed Apr 22, 2020
1 parent 7be5bf3 commit c4981fd098253840a37e731331de65b0e732fc79
Showing 2 changed files with 14 additions and 5 deletions.
@@ -142,6 +142,19 @@ appearance, or if using custom icons or SVGs e.g.:
<b-avatar><custom-icon></custom-icon></b-avatar>
```

**Multi-line text example:**

```html
<template>
<div class="mb-2">
<b-avatar size="4em">Hello<br>World</b-avatar>
<b-avatar size="4em">你好<br>世界</b-avatar>
</div>
</template>

<!-- b-avatar-default-slot-multi-line.vue -->
```

**Notes:**

- The default slot takes precedence over the `text`, `src` and `icon` props.
@@ -46,16 +46,12 @@
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
}

.b-avatar-text {
text-transform: uppercase;
white-space: nowrap;
align-items: center;
}

.b-avatar-custom {
vertical-align: middle;
}

> .b-icon {

0 comments on commit c4981fd

Please sign in to comment.