Skip to content

Commit 90ea473

Browse files
optimized
Signed-off-by: Rajesh-Nagarajan-11 <rajeshnagarajan36@gmail.com>
1 parent 98f8496 commit 90ea473

1 file changed

Lines changed: 17 additions & 56 deletions

File tree

src/sections/Community/Handbook/Handbook.style.js

Lines changed: 17 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import styled from "styled-components";
22
export const HandbookWrapper = styled.div`
3-
/* Ensure consistent initial layout for SSR */
43
display: flex;
54
flex-direction: column;
6-
min-height: 100vh;
7-
position: relative;
85
96
.content > a:first-of-type > h2:first-of-type {
107
padding-top: 1rem;
118
}
9+
1210
.highlight{
1311
font-weight: 600;
1412
}
@@ -86,61 +84,22 @@ export const HandbookWrapper = styled.div`
8684
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
8785
}
8886
89-
/* SSR-safe header with strict dimension control */
9087
.page-header-section {
91-
position: relative;
92-
width: 100%;
93-
height: 160px;
94-
margin: 0;
95-
padding: 0;
96-
display: flex;
97-
align-items: center;
98-
justify-content: center;
88+
min-height: 10rem;
89+
text-align: center;
9990
background: rgb(71,126,150);
10091
background: linear-gradient(250deg, rgba(71,126,150,1) 0%, rgba(0,179,159,1) 35%, rgba(60,73,79,1) 100%);
101-
/* Prevent layout shift during hydration */
102-
contain: layout;
103-
}
104-
105-
.page-header-section h1 {
106-
margin: 0;
107-
padding: 0 1rem;
108-
width: 100%;
109-
max-width: 1200px;
110-
color: white;
111-
font-size: 2.5rem;
112-
font-weight: 700;
113-
line-height: 1.2;
114-
text-align: center;
115-
box-sizing: border-box;
116-
}
117-
118-
@media screen and (max-width: 768px) {
119-
.page-header-section {
120-
height: auto;
121-
min-height: 140px;
122-
padding: 1rem 0;
123-
}
124-
125-
.page-header-section h1 {
126-
font-size: 1.5rem;
127-
line-height: 1.2;
128-
padding: 0 1rem;
129-
word-wrap: break-word;
130-
hyphens: auto;
131-
}
132-
}
133-
134-
@media screen and (max-width: 480px) {
135-
.page-header-section {
136-
min-height: 120px;
137-
padding: 0.75rem 0;
92+
padding: 1rem 0;
93+
h1 {
94+
display: flex;
95+
align-items: center;
96+
justify-content: center;
97+
min-height: 8rem;
13898
}
139-
140-
.page-header-section h1 {
141-
font-size: 1.25rem;
142-
line-height: 1.1;
143-
padding: 0 0.75rem;
99+
@media (max-width: 680px) {
100+
h1 {
101+
font-size: 1.75rem;
102+
}
144103
}
145104
}
146105
@@ -244,7 +203,7 @@ export const HandbookWrapper = styled.div`
244203
}
245204
246205
input[type=checkbox] + label:before {
247-
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="white" viewBox="4 4 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>');
206+
content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="white" viewBox="0 4 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>');;
248207
border: 0.1em solid #000;
249208
border-radius: 0.2em;
250209
display: inline-block;
@@ -253,6 +212,7 @@ export const HandbookWrapper = styled.div`
253212
padding-left: 0.2em;
254213
padding-bottom: 0.3em;
255214
margin-right: 0.5em;
215+
256216
margin-bottom: 0.15em;
257217
vertical-align: bottom;
258218
color: transparent;
@@ -272,7 +232,8 @@ export const HandbookWrapper = styled.div`
272232
}
273233
274234
input[type=checkbox]:checked + label:before {
275-
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="black" viewBox="4 4 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>');
235+
content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="black" viewBox="0 4 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>');;
236+
276237
background-color: ${(props) => props.theme.keppelColor};
277238
border-color: ${(props) => props.theme.primaryLightColorTwo};
278239
color: #fff;

0 commit comments

Comments
 (0)