Skip to content
Snippets Groups Projects
Commit 0dd4406c authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Don't enforce a minimal content width with the user name

By setting a max-width on the element it will use ellipsis to shorten the
user name
parent c3f7ef71
No related branches found
No related tags found
No related merge requests found
...@@ -370,10 +370,6 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { ...@@ -370,10 +370,6 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
min-width: 150px; min-width: 150px;
} }
.dropdown-trigger {
white-space: nowrap;
}
vpu-icon { vpu-icon {
height: 1em; height: 1em;
width: 1em; width: 1em;
...@@ -406,13 +402,22 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { ...@@ -406,13 +402,22 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
fill: var(--vpu-light); fill: var(--vpu-light);
} }
.loginbox .icon, .authbox {
display: inline-block;
}
.loginbox .label { .loginbox .label {
padding-left: 0.2em; padding-left: 0.2em;
} }
.dropdown-trigger {
display: flex;
align-items: center;
}
.dropdown-trigger .name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
margin-right: 0.5em
}
`; `;
} }
...@@ -448,12 +453,13 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { ...@@ -448,12 +453,13 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
return html` return html`
<div class="dropdown" @click="${this.onDropdownClick}"> <div class="dropdown" @click="${this.onDropdownClick}">
<div class="dropdown-trigger"> <a href="#">
<a href="#"> <div class="dropdown-trigger">
<span>${this.name}</span> <div class="name">${this.name}</div>
<vpu-icon name="chevron-down" id="menu-chevron-icon"></vpu-icon> <vpu-icon name="chevron-down" id="menu-chevron-icon"></vpu-icon>
</a>
</div> </div>
</a>
<div class="dropdown-menu" id="dropdown-menu2" role="menu"> <div class="dropdown-menu" id="dropdown-menu2" role="menu">
<div class="dropdown-content" @blur="${this.closeDropdown}"> <div class="dropdown-content" @blur="${this.closeDropdown}">
${imageURL ? html`<div class="dropdown-item"><img alt="" src="${imageURL}"></div>` : ''} ${imageURL ? html`<div class="dropdown-item"><img alt="" src="${imageURL}"></div>` : ''}
......
...@@ -78,6 +78,10 @@ class AuthDemo extends ScopedElementsMixin(LitElement) { ...@@ -78,6 +78,10 @@ class AuthDemo extends ScopedElementsMixin(LitElement) {
font-weight: 600; font-weight: 600;
line-height: 1.125; line-height: 1.125;
} }
.container * {
max-width: 100%;
}
</style> </style>
<section class="section"> <section class="section">
<div class="container"> <div class="container">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment