mnml/client/assets/styles/game.less

368 lines
6.2 KiB
Plaintext

@import 'colours.less';
/* GAME */
.game {
overflow: hidden;
// display: grid;
// grid-template-rows: 1fr 0.75fr 1.5fr;
// grid-template-columns: 1fr;
// grid-template-areas:
// "opponent"
// "target "
// "player ";
.skill-description {
font-size: 75%;
}
}
.game .team, .faceoff .team {
display: grid;
grid-template-columns: repeat(3, 1fr);
/* stops overflow */
min-height: 0;
min-width: 0;
// timer is 0.25 w/ 1em margin
width: calc(90% - 1.25em);
}
.player {
grid-area: player;
z-index: 5;
position: absolute;
bottom: 0;
height: 50%;
}
.opponent {
grid-area: opponent;
position: absolute;
top: 0;
height: 35%;
margin-top: 0.5em;
.game-construct {
align-items: flex-start;
grid-template-rows: 2fr min-content;
grid-template-rows: 1fr;
grid-template-areas:
"right"
"left";
.right {
height: 100%;
display: grid;
grid-template-rows: min-content min-content 1fr;
grid-template-areas:
"stats"
"name"
"avatar";
}
.effects {
align-self: flex-start;
}
}
.game-construct .name {
margin-bottom: 0;
margin-top: 0.25em;
}
}
.game-construct {
display: grid;
/*IMPORTANT*/
/* ensures combat text doesn't fly off back to the body
searching for a positioned element because everything is in the grid
*/
position: relative;
justify-items: center;
grid-template-columns: 1fr;
grid-template-rows: 1fr 2fr;
grid-template-areas:
"left"
"right";
.left {
width: 100%;
display: grid;
grid-area: left;
grid-template-columns: 1fr 2fr;
grid-template-areas:
"skills effects";
}
.right {
display: grid;
grid-area: right;
grid-template-rows: minmax(min-content, 1fr) min-content min-content;
grid-template-areas:
"avatar"
"name"
"stats";
width: 100%;
}
transition-property: translate, opacity;
transition-duration: 0.25s;
transition-delay: 0;
transition-timing-function: ease;
.effects {
text-align: right;
}
.stats {
align-self: flex-end;
}
.name {
width: 100%;
margin-bottom: 0.25em;
text-align: center;
grid-area: name;
}
.skills {
z-index: 2;
button {
width: 100%;
height: 2em;
margin-right: 1em;
}
button.active {
background: #2c2c2c;
}
}
.effects {
z-index: 2;
grid-area: effects;
white-space: nowrap;
width: 100%;
text-align: center;
font-size: 1.5em;
}
.stats {
grid-area: stats;
display: flex;
justify-content: center;
text-align: center;
}
.stats div {
padding: 0 0.5em;
display: flex;
flex-flow: column;
white-space: nowrap;
text-align: center;
}
.stats .value {
display: none;
}
figcaption {
white-space: nowrap;
font-size: 100%;
}
&.ko {
animation: none;
opacity: 0.20;
}
&.ko button:hover {
color: #333;
}
&.unfocus {
opacity: 0.35;
}
&.unfocus.ko {
opacity: 0.20;
}
}
@media (max-width: 1500px) {
.game-construct figure {
padding: 0 0.25em;
}
}
#targeting {
grid-area: target;
// height: 100%;
// width: 100%;
stroke-width: 2px;
stroke: whitesmoke;
}
#targeting, .resolving-skill {
position: absolute;
top: 35%;
height: 15%;
width: calc(90% - 1.25em);
}
.resolving-skill {
grid-area: target;
text-align: center;
align-self: center;
height: auto;
svg {
display: inline;
height: 1em;
margin-right: 0.1em
}
}
.skill-description {
padding-left: 1em;
padding-right: 1em;
text-align: center;
font-size: 0.8em;
svg {
display: inline;
height: 1em;
margin-right: 0.1em
}
}
/* some stupid bug in chrome makes it fill the entire screen */
@media screen and (-webkit-min-device-pixel-ratio:0) {
#targeting {
max-height: 10em;
}
}
.combat-anim {
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
max-height: 100%;
max-width: 100%;
display: flex;
flex-flow: column;
}
.combat-anim svg {
flex: 1;
// chrome shit
width: 100%;
height: 100%;
}
.game-construct.red-damage {
color: #a52a2a;
/*ensure construct doesn't get opacity lowered because of being KO before the KO animation*/
opacity: 1;
}
.red-damage button {
color: #a52a2a;
}
.red-damage text {
fill: #a52a2a;
}
.red-damage .stats {
/*border-top: 1px solid #a52a2a;*/
}
.game-construct.blue-damage {
color: #3050f8;
opacity: 1;
}
.blue-damage button {
color: #3050f8;
}
.blue-damage text {
fill: #3050f8;
}
.blue-damage .stats {
}
.game-construct.green-damage {
color: #1FF01F;
opacity: 1;
}
.green-damage button {
color: #1FF01F;
}
.green-damage text {
fill: #1FF01F;
}
.green-damage .stats {
/*border-top: 1px solid #1FF01F;*/
}
.game-construct.purple-damage {
/* filter: drop-shadow(0 0 0.2em purple);
*/ color: purple;
border-color: purple;
}
.purple-damage button {
border: 1px solid purple;
color: purple;
}
.purple-damage text {
fill: purple;
}
.purple-damage .stats {
border-top: 1px solid purple;
}
.game .img, .faceoff .img {
position: relative;
height: 100%;
}
.game .avatar, .faceoff .avatar {
grid-area: avatar;
width: 100%;
height: 100%;
grid-area: avatar;
object-fit: contain;
background-size: contain;
background-repeat: no-repeat;
background-position: top;
// pointer-events: none;
}
.animating .skills {
opacity: 0;
}
.skill-animation {
opacity: 0;
stroke-width: 5px;
overflow: hidden;
max-height: 100%;
max-width: 100%;
}