Fixed ellipsis usage on graph legend entries. (#10707)

This commit is contained in:
Luca Cavalli 2021-11-29 10:30:27 +01:00 committed by GitHub
parent 2c0b2f4bc5
commit e7fd75703f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ export default class HaChartBase extends LitElement {
borderColor: dataset.borderColor as string,
})}
></div>
${dataset.label}
<div class="label">${dataset.label}</div>
</li>`
)}
</ul>
@ -278,11 +278,9 @@ export default class HaChartBase extends LitElement {
}
.chartLegend li {
cursor: pointer;
display: inline-flex;
display: inline-grid;
grid-auto-flow: column;
padding: 0 8px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
box-sizing: border-box;
align-items: center;
color: var(--secondary-text-color);
@ -290,6 +288,11 @@ export default class HaChartBase extends LitElement {
.chartLegend .hidden {
text-decoration: line-through;
}
.chartLegend .label {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.chartLegend .bullet,
.chartTooltip .bullet {
border-width: 1px;