dioxus/examples/assets/calculator.css

157 lines
2.4 KiB
CSS
Raw Normal View History

2021-07-05 01:11:49 -04:00
html {
box-sizing: border-box;
}
2024-01-17 19:01:28 -08:00
*,
*:before,
*:after {
2021-07-05 01:11:49 -04:00
box-sizing: inherit;
}
body {
margin: 0;
font: 100 14px 'Roboto';
2024-01-17 19:01:28 -08:00
font-family: Arial;
2021-07-12 09:40:13 -04:00
overflow: hidden;
2021-07-05 01:11:49 -04:00
}
button {
display: block;
background: none;
border: none;
padding: 0;
font-family: inherit;
user-select: none;
cursor: pointer;
outline: none;
2024-01-17 19:01:28 -08:00
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
2021-07-05 01:11:49 -04:00
}
button:active {
2024-01-17 19:01:28 -08:00
box-shadow: inset 0px 0px 80px 0px rgba(0, 0, 0, 0.25);
2021-07-05 01:11:49 -04:00
}
#wrapper {
/* height: 100vh; */
height: max-content;
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
display: flex;
align-items: center;
justify-content: center;
}
#app {
width: 320px;
height: 520px;
position: relative;
}
.calculator {
width: 100%;
height: 100%;
background: black;
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
display: flex;
flex-direction: column;
}
#wrapper .calculator {
2021-07-12 09:40:13 -04:00
/* box-shadow: 0px 0px 20px 0px #aaa; */
2021-07-05 01:11:49 -04:00
}
.calculator-display {
color: white;
background: #1c191c;
line-height: 130px;
/* font-size: 6em; */
2024-01-17 19:01:28 -08:00
font-size: 16px;
font-size: 4vw;
max-height: 160px;
padding: 0 30px;
/* height: 80px; */
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
flex: 1;
}
.auto-scaling-text {
display: inline-block;
}
.calculator-display .auto-scaling-text {
/* padding: 0 30px; */
/* position: absolute; */
/* right: 0; */
/* transform-origin: right; */
2021-07-05 01:11:49 -04:00
}
.calculator-keypad {
height: 400px;
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
display: flex;
}
.calculator .input-keys {
width: 240px;
}
.calculator .function-keys {
display: flex;
}
.calculator .digit-keys {
background: #e0e0e7;
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
display: flex;
flex-direction: row;
flex-wrap: wrap-reverse;
}
.calculator-key {
width: 80px;
height: 80px;
border-top: 1px solid #777;
2024-01-17 19:01:28 -08:00
border-right: 1px solid #666;
2021-07-05 01:11:49 -04:00
text-align: center;
line-height: 80px;
}
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
.calculator .function-keys .calculator-key {
font-size: 2em;
}
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
.calculator .function-keys .key-multiply {
line-height: 50px;
}
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
.calculator .digit-keys .calculator-key {
font-size: 2.25em;
}
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
.calculator .digit-keys .key-0 {
width: 160px;
text-align: left;
padding-left: 32px;
}
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
.calculator .digit-keys .key-dot {
padding-top: 1em;
font-size: 0.75em;
}
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
.calculator .operator-keys .calculator-key {
color: white;
border-right: 0;
font-size: 3em;
}
.calculator .function-keys {
2024-01-17 19:01:28 -08:00
background: linear-gradient(to bottom, rgba(202, 202, 204, 1) 0%, rgba(196, 194, 204, 1) 100%);
2021-07-05 01:11:49 -04:00
}
2024-01-17 19:01:28 -08:00
2021-07-05 01:11:49 -04:00
.calculator .operator-keys {
2024-01-17 19:01:28 -08:00
background: linear-gradient(to bottom, rgba(252, 156, 23, 1) 0%, rgba(247, 126, 27, 1) 100%);
2021-07-05 01:11:49 -04:00
}