Files
node-factorio-recipes/components/home/EntitySpan/EntitySpan.module.css
2022-08-12 19:05:15 +02:00

121 lines
1.9 KiB
CSS

.span {
background: lightgray;
font-size: 1em;
border: 1px solid white;
display: inline-block;
position: relative;
padding-inline: 0.2em;
border-radius: 4px;
}
.spanSimple {
padding-inline-start: 0.2em;
position: relative;
display: inline-block;
}
.tooltip {
--background: lightsalmon;
--arrow-width: 0.6em;
--arrow-height: 0.4em;
display: none;
position: absolute;
left: calc(100% + var(--arrow-width));
top: -5000%;
bottom: -5000%;
margin: auto 0;
width: max-content;
height: max-content;
background: var(--background);
padding: 0.5em;
border-radius: 0.7em;
z-index: 1;
}
.span:is(:focus, :hover) > .tooltip {
display: initial;
}
.tooltip::before {
content: "";
border-style: solid;
top: 0;
bottom: 0;
margin: auto 0;
height: max-content;
border-width: var(--arrow-height) var(--arrow-width) var(--arrow-height) 0;
border-color: transparent var(--background) transparent transparent;
position: absolute;
left: calc(var(--arrow-width) * -1 + 1px);
}
.img {
display: inline-block;
width: 1em;
height: 1em;
margin-inline-end: 0.2em;
transform: translateY(0.1em);
}
.base {
color: darkgreen;
}
.produced {
color: darkgoldenrod;
}
.unknown {
color: inherit;
}
.strong {
font-weight: 600;
margin-block: 1em 0.4em;
}
.strong:first-child {
margin-block-start: 0;
}
.usedBy {
max-width: 20em;
}
.leftClick {
height: 1em;
transform: translateY(0.1em);
}
.rightClick {
height: 1em;
transform: scaleX(-1) translateY(0.1em);
}
.clickBtn {
fill: red;
}
@media (prefers-color-scheme: dark) {
.span {
border-color: #111111;
background-color: #444;
}
.base {
color: lightgreen;
}
.produced {
color: lightsalmon;
}
.unknown {
color: lightgray;
}
.tooltip {
--background: darkred;
}
}