@lyra/components
Version:
Basic UX components
94 lines (78 loc) • 1.3 kB
CSS
@import 'part:@lyra/base/theme/variables-style';
.root {
position: relative;
width: 100%;
height: 100%;
box-sizing: border-box;
outline: none ;
}
.hasFocus {
composes: root;
}
.noFocus {
composes: root;
}
.eventHandler {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
box-sizing: border-box;
@nest .hasFocus & {
pointer-events: none;
}
}
.content {
position: relative;
z-index: 0;
}
.overlay {
background-color: color(var(--component-bg) a(95%));
z-index: 2;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
transition: opacity 0.1s linear;
opacity: 0;
@nest .noFocus:hover & {
opacity: 0.9;
}
@nest .hasFocus & {
opacity: 0;
}
}
.message {
z-index: 3;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
user-select: none;
transition: opacity 0.1s linear;
opacity: 0;
text-align: center;
@nest .noFocus:hover & {
opacity: 1;
}
@nest .hasFocus & {
opacity: 0;
}
}
.stringMessage {
composes: message;
font-size: 1.5rem;
pointer-events: none;
text-transform: uppercase;
@nest .hasFocus & {
pointer-events: none;
}
}
.html {
composes: message;
pointer-events: auto;
font-size: 1em;
}