-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.css
90 lines (80 loc) · 2.09 KB
/
App.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
86
87
88
89
90
.App {
text-align: center;
background-color: #fff; /* White background */
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 10px;
box-sizing: border-box;
}
.display {
background-color: #000;
color: white;
font-size: 2rem;
padding: 20px;
margin-bottom: 20px;
width: 100%; /* Full width */
box-sizing: border-box;
display: flex;
justify-content: flex-end;
align-items: center;
border-radius: 5px;
}
.button-container {
width: 100%; /* Full width */
display: grid;
grid-template-columns: repeat(4, 1fr); /* 4 columns for the buttons */
gap: 10px;
padding: 5px;
box-sizing: border-box;
}
button {
background-color: #add8e6; /* Light blue background */
border: none;
padding: 20px;
border-radius: 5px;
font-size: 1.5rem;
color: #333;
margin: 0;
transition: background-color 0.3s; /* Smooth background color transition */
}
button:active {
background-color: #87CEEB; /* Slightly darker blue on active */
}
/* Specific styles for zero to cover two grid columns */
button.zero {
grid-column: span 2; /* Zero button takes up two columns */
}
/* Specific styles for operator buttons to differentiate them */
button.operator {
background-color: #00bfff; /* Deep sky blue background for operators */
}
/* Specific styles for the equal button */
button.equal {
background-color: #00bfff; /* Deep sky blue background for the equal button */
}
/* Adjust the grid layout to be more compact and even */
.number-pad {
display: grid;
grid-template-columns: repeat(3, 1fr); /* 3 columns for numbers */
grid-template-rows: repeat(4, 1fr); /* 4 rows for numbers */
gap: 10px;
}
.operations {
display: grid;
grid-template-rows: repeat(4, 1fr); /* 4 rows for operators */
gap: 10px;
}
/* Adjust the font size and padding for smaller screens */
@media (max-width: 768px) {
.display, .button-container, button {
font-size: 1rem;
padding: 15px;
}
button.zero {
padding-left: 30px; /* Adjust padding for zero button */
}
}