rpg-dices/style.css

383 lines
6.2 KiB
CSS
Raw Normal View History

2024-05-03 19:45:07 +02:00
* {
box-sizing: border-box;
}
body {
background-color: #fff;
color: #000;
2024-05-04 22:06:19 +02:00
font-family: 'Courier New', Courier, monospace;
2024-05-03 19:45:07 +02:00
}
.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;
}
2024-05-05 18:48:54 +02:00
.container {
display: flex;
justify-content: center;
align-items: start;
}
2024-05-03 19:45:07 +02:00
.dices-container,
.history-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
2024-05-05 18:48:54 +02:00
min-width: 400px;
2024-05-03 19:45:07 +02:00
}
2024-05-04 22:06:19 +02:00
.dices-container {
margin-top: 1em;
font-size: 0.8em;
}
2024-05-03 19:45:07 +02:00
.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;
2024-05-04 22:06:19 +02:00
font-size: 1.3em;
2024-05-03 19:45:07 +02:00
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%;
2024-05-04 22:06:19 +02:00
background-color: #000;
2024-05-03 19:45:07 +02:00
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);
}
2024-05-04 22:06:19 +02:00
.form-container {
margin-top: 1em;
display: grid;
align-items: center;
row-gap: 1em;
2024-05-05 18:48:54 +02:00
grid-template-columns: auto;
2024-05-04 22:06:19 +02:00
}
.form-container .actions {
display: flex;
justify-content: space-between;
align-items: center;
}
2024-05-03 19:45:07 +02:00
.form {
2024-05-05 18:48:54 +02:00
font-size: 1.2em;
2024-05-03 19:45:07 +02:00
display: flex;
flex-wrap: wrap;
2024-05-04 22:06:19 +02:00
justify-content: start;
2024-05-03 19:45:07 +02:00
align-items: center;
}
.form input,
.form select {
2024-05-04 22:06:19 +02:00
font-size: 0.9em;
2024-05-03 19:45:07 +02:00
width: 5em;
2024-05-04 22:06:19 +02:00
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;
2024-05-03 19:45:07 +02:00
}
.history-container {
2024-05-04 22:06:19 +02:00
margin: 2em 0;
max-width: 99vw;
2024-05-03 19:45:07 +02:00
}
2024-05-04 22:06:19 +02:00
.history-container .actions {
2024-05-03 19:45:07 +02:00
display: flex;
2024-05-04 22:06:19 +02:00
flex-wrap: wrap;
justify-content: space-around;
2024-05-03 19:45:07 +02:00
width: 100%;
}
2024-05-04 22:06:19 +02:00
.history-container .actions button {
font-size: 1em;
2024-05-03 19:45:07 +02:00
}
2024-05-04 22:06:19 +02:00
.history {
2024-05-03 19:45:07 +02:00
display: grid;
2024-05-04 22:06:19 +02:00
grid-template-columns: repeat(4, auto);
width: 100%;
margin-top: 2em;
row-gap: 0.3em;
column-gap: 0.3em;
2024-05-03 19:45:07 +02:00
}
.history hr {
width: 100%;
2024-05-04 22:06:19 +02:00
grid-column: span 4;
}
.history .label {
font-size: 1.2em;
2024-05-05 18:48:54 +02:00
display: flex;
flex-wrap: wrap;
2024-05-04 22:06:19 +02:00
}
.history .result {
text-align: center;
font-size: 1.2em;
font-weight: bold;
}
2024-05-05 18:48:54 +02:00
.history .formula-container {
display: flex;
margin: 0 0.5em;
}
.history .formula-container .formula {
display: flex;
2024-05-04 22:06:19 +02:00
margin: 0 0.5em;
}
.history .time {
text-align: right;
2024-05-03 19:45:07 +02:00
}
button {
2024-05-04 22:06:19 +02:00
font-family: 'Courier New', Courier, monospace;
2024-05-03 19:45:07 +02:00
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
background-color: transparent;
color: #000;
border: none;
outline: none;
font-size: 1.3em;
2024-05-05 18:48:54 +02:00
margin: 0.5em;
2024-05-03 19:45:07 +02:00
}
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;
}
2024-05-04 22:06:19 +02:00
body.dark .dice .dice-image {
background-color: #fff;
}
2024-05-03 19:45:07 +02:00
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);
}
2024-05-04 22:06:19 +02:00
body.dark .form input,
body.dark .form select {
color: #fff;
background-color: #000;
border-color: #fff;
}
@media screen and (max-width: 767px) {
2024-05-03 19:45:07 +02:00
.dices {
font-size: 0.65em;
}
2024-05-04 22:06:19 +02:00
2024-05-05 18:48:54 +02:00
.container {
flex-direction: column;
align-items: center;
}
.dices-container,
.history-container {
min-width: auto;
width: 100%;
2024-05-04 22:06:19 +02:00
}
2024-05-03 19:45:07 +02:00
}