odin-calculator/style.css

128 lines
2.1 KiB
CSS
Raw Normal View History

2023-12-26 18:50:51 -07:00
body {
display: flex;
2023-12-26 18:50:51 -07:00
text-align: center;
flex-direction: column;
height: 100vh;
2023-12-26 18:50:51 -07:00
margin: 0;
background-color: #094909;
2023-12-26 18:50:51 -07:00
color: #eee;
}
header {
flex: 0 0 auto;
}
main {
flex: 1;
2023-12-26 18:50:51 -07:00
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.calculator {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: auto;
grid-gap: 5px;
2023-12-27 03:32:24 -07:00
background: #594859;
2023-12-26 18:50:51 -07:00
padding: 10px;
2023-12-27 03:32:24 -07:00
box-shadow: 1px 2px 10px 1px #222;
2023-12-26 18:50:51 -07:00
}
2023-12-27 13:40:15 -07:00
.display {
2023-12-26 18:50:51 -07:00
grid-column: 1 / span 4;
height: 100px;
2023-12-27 10:34:41 -07:00
max-width: 415px;
overflow: hidden;
2023-12-26 18:50:51 -07:00
background: #eee;
color: #111;
2023-12-26 20:15:17 -07:00
text-align: right;
2023-12-27 13:40:15 -07:00
display: flex;
flex-direction: column;
}
.top-screen {
height: 40%;
font-size: 20px;
2023-12-27 13:40:15 -07:00
}
.main-screen {
height: 60%;
font-size: 50px;
2023-12-26 18:50:51 -07:00
}
button {
height: 100px;
width: 100px;
2023-12-27 03:32:24 -07:00
font-size: 50px;
2023-12-27 03:46:19 -07:00
border-color: #eee;
border-radius: 5px;
2023-12-27 03:32:24 -07:00
box-shadow: 1px 2px 10px 1px #222;
cursor: pointer;
2023-12-26 18:50:51 -07:00
}
2023-12-27 03:32:24 -07:00
button:hover {
filter: brightness(.9);
}
2023-12-28 09:44:07 -07:00
button:active, .active {
filter: brightness(.9);
border: 1px solid #888;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}
.tooltip .tooltiptext {
visibility: hidden;
position: absolute;
bottom: 115%;
right: -15%;
z-index: 1;
width: 120px;
font-size: 20px;
background: #094909;
color: #eee;
opacity: 0;
transition: opacity 0.7s;
padding: 5px;
border-radius: 5px;
}
/* Tooltip arrow */
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #094909 transparent transparent transparent;
}
.tooltip:hover .tooltiptext, .tooltip:focus .tooltiptext {
visibility: visible;
opacity: 1;
}
.num, .plus-minus {
2023-12-27 03:32:24 -07:00
background: #d9e1f2;
}
.clear {
background: #f98383;
}
.operator {
background: #ffff69;
}
.equal {
grid-column: span 2;
width: 205px;
2023-12-27 03:32:24 -07:00
background: #79ff54;
}
2023-12-26 18:50:51 -07:00
footer {
flex: 0 0 auto;
}