Skip to content

Commit 65c3b23

Browse files
authored
Refactor certStyles.css for improved layout and responsiveness
Refactor styles for certificate manager page, enhancing sidebar, content area, and updates box. Remove unused styles and improve layout for better responsiveness.
1 parent 4f7f36b commit 65c3b23

File tree

1 file changed

+65
-168
lines changed

1 file changed

+65
-168
lines changed

web/certStyles.css

Lines changed: 65 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
11
/* certStyles.css
2-
ONLY extra styles for certificate-manager page elements + hamburger
3-
(Relies on variables & base layout from styles.css)
2+
Only the extra rules needed for certificate manager page + hamburger fixes.
3+
Assumes variables & base layout exist in styles.css.
44
*/
55

6-
/* ---------- Sidebar active item ---------- */
6+
/* --- Ensure active sidebar item styling (scoped) --- */
77
.sidebar-item.active{
88
color: var(--text);
99
background: linear-gradient(90deg, rgba(78,229,255,0.04), rgba(139,92,246,0.03));
1010
border-color: rgba(78,229,255,0.08);
1111
box-shadow: 0 6px 18px rgba(78,229,255,0.03);
1212
}
1313

14-
/* ---------- Recommended box (small summary card) ---------- */
14+
/* --- Prevent horizontal overflow caused by panel/content area --- */
15+
.content-area{
16+
/* avoid accidental horizontal overflow from children */
17+
overflow-x: hidden;
18+
position: relative; /* needed for positioned children like update popup */
19+
}
20+
21+
/* Panel should not create horizontal scroll and should scroll vertically within the content-area */
22+
.panel{
23+
overflow-x: hidden; /* no horizontal scroll */
24+
overflow-y: auto; /* vertical scrolling inside the panel */
25+
min-height: 0; /* allow proper flexbox scrolling */
26+
box-sizing: border-box;
27+
}
28+
29+
/* --- Recommended box / cert grid (scoped) --- */
1530
.recommended-box{
1631
width:100%;
1732
margin-bottom:12px;
@@ -20,37 +35,19 @@
2035
padding: 12px;
2136
border-radius: 10px;
2237
color: var(--muted);
23-
}
24-
.recommended-box h3{
25-
margin:0 0 6px 0;
26-
font-size: 0.98rem;
27-
color: var(--accent);
28-
font-weight:700;
29-
}
30-
.recommended-box p{
31-
margin:0;
32-
color: var(--text);
33-
font-weight:600;
34-
line-height:1.25;
35-
}
36-
37-
/* ---------- Controls row (placeholder) ---------- */
38-
.controls-row{
39-
display:flex;
40-
gap:10px;
41-
align-items:center;
42-
margin: 8px 0 12px 0;
38+
box-sizing: border-box;
4339
}
4440

45-
/* ---------- Certificate cards grid ---------- */
41+
/* grid of cert cards */
4642
.cert-list{
4743
display:grid;
4844
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
4945
gap: 14px;
5046
margin-top:6px;
47+
box-sizing: border-box;
5148
}
5249

53-
/* card */
50+
/* cert card basics */
5451
.cert-card{
5552
background: rgba(255,255,255,0.013);
5653
border: 1px solid var(--card-border);
@@ -62,86 +59,38 @@
6259
flex-direction:column;
6360
justify-content:space-between;
6461
min-height:92px;
62+
box-sizing: border-box;
6563
}
66-
.cert-card:focus{
67-
outline: 3px solid rgba(78,229,255,0.08);
68-
outline-offset: 3px;
69-
}
70-
.cert-card:hover{
71-
transform: translateY(-6px);
72-
box-shadow: 0 22px 48px rgba(2,6,23,0.5);
73-
}
74-
75-
/* card internals */
76-
.card-top{
77-
display:flex;
78-
justify-content:space-between;
79-
align-items:center;
80-
gap:10px;
81-
margin-bottom:8px;
82-
}
83-
.card-title{
84-
font-weight:700;
85-
color: var(--text);
86-
font-size: 1rem;
87-
}
88-
.card-meta{
89-
color: var(--muted);
90-
font-size: 0.88rem;
91-
margin-top:4px;
92-
}
64+
.cert-card:focus{ outline: 3px solid rgba(78,229,255,0.08); outline-offset:3px; }
9365

94-
/* badge */
95-
.badge{
96-
font-size: 0.78rem;
97-
padding: 6px 8px;
98-
border-radius: 999px;
99-
font-weight:800;
100-
display:inline-block;
101-
line-height:1;
102-
white-space:nowrap;
103-
}
104-
.badge.signed{
105-
background: linear-gradient(90deg, rgba(78,229,255,0.12), rgba(139,92,246,0.08));
106-
color: #021018; /* dark text like our primary buttons */
107-
box-shadow: 0 6px 14px rgba(78,229,255,0.03);
108-
}
109-
.badge.revoked{
110-
background: linear-gradient(90deg, rgba(255,107,107,0.12), rgba(255,107,107,0.06));
111-
color: var(--text);
112-
box-shadow: none;
113-
}
66+
/* badges */
67+
.badge.signed{ background: linear-gradient(90deg, rgba(78,229,255,0.12), rgba(139,92,246,0.08)); color:#021018; }
68+
.badge.revoked{ background: linear-gradient(90deg, rgba(255,107,107,0.12), rgba(255,107,107,0.06)); color:var(--text); }
11469

115-
/* footer small info */
116-
.card-footer .small{
117-
color: var(--muted);
118-
font-size: 0.85rem;
119-
margin-top:6px;
120-
}
121-
122-
/* ---------- Updates area (collapsible) ---------- */
123-
/* lightweight styles only */
70+
/* --- Updates: expand UPWARDS and overlay cert list --- */
12471
.updates-box{
12572
margin-top:12px;
12673
padding:12px;
12774
background: var(--glass);
12875
border-radius:10px;
12976
border:1px solid var(--card-border);
13077
box-sizing: border-box;
131-
overflow: hidden;
78+
79+
/* allow the inner popup to overflow upward */
80+
overflow: visible;
81+
position: relative; /* anchor for the absolute-updates-inner */
13282
}
83+
84+
/* header row */
13385
.updates-header{
13486
display:flex;
13587
justify-content:space-between;
13688
align-items:center;
13789
gap:10px;
13890
}
139-
.updates-title{
140-
margin:0;
141-
font-size:0.96rem;
142-
color: var(--muted);
143-
font-weight:700;
144-
}
91+
.updates-title{ margin:0; font-size:0.96rem; color: var(--muted); font-weight:700; }
92+
93+
/* toggle button (visual only) */
14594
.updates-toggle{
14695
background:transparent;
14796
border:1px solid rgba(255,255,255,0.04);
@@ -150,104 +99,52 @@
15099
cursor:pointer;
151100
color: var(--muted);
152101
transition: transform .18s ease, color .14s;
102+
box-sizing: border-box;
153103
}
154104
.updates-toggle.rotated{ transform: rotate(180deg); color: var(--accent); }
155105

106+
/* the inner content will float ABOVE (expand upwards) */
156107
.updates-inner{
157-
margin-top:10px;
158-
max-height:0;
159-
overflow:hidden;
108+
position: absolute;
109+
left: 0;
110+
right: 0;
111+
bottom: calc(100% + 8px); /* sit above the updates header, with a small gap */
112+
max-height: 0;
113+
overflow: auto;
114+
background: linear-gradient(180deg, rgba(255,255,255,0.012), rgba(255,255,255,0.01));
115+
border: 1px solid var(--card-border);
116+
border-radius: 10px;
117+
box-shadow: 0 18px 50px rgba(2,6,23,0.6);
118+
padding-left: 8px;
119+
padding-right: 8px;
160120
transition: max-height .22s ease, padding .18s ease;
161-
padding-top:0;
162-
padding-bottom:0;
121+
z-index: 1300; /* sit above cert cards */
122+
box-sizing: border-box;
163123
}
124+
125+
/* visual spacing for items inside the floating updates panel */
164126
.update-item{
165127
padding:8px 10px;
166128
border-radius:8px;
167129
background: rgba(255,255,255,0.008);
168130
border:1px solid transparent;
169131
color: var(--text);
170132
font-size:0.95rem;
171-
margin-bottom:8px;
133+
margin:8px;
172134
}
173135

174-
/* when expanded some small padding fallback (JS resets exact height) */
136+
/* when JS expands, JS will set maxHeight; ensure padding exists as fallback */
175137
.updates-box.expanded .updates-inner{ padding-top:8px; padding-bottom:8px; }
176138

177-
/* ---------- Modal (certificate details) ---------- */
178-
.modal{
179-
position: fixed;
180-
inset: 0;
181-
display:flex;
182-
align-items:center;
183-
justify-content:center;
184-
background: rgba(2,6,23,0.6);
185-
z-index: 1400;
186-
opacity: 0;
187-
pointer-events: none;
188-
transition: opacity .16s ease;
189-
}
190-
.modal.show{
191-
opacity:1;
192-
pointer-events: auto;
193-
}
139+
/* --- Modal adjustments (scoped) --- */
194140
.modal-panel{
195-
background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
196-
border:1px solid var(--card-border);
197-
padding: 20px;
198-
border-radius: 12px;
199-
width: clamp(320px, 72vw, 760px);
141+
box-sizing: border-box;
200142
max-height: 90vh;
201-
overflow:auto;
202-
position:relative;
203-
box-shadow: 0 30px 80px rgba(2,6,23,0.75);
204-
}
205-
.modal-close{
206-
position:absolute;
207-
top:10px;
208-
right:10px;
209-
background:transparent;
210-
border:none;
211-
color: var(--muted);
212-
font-size:1.05rem;
213-
cursor:pointer;
214-
padding:6px;
215-
border-radius:8px;
216-
}
217-
.modal-close:focus-visible{ outline: 3px solid rgba(78,229,255,0.12); }
218-
.modal-meta, .modal-dates{ color: var(--muted); margin-top:8px; font-weight:600; }
219-
.modal-download{ margin-top:12px; }
220-
221-
/* Download link inside modal styled as primary button */
222-
.download-link{
223-
display:inline-block;
224-
padding:10px 14px;
225-
border-radius:10px;
226-
background: linear-gradient(90deg, var(--accent), var(--accent-2));
227-
color:#021018;
228-
font-weight:700;
229-
text-decoration:none;
230-
}
231-
232-
/* Accessibility focus for interactive elements inside the cert area */
233-
.recommended-box a:focus,
234-
.cert-card:focus,
235-
.updates-toggle:focus,
236-
.download-link:focus{
237-
outline: 3px solid rgba(78,229,255,0.10);
238-
outline-offset: 3px;
143+
overflow:auto; /* allow modal content to scroll vertically */
239144
}
240145

241-
/* ---------- Hamburger (visual) ---------- */
242-
/* only the minimal visual tweaks here; behaviour is JS-driven */
243-
.hamburger{
244-
display:none; /* base layout shows/hides in styles.css media queries; keep safe here */
245-
background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
246-
border: 1px solid rgba(255,255,255,0.04);
247-
color: var(--muted);
248-
padding: 10px;
249-
border-radius: 10px;
250-
cursor: pointer;
251-
backdrop-filter: blur(6px);
146+
/* small-screen niceties */
147+
@media (max-width: 520px){
148+
.updates-inner{ right: auto; left: 6px; bottom: calc(100% + 6px); max-width: calc(100vw - 12px); }
149+
.cert-list{ gap: 10px; }
252150
}
253-
/* shown by styles.css media query — keep visual consistent */

0 commit comments

Comments
 (0)