cyp/app/css/mixins.less
2020-03-13 16:52:24 +01:00

73 lines
1.1 KiB
Text

.flex-row {
&:not([hidden]) { display: flex; }
flex-direction: row;
align-items: center;
}
.flex-column {
&:not([hidden]) { display: flex; }
flex-direction: column;
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
}
.selectable {
cursor: pointer;
position: relative; // kotva pro selected::before
&.selected {
xbackground-color: var(--primary-tint); // FIXME jak zvyraznovat?
&::before {
content: "";
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: var(--border-width);
background-color: var(--primary);
}
&::after {
content: "";
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
background-color: var(--primary-tint);
}
}
}
.item {
.flex-row;
.selectable;
padding: 8px;
&:nth-child(odd) {
background-color: var(--bg-alt);
}
> .icon {
margin-right: var(--icon-spacing);
filter: drop-shadow(var(--text-shadow));
}
.title {
font-weight: bold;
// FIXME take line-height, at vychazi celociselne
font-size: var(--font-size-large);
min-width: 0;
.ellipsis;
}
button {
&:first-of-type { margin-left: auto; }
.icon { width: 32px; }
}
}