Skip to content

Commit

Permalink
fix(b-avatar): set align-items: center for default slot content (fixes
Browse files Browse the repository at this point in the history
: #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 c4981fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 13 additions & 0 deletions src/components/avatar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 1 addition & 5 deletions src/components/avatar/_avatar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c4981fd

Please sign in to comment.