-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
85 lines (75 loc) · 1.78 KB
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #1d1d1d;
overflow: hidden; /* Prevent scrolling */
}
.numpad-container {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
max-width: 350px;
height: 100%; /* Ensure it takes full screen height */
box-sizing: border-box;
}
#numpad-display {
width: 100%;
height: 8vh;
font-size: 4vh;
text-align: right;
margin-bottom: 10px;
padding: 5px;
border: 1px solid #ccc;
box-sizing: border-box;
}
.numpad {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
width: 100%;
max-height: calc(100% - 10vh); /* Prevent overflow */
overflow-y: auto; /* Enable scrolling if necessary */
box-sizing: border-box;
}
/* Change grid layout for buttons */
.numpad-btn {
padding: 3vh; /* Adjust padding for better fit */
font-size: 4vh;
cursor: pointer;
background-color: #ddd;
border: none;
border-radius: 5px;
transition: background-color 0.2s;
touch-action: manipulation;
}
.numpad-btn:hover {
background-color: #ccc;
}
/* Add a new row for clear, backspace, and enter buttons */
#clear, #backspace, #enter {
grid-column: span 3; /* Make them span full width */
}
/* For smaller screen sizes */
@media (max-width: 600px) {
#numpad-display {
font-size: 3.5vh;
}
.numpad-btn {
padding: 2.5vh; /* Adjust padding for smaller screens */
font-size: 3.5vh;
}
}
@media (max-width: 400px) {
#numpad-display {
font-size: 3vh;
}
.numpad-btn {
padding: 2vh; /* Adjust padding for smaller screens */
font-size: 3vh;
}
}