1
- @import " compass-mixins/lib/compass" ;
2
-
3
- $readout : rgba (75 ,75 ,75 ,.65 );
4
- $key-misc : #d6d6d6 ;
5
- $key-function : #ff8c00 ;
6
- $key-numeric : #e0e0e0 ;
7
-
8
- $readout-color : #ffffff ;
9
- $key-color : #000000 ;
10
-
11
- body {
12
- font-family : " HelveticaNeue-UltraLight" , " Helvetica Ultra Light" , " Helvetica Neue" , Helvetica , Arial , sans-serif ;
13
- font-weight : 100 ;
14
- background : #ffebd2 ;
15
- }
16
-
17
- sub , sup {
18
- font-size : 75% ;
19
- line-height : 0 ;
20
- position : relative ;
21
- }
22
-
23
- sup {
24
- top : -0.5em ;
25
- }
26
-
27
- sub {
28
- bottom : -0em ;
29
- }
30
-
31
- * :focus {
32
- outline : 0 ;
33
- }
34
-
35
- .calculator {
36
- position : absolute ;
37
- top : 50% ;
38
- left : 50% ;
39
- margin-top : -160px ;
40
- margin-left : -115px ;
41
- width : 231px ;
42
- height : 320px ;
43
- background : $readout ;
44
- border-right : 1px solid #646464 ;
45
- border-bottom : 1px solid #343434 ;
46
- border-left : 1px solid #646464 ;
47
- border-top : 1px solid #939393 ;
48
- @include border-radius (6px );
49
- @include single-box-shadow (0 , 0 , 20px , 0 ,rgba (50 ,50 ,50 ,.75 ), false);
50
- cursor : arrow;
51
-
52
- }
53
-
54
- .readout {
55
- font-size : 45px ;
56
- color : $readout-color ;
57
- background : transparent ;
58
- box-sizing : border-box ;
59
- display : block ;
60
- width : inherit ;
61
- border : 0 ;
62
- margin : 28px 0 0 0 ;
63
- text-align : right ;
64
- padding : 0 10px ;
65
- font-family : " HelveticaNeue-UltraLight" , " Helvetica Ultra Light" , " Helvetica Neue" , Helvetica , Arial , sans-serif ;
66
- font-weight : 100 ;
67
- }
68
-
69
- .keys {
70
- position : absolute ;
71
- bottom : 0 ;
72
- }
73
-
74
-
75
- .row {
76
- padding-top : 1px ;
77
- clear :both ;
78
-
79
- .key :first-child {
80
- margin-left : 0px ;
81
- }
82
- }
83
- .key {
84
- width : 57px ;
85
- height : 47px ;
86
- font-size : 22px ;
87
- border : 0 ;
88
- float :left ;
89
- margin-left : 1px ;
90
- font-family : " HelveticaNeue-UltraLight" , " Helvetica Ultra Light" , " Helvetica Neue" , Helvetica , Arial , sans-serif ;
91
-
92
- & .double {
93
- width : 115px ;
94
- text-align : left ;
95
- padding-left : 25px ;
96
- @include border-bottom-left-radius (6px );
97
- }
98
-
99
- & .last {
100
- @include border-bottom-right-radius (6px );
101
- }
102
- }
103
-
104
- .misc {
105
- background : $key-misc ;
106
- font-size : 20px ;
107
- font-family : " HelveticaNeue-Light" , " Helvetica Light" , " Helvetica Neue" , Helvetica , Arial , sans-serif ;
108
- & :active {
109
- background-color : darken ($key-misc , 15% );
110
- }
111
- }
112
-
113
- .function {
114
- background : $key-function ;
115
- color : $readout-color ;
116
- font-size : 25px ;
117
- & :active {
118
- background-color : darken ($key-function , 15% );
119
- }
120
- }
121
-
122
- .numeric {
123
- background : $key-numeric ;
124
- font-family : " HelveticaNeue-Light" , " Helvetica Light" , " Helvetica Neue" , Helvetica , Arial , sans-serif ;
125
- & :active {
126
- background-color : darken ($key-numeric , 15% );
127
- }
128
- }
129
- /* Calculator Container */
130
- .calculator {
131
- /* Set a fixed width or a max-width to control layout */
132
- width : 300px ;
133
- /* or: max-width: 300px; */
134
- margin : 2rem auto ; /* Centers the calculator horizontally */
135
- background-color : #f4f4f4 ; /* Light background */
136
- border-radius : 8px ;
137
- padding : 1rem ;
138
- box-shadow : 0 0 10px rgba (0 , 0 , 0 , 0.1 ); /* Subtle shadow */
139
- display : flex ;
140
- flex-direction : column ; /* Stack readout on top of keys */
141
- }
142
-
143
- /* Display (Readout) */
144
- .readout {
145
- width : 100% ;
146
- font-size : 2rem ;
147
- text-align : right ;
148
- border : none ;
149
- border-radius : 4px ;
150
- padding : 0.5rem ;
151
- margin-bottom : 1rem ;
152
- background : #ddd ;
153
- }
154
-
155
- /* Keys Container */
156
- .keys {
157
- display : grid ;
158
- grid-template-columns : repeat (4 , 1fr ); /* 4 columns */
159
- grid-gap : 0.5rem ; /* Spacing between buttons */
160
- }
161
-
162
- /* Key Styles */
163
- .key {
164
- border : none ;
165
- border-radius : 4px ;
166
- font-size : 1.2rem ;
167
- cursor : pointer ;
168
- padding : 1rem ;
169
- text-align : center ;
170
- }
171
-
172
- /* Numeric Keys */
173
- .key.numeric {
174
- background-color : #fff ;
175
- }
176
-
177
- /* Operator/Function Keys */
178
- .key.function {
179
- background-color : orange ;
180
- color : #fff ;
181
- }
182
-
183
- /* Miscellaneous Keys (C, +/-, %) */
184
- .key.misc {
185
- background-color : lightgray ;
186
- }
187
-
188
- /* Double-width key (for '0') */
189
- .key.double {
190
- grid-column : span 2 ;
191
- }
192
-
193
- /* If you need a 'last' class for any custom styling */
194
- .key.last {
195
- /* Example if you want to style the '=' differently */
196
- background-color : orange ;
197
- color : #fff ;
198
- }
199
-
0 commit comments