Skip to content

Commit

Permalink
Merge pull request #1277 from dnbexperience/fix/avatar-border
Browse files Browse the repository at this point in the history
Fix Avatar circle and logo
  • Loading branch information
tujoworker authored Feb 8, 2022
2 parents 3c9546e + cd8dd48 commit b91e745
Show file tree
Hide file tree
Showing 34 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const AvatarDNBLogo = () => (
{() => /* jsx */ `
<Avatar.Group label="Logos:">
<Avatar>
<Logo/>
<Logo size="auto" />
</Avatar>
</Avatar.Group>
`}
Expand Down Expand Up @@ -195,7 +195,7 @@ export const AvatarImageTobias = () => (
{() => /* jsx */ `
<Avatar.Group label="Profiles:">
<Avatar
src="https://avatars.githubusercontent.com/u/1501870?v=4"
src="/images/avatars/1501870.jpg"
alt="Profile picture"
size="large"
/>
Expand Down Expand Up @@ -303,13 +303,13 @@ export const GroupedAvatarsImg = () => (
<ComponentBox hideCode data-visual-test="avatar-grouped-image">
{() => /* jsx */ `
<Avatar.Group label="Eufemia contributors:" size="large" maxElements={5}>
<Avatar src="https://avatars.githubusercontent.com/u/1501870?v=4" alt="Profile picture"/>
<Avatar src="https://avatars.githubusercontent.com/u/35217511?v=4" alt="Profile picture"/>
<Avatar src="https://avatars.githubusercontent.com/u/21338570?v=4" alt="Profile picture"/>
<Avatar src="https://avatars.githubusercontent.com/u/1359205?v=4" alt="Profile picture"/>
<Avatar src="https://avatars.githubusercontent.com/u/1501870?v=4" alt="Profile picture"/>
<Avatar src="https://avatars.githubusercontent.com/u/1501870?v=4" alt="Profile picture"/>
<Avatar src="https://avatars.githubusercontent.com/u/1501870?v=4" alt="Profile picture"/>
<Avatar src="/images/avatars/1501870.jpg" alt="Profile picture"/>
<Avatar src="/images/avatars/35217511.jpg" alt="Profile picture"/>
<Avatar src="/images/avatars/21338570.jpg" alt="Profile picture"/>
<Avatar src="/images/avatars/1359205.jpg" alt="Profile picture"/>
<Avatar src="/images/avatars/1501870.jpg" alt="Profile picture"/>
<Avatar src="/images/avatars/1501870.jpg" alt="Profile picture"/>
<Avatar src="/images/avatars/1501870.jpg" alt="Profile picture"/>
</Avatar.Group>
`}
</ComponentBox>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ exports[`Avatar scss have to match snapshot 1`] = `
align-items: center;
justify-content: center;
flex-shrink: 0;
line-height: 1;
overflow: hidden;
user-select: none;
border-radius: 50%;
font-weight: var(--font-weight-medium); }
font-weight: var(--font-weight-medium);
line-height: 1; }
.dnb-avatar,
.dnb-core-style .dnb-avatar {
line-height: var(--button-height); }
Expand Down Expand Up @@ -164,8 +164,12 @@ exports[`Avatar scss have to match snapshot 1`] = `
justify-content: flex;
flex-direction: row; }
.dnb-avatar__group .dnb-avatar {
box-sizing: content-box;
border: 0.125rem solid var(--color-black-3); }
--border-color: var(--color-black-3);
box-shadow: 0 0 0 0.125rem var(--border-color);
border-color: transparent; }
@media screen and (-ms-high-contrast: none) {
.dnb-avatar__group .dnb-avatar {
box-shadow: 0 0 0 0.125rem var(--color-black-3); } }
.dnb-avatar__group .dnb-avatar--size-small {
margin-left: -0.5rem; }
.dnb-avatar__group .dnb-avatar--size-medium {
Expand All @@ -175,8 +179,7 @@ exports[`Avatar scss have to match snapshot 1`] = `
.dnb-avatar__group .dnb-avatar--size-x-large {
margin-left: -1.5rem; }
.dnb-avatar__group .dnb-avatar:nth-of-type(2) {
margin-left: 0;
border-left: none; }
margin-left: 0; }
.dnb-avatar__group--elements-left {
display: inline-flex;
align-items: center;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions packages/dnb-eufemia/src/components/avatar/style/_avatar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@
align-items: center;
justify-content: center;
flex-shrink: 0;
line-height: 1;

overflow: hidden;
user-select: none;

border-radius: 50%;
font-weight: var(--font-weight-medium);
line-height: 1;

// Safari needs a correct CSS specificity
&,
Expand Down Expand Up @@ -91,8 +92,7 @@
flex-direction: row;

.dnb-avatar {
box-sizing: content-box;
border: 0.125rem solid var(--color-black-3);
@include fakeBorder(var(--color-black-3), 0.125rem);

&--size-small {
margin-left: -0.5rem;
Expand All @@ -112,7 +112,6 @@

&:nth-of-type(2) {
margin-left: 0;
border-left: none;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ exports[`Logo scss have to match snapshot 1`] = `
*
*/
.dnb-logo {
display: inline-block;
display: inline-flex;
vertical-align: baseline;
font-size: inherit;
line-height: var(--line-height-xx-small--em);
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/logo/style/_logo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

.dnb-logo {
display: inline-block;
display: inline-flex;
vertical-align: baseline;
font-size: inherit;
line-height: var(
Expand Down

0 comments on commit b91e745

Please sign in to comment.