@guardian/threads
Version:
82 lines (73 loc) • 1.59 kB
CSS
.root {
position: relative;
min-height: 1.6em;
width: 100%;
border: 1px solid var(--color-border);
border-radius: var(--radius-default);
background: var(--color-secondary-light);
box-sizing: border-box;
overflow: hidden;
padding: 1px;
display: flex;
align-items: stretch;
justify-content: flex-start;
}
.tier {
flex: 0 0 auto;
display: flex;
border: none;
height: calc(var(--size-vertical-base) / 2);
box-sizing: border-box;
align-items: center;
justify-content: flex-end;
font-size: 0.8rem;
transition: 0.25s;
float: left;
padding: 0 var(--sp-small);
border-radius: calc(var(--radius-default) - 1px);
background-color: var(--color-selected);
}
.tier[data-appearance='dangerous'] {
background-image: linear-gradient(
45deg,
var(--color-border-dark) 33.33%,
rgba(255, 255, 255, 0) 33.33%,
rgba(255, 255, 255, 0) 50%,
var(--color-border-dark) 50%,
var(--color-border-dark) 83.33%,
rgba(255, 255, 255, 0) 83.33%,
rgba(255, 255, 255, 0) 100%
);
background-size: 6px 6px;
}
.tier[data-appearance='fill'] {
background: transparent ;
min-width: 0 ;
width: auto;
flex: 1 1 0;
}
button.tier {
cursor: pointer;
}
.tier:focus,
.tier:hover {
box-shadow: 0 0 0 1px var(--color-selected);
outline: none;
position: relative;
z-index: 10;
}
.tier + .tier {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.tier:first-child:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.progress {
display: flex;
align-items: center;
opacity: 0.8;
width: 100%;
justify-content: flex-end;
}