1
0

calculator.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. html {
  2. box-sizing: border-box;
  3. }
  4. *,
  5. *:before,
  6. *:after {
  7. box-sizing: inherit;
  8. }
  9. body {
  10. margin: 0;
  11. font: 100 14px 'Roboto';
  12. font-family: Arial;
  13. overflow: hidden;
  14. }
  15. button {
  16. display: block;
  17. background: none;
  18. border: none;
  19. padding: 0;
  20. font-family: inherit;
  21. user-select: none;
  22. cursor: pointer;
  23. outline: none;
  24. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  25. }
  26. button:active {
  27. box-shadow: inset 0px 0px 80px 0px rgba(0, 0, 0, 0.25);
  28. }
  29. #wrapper {
  30. /* height: 100vh; */
  31. height: max-content;
  32. display: flex;
  33. align-items: center;
  34. justify-content: center;
  35. }
  36. #app {
  37. width: 320px;
  38. height: 520px;
  39. position: relative;
  40. }
  41. .calculator {
  42. width: 100%;
  43. height: 100%;
  44. background: black;
  45. display: flex;
  46. flex-direction: column;
  47. }
  48. #wrapper .calculator {
  49. /* box-shadow: 0px 0px 20px 0px #aaa; */
  50. }
  51. .calculator-display {
  52. color: white;
  53. background: #1c191c;
  54. line-height: 130px;
  55. /* font-size: 6em; */
  56. font-size: 16px;
  57. font-size: 4vw;
  58. max-height: 160px;
  59. padding: 0 30px;
  60. /* height: 80px; */
  61. flex: 1;
  62. }
  63. .auto-scaling-text {
  64. display: inline-block;
  65. }
  66. .calculator-display .auto-scaling-text {
  67. /* padding: 0 30px; */
  68. /* position: absolute; */
  69. /* right: 0; */
  70. /* transform-origin: right; */
  71. }
  72. .calculator-keypad {
  73. height: 400px;
  74. display: flex;
  75. }
  76. .calculator .input-keys {
  77. width: 240px;
  78. }
  79. .calculator .function-keys {
  80. display: flex;
  81. }
  82. .calculator .digit-keys {
  83. background: #e0e0e7;
  84. display: flex;
  85. flex-direction: row;
  86. flex-wrap: wrap-reverse;
  87. }
  88. .calculator-key {
  89. width: 80px;
  90. height: 80px;
  91. border-top: 1px solid #777;
  92. border-right: 1px solid #666;
  93. text-align: center;
  94. line-height: 80px;
  95. }
  96. .calculator .function-keys .calculator-key {
  97. font-size: 2em;
  98. }
  99. .calculator .function-keys .key-multiply {
  100. line-height: 50px;
  101. }
  102. .calculator .digit-keys .calculator-key {
  103. font-size: 2.25em;
  104. }
  105. .calculator .digit-keys .key-0 {
  106. width: 160px;
  107. text-align: left;
  108. padding-left: 32px;
  109. }
  110. .calculator .digit-keys .key-dot {
  111. padding-top: 1em;
  112. font-size: 0.75em;
  113. }
  114. .calculator .operator-keys .calculator-key {
  115. color: white;
  116. border-right: 0;
  117. font-size: 3em;
  118. }
  119. .calculator .function-keys {
  120. background: linear-gradient(to bottom, rgba(202, 202, 204, 1) 0%, rgba(196, 194, 204, 1) 100%);
  121. }
  122. .calculator .operator-keys {
  123. background: linear-gradient(to bottom, rgba(252, 156, 23, 1) 0%, rgba(247, 126, 27, 1) 100%);
  124. }