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) {
min-width: 150px;
}
.dropdown-trigger {
white-space: nowrap;
}
vpu-icon {
height: 1em;
width: 1em;
......@@ -406,13 +402,22 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
fill: var(--vpu-light);
}
.loginbox .icon, .authbox {
display: inline-block;
}
.loginbox .label {
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) {
return html`
<div class="dropdown" @click="${this.onDropdownClick}">
<div class="dropdown-trigger">
<a href="#">
<span>${this.name}</span>
<a href="#">
<div class="dropdown-trigger">
<div class="name">${this.name}</div>
<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-content" @blur="${this.closeDropdown}">
${imageURL ? html`<div class="dropdown-item"><img alt="" src="${imageURL}"></div>` : ''}
......
......@@ -78,6 +78,10 @@ class AuthDemo extends ScopedElementsMixin(LitElement) {
font-weight: 600;
line-height: 1.125;
}
.container * {
max-width: 100%;
}
</style>
<section class="section">
<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