SimonSays/style.css

176 lines
4.2 KiB
CSS
Raw Permalink Normal View History

html, body {
overflow-x: hidden;
}
2019-02-26 11:04:05 +01:00
2019-02-25 23:22:37 +01:00
body {
margin: 0;
2019-02-26 11:04:05 +01:00
background: rgb(39, 34, 39);
2019-02-25 23:22:37 +01:00
outline: 0;
position: relative;
2019-02-25 23:22:37 +01:00
}
:root{
--grid-width: 6;
--grid-height: 6;
2019-02-26 10:09:24 +01:00
--button-margin: 0.5vh;
--tile-size: calc((100vh / var(--grid-height)) - 2 * var(--button-margin));
2019-02-26 11:04:05 +01:00
--opacity: 0.2;
2019-02-26 10:09:24 +01:00
--border-radius: 1vh;
--sidebar-width: 25vh;
--sidebar-height: none; /* unused if not in portrait mode */
2019-02-26 10:09:24 +01:00
}
/* override settings on portrait mode: */
@media (orientation: portrait) {
:root{
--button-margin: 0.5vw;
--tile-size: calc((100vw / var(--grid-width)) - 2 * var(--button-margin));
--border-radius: 1vw;
2019-02-26 10:12:12 +01:00
--sidebar-width: 40vw;
--sidebar-height: 15vw;
2019-02-26 10:09:24 +01:00
}
2019-02-26 00:25:17 +01:00
2019-02-25 23:22:37 +01:00
}
.grid-button {
border-radius: var(--button-margin);
margin: var(--button-margin);
width: calc(var(--tile-size) - (var(--button-margin) * 2));
height: calc(var(--tile-size) - (var(--button-margin) * 2));
display: inline-block;
outline: 0;
2019-02-26 11:04:05 +01:00
transition-duration: 0.1s;
2019-02-25 23:22:37 +01:00
}
.grid-button:focus {
outline: 0!important;
}
.control-button {
2019-02-26 10:09:24 +01:00
border-radius: var(--border-radius);
margin: var(--border-radius);
2019-02-25 23:22:37 +01:00
border: none;
display: list-item;
outline: 0;
transition-duration: 0.3s;
background: rgba(0, 0, 0, var(--opacity));
color: rgb(255, 255, 255);
2019-02-26 10:09:24 +01:00
font-size: calc(5 * var(--border-radius));
width: var(--sidebar-width);
2019-02-25 23:22:37 +01:00
}
.control-button:hover {
background: rgba(255, 255, 255, var(--opacity));
}
.control-button:active {
background: rgba(255, 255, 255, calc(var(--opacity) * 2));
}
.info-button {
2019-02-26 10:09:24 +01:00
border-radius: var(--border-radius);
margin: var(--border-radius);
2019-02-25 23:22:37 +01:00
border: none;
outline: 0;
transition-duration: 0.3s;
display: flex;
flex-direction: column;
background: none;
color: rgb(255, 255, 255);
2019-02-26 10:09:24 +01:00
font-size: calc(5 * var(--border-radius));
width: var(--sidebar-width);
2019-02-25 23:22:37 +01:00
}
.status-button {
2019-02-26 10:09:24 +01:00
border-radius: var(--border-radius);
margin: var(--border-radius);
2019-02-25 23:22:37 +01:00
border: none;
outline: 0;
transition-duration: 0.3s;
display: flex;
flex-direction: column;
background: none;
color: rgb(128, 128, 128);
2019-02-26 10:09:24 +01:00
font-size: calc(2 * var(--border-radius));
width: var(--sidebar-width);
2019-02-25 23:22:37 +01:00
}
.grid-tile {
position: absolute;
width: var(--tile-size);
height: var(--tile-size);
float: center;
background: none;
}
.main-container {
text-align: center;
2019-02-25 23:53:21 +01:00
white-space: nowrap;
2019-02-26 10:09:24 +01:00
padding-top: calc(50vh - 0.5 * (var(--grid-height) * var(--tile-size)) - var(--border-radius));
}
/* override settings on portrait mode: */
@media (orientation: portrait) {
.main-container {
white-space: normal;
2019-02-26 15:10:49 +01:00
padding-top: calc(50vh - 0.5 * (var(--grid-height) * var(--tile-size) + 2 * var(--sidebar-height)) - 2 * var(--border-radius));
2019-02-26 10:09:24 +01:00
}
2019-02-25 23:22:37 +01:00
}
.grid-container {
2019-02-26 10:09:24 +01:00
border-radius: var(--border-radius);
padding: var(--border-radius);
2019-02-25 23:22:37 +01:00
margin: auto;
width: calc(var(--grid-width) * var(--tile-size));
height: calc(var(--grid-height) * var(--tile-size));
background: rgba(0, 0, 0, var(--opacity));
display: inline-block;
2019-02-26 11:04:05 +01:00
transition-duration: 0.5s;
2019-02-25 23:22:37 +01:00
}
.sidebar-container {
2019-02-26 10:09:24 +01:00
border-radius: var(--border-radius);
padding: var(--border-radius);
2019-02-25 23:22:37 +01:00
vertical-align: top;
background: rgba(0, 0, 0, var(--opacity));
display: inline-flex;
justify-content: space-between;
flex-direction:column;
min-height: calc(var(--grid-height) * var(--tile-size));
position: relative;
2019-02-26 11:04:05 +01:00
transition-duration: 0.5s;
2019-02-25 23:22:37 +01:00
}
2019-02-26 10:09:24 +01:00
/* override settings on portrait mode: */
@media (orientation: portrait) {
.sidebar-container {
display: inline-flex;
justify-content: space-between;
flex-direction:row;
min-height: var(--sidebar-height);
2019-02-26 10:09:24 +01:00
min-width: calc(var(--grid-width) * var(--tile-size));
}
}
2019-02-25 23:22:37 +01:00
.control-container {
2019-02-26 10:09:24 +01:00
border-radius: var(--border-radius);
padding: var(--border-radius);
2019-02-25 23:22:37 +01:00
top: 0;
background: none;
}
.info-container {
2019-02-26 10:09:24 +01:00
border-radius: var(--border-radius);
padding: var(--border-radius);
2019-02-25 23:22:37 +01:00
bottom: 0;
display: inline-block;
vertical-align: middle;
text-align: center;
background: none;
2019-02-25 23:53:21 +01:00
white-space: normal;
2019-02-25 23:22:37 +01:00
}