odin-calculator/style.css

104 lines
No EOL
1.6 KiB
CSS

body {
display: flex;
text-align: center;
flex-direction: column;
height: 100vh;
margin: 0;
background-color: rgb(9, 73, 9);
color: #eee;
}
header {
flex: 0 0 auto;
}
main {
flex: 1;
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;
background: #594859;
padding: 10px;
box-shadow: 1px 2px 10px 1px #222;
}
.display {
grid-column: 1 / span 4;
height: 100px;
max-width: 415px;
overflow: hidden;
background: #eee;
color: #111;
text-align: right;
display: flex;
flex-direction: column;
}
.top-screen {
height: 40%;
font-size: 20px;
}
.main-screen {
height: 60%;
font-size: 50px;
}
button {
height: 100px;
width: 100px;
font-size: 50px;
border-color: #eee;
border-radius: 5px;
box-shadow: 1px 2px 10px 1px #222;
cursor: pointer;
}
button:hover {
filter: brightness(.9);
}
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;
z-index: 1;
}
.tooltip:hover .tooltiptext, .tooltip:focus .tooltiptext {
visibility: visible;
opacity: 1;
}
.num, .plus-minus {
background: #d9e1f2;
}
.clear {
background: #f98383;
}
.operator {
background: #ffff69;
}
.equal {
grid-column: span 2;
width: 205px;
background: #79ff54;
}
footer {
flex: 0 0 auto;
}