383 lines
6.2 KiB
CSS
Executable File
383 lines
6.2 KiB
CSS
Executable File
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
|
|
body {
|
|
background-color: #fff;
|
|
color: #000;
|
|
font-family: 'Courier New', Courier, monospace;
|
|
}
|
|
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
#sidebar {
|
|
white-space: nowrap;
|
|
background-color: #fff;
|
|
}
|
|
|
|
.menu {
|
|
margin: 0;
|
|
padding: 0;
|
|
margin-top: 1.5em;
|
|
margin-left: 0.5em;
|
|
list-style: none;
|
|
}
|
|
|
|
.menu input[type="file"] {
|
|
width: 0;
|
|
height: 0;
|
|
margin: 0;
|
|
padding: 0;
|
|
visibility: hidden;
|
|
}
|
|
|
|
.menu li {
|
|
cursor: pointer;
|
|
display: flex;
|
|
justify-content: start;
|
|
align-items: center;
|
|
margin: 0.4em 0;
|
|
}
|
|
|
|
.menu li:hover {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.menu li label {
|
|
cursor: pointer;
|
|
display: flex;
|
|
justify-content: start;
|
|
align-items: center;
|
|
}
|
|
|
|
.menu li img {
|
|
height: 1.2em;
|
|
width: auto;
|
|
margin-right: 0.2em;
|
|
}
|
|
|
|
.container {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: start;
|
|
}
|
|
|
|
.dices-container,
|
|
.history-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-width: 400px;
|
|
}
|
|
|
|
.dices-container {
|
|
margin-top: 1em;
|
|
font-size: 0.8em;
|
|
}
|
|
|
|
.dices {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
min-height: 12em;
|
|
}
|
|
|
|
.dice {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 10em;
|
|
height: 12em;
|
|
margin: 0 0.2em;
|
|
border: 0.3em solid transparent;
|
|
}
|
|
|
|
.dice .label-container {
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
margin-top: 0.2em;
|
|
z-index: 2;
|
|
font-size: 1.3em;
|
|
height: 2em;
|
|
}
|
|
|
|
.dice label {
|
|
font-size: 1em;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.dice.selected label {
|
|
font-size: 1.2em;
|
|
font-weight: bold;
|
|
opacity: 1;
|
|
}
|
|
|
|
.dice .dice-image-container {
|
|
position: relative;
|
|
width: 8em;
|
|
height: 8em;
|
|
z-index: 1;
|
|
filter: drop-shadow(0.1em 0.1em 0.1em transparent) drop-shadow(-0.1em -0.1em 0.1em transparent);
|
|
}
|
|
|
|
.dice .dice-image {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: #000;
|
|
mask-size: contain;
|
|
mask-repeat: no-repeat;
|
|
mask-position: center;
|
|
}
|
|
|
|
.dice.selected .dice-image-container {
|
|
filter: drop-shadow(0.1em 0.1em 0.1em #333) drop-shadow(-0.1em -0.1em 0.1em #333);
|
|
}
|
|
|
|
.dice .remove {
|
|
cursor: pointer;
|
|
position: absolute;
|
|
top: 0.2em;
|
|
right: 0.2em;
|
|
height: 1.2em;
|
|
width: 1.2em;
|
|
z-index: 5;
|
|
}
|
|
|
|
.dice .remove::before {
|
|
content: ' ';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: #DD0000;
|
|
mask-size: contain;
|
|
mask-repeat: no-repeat;
|
|
mask-position: center;
|
|
mask-image: url(./assets/close.svg);
|
|
}
|
|
|
|
|
|
.dice .remove:hover {
|
|
filter: brightness(0.5);
|
|
}
|
|
|
|
.dice .dice-image.dice-image-4 {
|
|
mask-image: url(./assets/dices/4.svg);
|
|
}
|
|
|
|
.dice .dice-image.dice-image-6 {
|
|
mask-image: url(./assets/dices/6.svg);
|
|
}
|
|
|
|
.dice .dice-image.dice-image-8 {
|
|
mask-image: url(./assets/dices/8.svg);
|
|
}
|
|
|
|
.dice .dice-image.dice-image-10 {
|
|
mask-image: url(./assets/dices/10.svg);
|
|
}
|
|
|
|
.dice .dice-image.dice-image-12 {
|
|
mask-image: url(./assets/dices/12.svg);
|
|
}
|
|
|
|
.dice .dice-image.dice-image-20 {
|
|
mask-image: url(./assets/dices/20.svg);
|
|
}
|
|
|
|
.dice .dice-image.dice-image-100 {
|
|
mask-image: url(./assets/dices/100.svg);
|
|
}
|
|
|
|
.dice .dice-image.dice-image-custom {
|
|
mask-image: url(./assets/dices/custom.svg);
|
|
}
|
|
|
|
.form-container {
|
|
margin-top: 1em;
|
|
display: grid;
|
|
align-items: center;
|
|
row-gap: 1em;
|
|
grid-template-columns: auto;
|
|
}
|
|
|
|
.form-container .actions {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.form {
|
|
font-size: 1.2em;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: start;
|
|
align-items: center;
|
|
}
|
|
|
|
.form input,
|
|
.form select {
|
|
font-size: 0.9em;
|
|
width: 5em;
|
|
height: 2.2em;
|
|
background-color: #fff;
|
|
font-family: 'Courier New', Courier, monospace;
|
|
border: 0.15em solid #000;
|
|
outline: none;
|
|
padding: 0.4em;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.form #inputText {
|
|
width: 22em;
|
|
max-width: 99vw;
|
|
}
|
|
|
|
.history-container {
|
|
margin: 2em 0;
|
|
max-width: 99vw;
|
|
}
|
|
|
|
.history-container .actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: space-around;
|
|
width: 100%;
|
|
}
|
|
|
|
.history-container .actions button {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.history {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, auto);
|
|
width: 100%;
|
|
margin-top: 2em;
|
|
row-gap: 0.3em;
|
|
column-gap: 0.3em;
|
|
}
|
|
|
|
.history hr {
|
|
width: 100%;
|
|
grid-column: span 4;
|
|
}
|
|
|
|
.history .label {
|
|
font-size: 1.2em;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.history .result {
|
|
text-align: center;
|
|
font-size: 1.2em;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.history .formula-container {
|
|
display: flex;
|
|
margin: 0 0.5em;
|
|
}
|
|
|
|
|
|
.history .formula-container .formula {
|
|
display: flex;
|
|
margin: 0 0.5em;
|
|
}
|
|
|
|
.history .time {
|
|
text-align: right;
|
|
}
|
|
|
|
button {
|
|
font-family: 'Courier New', Courier, monospace;
|
|
cursor: pointer;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
background-color: transparent;
|
|
color: #000;
|
|
border: none;
|
|
outline: none;
|
|
font-size: 1.3em;
|
|
margin: 0.5em;
|
|
}
|
|
|
|
button:hover {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
button img {
|
|
height: 1.2em;
|
|
width: auto;
|
|
margin-right: 0.2em;
|
|
}
|
|
|
|
button.disabled {
|
|
pointer-events: none;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
body.dark {
|
|
background-color: #000;
|
|
color: #efefef;
|
|
}
|
|
|
|
body.dark #sidebar {
|
|
background-color: #000;
|
|
}
|
|
|
|
body.dark #sidebar-toggle,
|
|
body.dark #sidebar-toggle-close,
|
|
body.dark .menu li img,
|
|
body.dark button img {
|
|
filter: invert();
|
|
}
|
|
|
|
body.dark button {
|
|
color: #fff;
|
|
}
|
|
|
|
body.dark .dice .dice-image {
|
|
background-color: #fff;
|
|
}
|
|
|
|
body.dark .dice.selected .dice-image-container {
|
|
filter: drop-shadow(0.1em 0.1em 0.1em #efefef) drop-shadow(-0.1em -0.1em 0.1em #efefef);
|
|
}
|
|
|
|
body.dark .form input,
|
|
body.dark .form select {
|
|
color: #fff;
|
|
background-color: #000;
|
|
border-color: #fff;
|
|
}
|
|
|
|
@media screen and (max-width: 767px) {
|
|
.dices {
|
|
font-size: 0.65em;
|
|
}
|
|
|
|
.container {
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.dices-container,
|
|
.history-container {
|
|
min-width: auto;
|
|
width: 100%;
|
|
}
|
|
} |