odin-calculator/style.css
2023-12-28 12:05:25 -07:00

133 lines
No EOL
2.2 KiB
CSS

body {
display: flex;
text-align: center;
flex-direction: column;
height: 100vh;
margin: 0;
background-color: #094909;
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;
border: 5px solid;
border-color: #bbb #888 #666 #aaa;
border-radius: 5px;
}
.display {
grid-column: 1 / span 4;
height: 100px;
max-width: 415px;
overflow: hidden;
background: #333;
color: #1bff07;
text-align: right;
border: 1px solid #222;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
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;
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 {
background: #d9e1f2;
}
.clear {
background: #f98383;
}
.operator {
background: #ffff69;
}
.equal {
grid-column: span 2;
width: 205px;
background: #79ff54;
}
footer {
flex: 0 0 auto;
}