mnml/client/assets/styles/vbox.less
2019-12-29 16:33:45 +10:00

320 lines
6.8 KiB
Plaintext

.vbox {
align-content: space-between;
grid-area: vbox;
display: grid;
grid-template-rows: 3fr minmax(min-content, 2fr);
grid-template-columns: 1fr 4fr 6fr minmax(min-content, 2fr);;
grid-template-areas:
"store-hdr store info-combiner combos"
"stash-hdr stash info-combiner combos";
margin-bottom: 1em;
// immediate children
> div {
padding: 0.5em;
}
label {
line-height: 0;
}
.store {
grid-area: store;
border-right: 0.15em solid @gray;
border-top: 0.15em solid @gray;
}
.store-hdr {
grid-area: store-hdr;
display: flex;
flex-flow: column;
text-align: center;
border-left: 0.15em solid @gray;
border-top: 0.15em solid @gray;
h1 {
margin-bottom: 0.5em;
}
button {
line-height: 1.6;
letter-spacing: 0.15em;
background-color: #421010;
&:hover {
background-color: @red;
}
}
}
.stash {
grid-area: stash;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 0.5em 1em;
align-items: center;
border: 0.15em solid @gray;
border-left: 0;
}
.stash-hdr {
grid-area: stash-hdr;
display: flex;
flex-flow: column;
text-align: center;
border: 0.15em solid @gray;
border-right: 0;
h2 {
margin-bottom: 0.5em;
}
button {
line-height: 1.6;
letter-spacing: 0.15em;
border-width: 0.1em;
}
}
.vbox-hdr {
margin-bottom: 1em;
height: 2em;
}
.vbox-colours {
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-gap: 0.5em 1em;
align-items: center;
margin-bottom: 0.5em;
}
.vbox-items {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 0.5em 1em;
align-items: center;
}
.vbox-btn {
width: 100%;
margin: 0;
background-color: @gray-box;
line-height: 1em;
border-width: 0;
:active, :hover, :focus {
color: white;
}
&[disabled] {
background: black;
border-width: 0.1em;
};
}
.Refunding {
button:not([disabled]) {
&, &:hover, &:active {
background: @red;
color: black;
border: 0.1em solid black;
}
}
svg {
stroke-width: 0.75em;
}
.white {
stroke: black;
}
}
button {
height: 3.5em;
margin: 0;
width: 100%;
// text-transform: none;
&.empty {
border-style: dashed;
}
&.fade {
opacity: 0.4;
}
&.highlight {
background: @silver;
// overwrite the classes on white svg elements
svg {
stroke-width: 0.75em;
}
}
}
// figures don't scale well
figure {
svg {
height: 1.5em;
stroke-width: 0.5em;
}
figcaption {
line-height: initial;
}
}
.info-combiner {
grid-area: info-combiner;
display: grid;
grid-template-areas:
"info"
"combiner";
grid-template-rows: min-content 1fr;
.info {
grid-area: info;
line-height: 1.6;
height: 100%;
h2 {
text-transform: uppercase;
}
svg {
display: inline;
height: 1em;
}
figure {
display: inline;
height: 0.5em;
svg {
margin-right: 0.5em;
}
}
figcaption {
font-size: 1em;
display: inline-block;
vertical-align: middle;
}
margin-left: 1em;
}
.combiner {
grid-area: combiner;
margin: 1em 0.5em;
width: 50%;
line-height: 1.3;
font-size: 1.25em;
letter-spacing: 0.1em;
border: 0.1em solid @gray-exists;
&:hover {
border: 0.1em solid @gray-hover;
}
}
// align-self: flex-end;
}
.combos {
display: grid;
grid-area: combos;
margin-left: 0.5em;
margin-right: 0.5em;
grid-template-rows: min-content min-content;
width: 15.5em;
grid-template-areas:
"comboHeader"
"comboList";
h2 {
text-transform: uppercase;
}
svg {
display: inline;
height: 1em;
}
figure {
display: inline;
height: 0.5em;
svg {
margin-right: 0.5em;
}
}
figcaption {
font-size: 1em;
display: inline-block;
vertical-align: middle;
}
.combo-header {
text-align: center;
}
.combo-list {
display: grid;
grid-template-rows: min-content min-content min-content;
grid-template-columns: min-content min-content;
grid-gap: 0.5em;
margin-top: 0.5em;
width: 15.5em;
.table-button {
display: grid;
text-align: center;
align-content: center;
grid-template-areas:
"item"
"ingr";
cursor: pointer;
&:hover {
color: whitesmoke;
background-color: @gray;
}
.item {
border-top: 0.1em solid #222;
border-bottom: 0.1em solid #222;
flex: 1;
grid-area: item;
font-weight: bold;
div {
width: 5em;
}
}
div {
border-left: 0.1em solid #222;
border-right: 0.1em solid #222;
height: 1.75em;
width: 7.5em;
svg {
vertical-align: middle;
}
&:last-child {
border-bottom: 0.1em solid #222;
}
}
}
}
}
}
@media (min-width: 2000px) {
.vbox {
button {
height: 4.5em;
}
}
}