Skip to content

Commit 7b8e596

Browse files
committed
[RZA-250097]: Refactor the minor changes
1 parent f6fb3f4 commit 7b8e596

File tree

4 files changed

+148
-143
lines changed

4 files changed

+148
-143
lines changed

src/assets/styles/blogs/blog.css

Lines changed: 100 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
--shadow-dark: rgba(0, 0, 0, 0.3);
2727
--gradient-dark: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
2828
--primary-light: #764ba2;
29-
--text: #1a1a1a;
29+
--text_color: #1a1a1a;
3030
--secondary: var(--text-secondary-light);
3131
}
3232

@@ -42,7 +42,7 @@
4242
box-sizing: border-box;
4343
position: relative;
4444
overflow-x: hidden;
45-
counter-reset: main-counter;
45+
counter-reset: section-counter;
4646
}
4747

4848
.container__blog::before {
@@ -131,71 +131,69 @@
131131
color: light-dark(var(--text-primary-light), var(--text-primary-dark));
132132
animation: fadeIn 1s ease-out 0.3s both;
133133
text-align: left;
134+
counter-reset: section-counter;
134135
}
135136

136-
.markdown-content h2 {
137-
counter-increment: main-counter;
138-
counter-reset: sub-counter;
139-
}
140-
141-
.markdown-content h2::before {
142-
content: counter(main-counter) ". ";
143-
color: var(--primary);
144-
font-weight: 700;
145-
margin-right: 0.75rem;
146-
}
147-
148-
.markdown-content h2+ul {
149-
counter-reset: sub-counter;
150-
}
151-
152-
.markdown-content h2+ul>li,
153-
.markdown-content h2+*+ul>li {
154-
counter-increment: sub-counter;
155-
list-style: none;
137+
.markdown-content h2:first-of-type {
138+
font-size: 2.25rem;
139+
margin-top: 2.5rem;
140+
margin-left: 0px;
141+
color: light-dark(var(--text-primary-light), var(--text-primary-dark));
142+
font-weight: 600;
143+
line-height: 1.3;
144+
letter-spacing: -0.02em;
156145
position: relative;
157-
padding-left: 0;
146+
transition: all 0.3s ease;
147+
text-align: left;
158148
}
159149

160-
.markdown-content h2+ul>li::before,
161-
.markdown-content h2+*+ul>li::before {
162-
content: counter(main-counter) "." counter(sub-counter) " ";
163-
color: var(--primary);
150+
.markdown-content h2:not(:first-of-type) {
151+
font-size: 2.25rem;
152+
margin-top: 2.5rem;
153+
margin-left: 0px;
154+
color: light-dark(var(--text-primary-light), var(--text-primary-dark));
164155
font-weight: 600;
165-
position: absolute;
166-
left: -3rem;
167-
width: 2.5rem;
156+
line-height: 1.3;
157+
letter-spacing: -0.02em;
158+
position: relative;
159+
transition: all 0.3s ease;
168160
text-align: left;
161+
counter-increment: section-counter;
162+
counter-reset: subsection-counter;
169163
}
170164

171-
.markdown-content h3 {
172-
counter-reset: example-counter;
173-
}
174-
175-
.markdown-content h3::before {
176-
content: counter(main-counter) "." counter(sub-counter, lower-alpha) " ";
177-
color: light-dark(var(--accent-light), var(--accent-dark));
178-
font-weight: 600;
165+
.markdown-content h2:not(:first-of-type)::before {
166+
content: counter(section-counter) ". ";
167+
color: var(--primary);
168+
font-weight: 700;
179169
margin-right: 0.75rem;
180170
}
181171

182-
.markdown-content h3+*+h3 {
183-
counter-increment: example-counter;
172+
.markdown-content h3 {
173+
font-size: 1.85rem;
174+
margin-top: 2.25rem;
175+
margin-left: 0px;
176+
color: light-dark(var(--text-primary-light), var(--text-primary-dark));
177+
font-weight: 600;
178+
line-height: 1.3;
179+
letter-spacing: -0.02em;
180+
position: relative;
181+
transition: all 0.3s ease;
182+
text-align: left;
183+
counter-increment: subsection-counter;
184184
}
185185

186-
.markdown-content h3+*+h3::before {
187-
content: "Example " counter(example-counter) ": ";
188-
color: light-dark(var(--accent-light), var(--accent-dark));
186+
.markdown-content h3::before {
187+
content: counter(section-counter) "." counter(subsection-counter) " ";
188+
color: var(--primary);
189189
font-weight: 600;
190190
margin-right: 0.75rem;
191191
}
192192

193-
.markdown-content h1,
194-
.markdown-content h2,
195-
.markdown-content h3,
196193
.markdown-content h4 {
194+
font-size: 1.55rem;
195+
margin-top: 2rem;
197196
color: light-dark(var(--text-primary-light), var(--text-primary-dark));
198-
margin: 1.75rem 0 0.75rem 0;
199197
font-weight: 600;
200198
line-height: 1.3;
201199
letter-spacing: -0.02em;
@@ -204,26 +202,16 @@
204202
text-align: left;
205203
}
206204

207-
.markdown-content h1 {
208-
font-size: 2.25rem;
209-
margin-top: 2.5rem;
210-
margin-left: 0px;
211-
}
212-
213-
.markdown-content h2 {
214-
font-size: 1.85rem;
215-
margin-top: 2.25rem;
216-
margin-left: -15px;
217-
}
218-
219-
.markdown-content h3 {
220-
font-size: 1.55rem;
221-
margin-top: 2rem;
222-
}
223-
224-
.markdown-content h4 {
205+
.markdown-content h5 {
225206
font-size: 1em;
226207
margin-top: 1.75rem;
208+
color: light-dark(var(--text-primary-light), var(--text-primary-dark));
209+
font-weight: 600;
210+
line-height: 1.3;
211+
letter-spacing: -0.02em;
212+
position: relative;
213+
transition: all 0.3s ease;
214+
text-align: left;
227215
}
228216

229217
.markdown-content p {
@@ -252,7 +240,7 @@
252240
border-bottom: 1px solid transparent;
253241
}
254242

255-
.markdown-content a::after {
243+
.markdown-content a::before {
256244
content: '';
257245
position: absolute;
258246
width: 0;
@@ -268,7 +256,7 @@
268256
transform: translateY(-1px);
269257
}
270258

271-
.markdown-content a:hover::after {
259+
.markdown-content a:hover::before {
272260
width: 100%;
273261
}
274262

@@ -311,7 +299,7 @@
311299
font-size: 1.05rem;
312300
line-height: 1.6;
313301
color: light-dark(var(--text-primary-light), var(--text-primary-dark));
314-
font-family: 'Dancing Script', cursive;
302+
font-family: 'Fira Code', monospace;
315303
position: relative;
316304
transition: all 0.3s ease;
317305
text-align: left;
@@ -328,7 +316,7 @@
328316
padding: 0.1rem 0.4rem;
329317
border-radius: 6px;
330318
font-size: 0.95em;
331-
font-family: 'Dancing Script', cursive;
319+
font-family: 'Fira Code', monospace;
332320
font-weight: 500;
333321
border: 1px solid light-dark(var(--border-light), var(--border-dark));
334322
}
@@ -351,14 +339,30 @@
351339
text-align: left;
352340
}
353341

354-
.markdown-content ul ul {
342+
.markdown-content ul {
355343
list-style: disc;
356344
}
357345

346+
.markdown-content ul ul {
347+
list-style: circle;
348+
}
349+
350+
.markdown-content ul ul ul {
351+
list-style: square;
352+
}
353+
358354
.markdown-content ol {
359355
list-style: decimal;
360356
}
361357

358+
.markdown-content ol ol {
359+
list-style: lower-alpha;
360+
}
361+
362+
.markdown-content ol ol ol {
363+
list-style: lower-roman;
364+
}
365+
362366
.markdown-content li {
363367
margin-bottom: 0.5rem;
364368
line-height: inherit;
@@ -367,16 +371,19 @@
367371
text-align: left;
368372
}
369373

374+
.markdown-content li::before {
375+
content: none;
376+
}
377+
370378
.markdown-content hr {
371379
display: none !important;
372380
}
373381

374-
@keyfr ames fadeInUp {
382+
@keyframes fadeInUp {
375383
from {
376384
opacity: 0;
377385
transform: translateY(20px);
378386
}
379-
380387
to {
381388
opacity: 1;
382389
transform: translateY(0);
@@ -387,7 +394,6 @@
387394
from {
388395
opacity: 0;
389396
}
390-
391397
to {
392398
opacity: 1;
393399
}
@@ -423,6 +429,22 @@
423429
padding: 0 0.75rem;
424430
}
425431

432+
.markdown-content h2:not(:first-of-type) {
433+
font-size: 1.8rem;
434+
}
435+
436+
.markdown-content h3 {
437+
font-size: 1.5rem;
438+
}
439+
440+
.markdown-content h4 {
441+
font-size: 1.3rem;
442+
}
443+
444+
.markdown-content h5 {
445+
font-size: 1.1rem;
446+
}
447+
426448
.markdown-content blockquote {
427449
padding: 0.65rem 1.25rem;
428450
}
@@ -436,11 +458,6 @@
436458
.markdown-content ol {
437459
padding-left: 1.5rem;
438460
}
439-
440-
.markdown-content h2+ul>li::before,
441-
.markdown-content h2+*+ul>li::before {
442-
left: -2.5rem;
443-
}
444461
}
445462

446463
@media (max-width: 480px) {
@@ -452,29 +469,24 @@
452469
font-size: 1.85rem;
453470
}
454471

455-
.markdown-content h1 {
472+
.markdown-content h2:not(:first-of-type) {
456473
font-size: 1.55rem;
457474
}
458475

459-
.markdown-content h2 {
476+
.markdown-content h3 {
460477
font-size: 1.35rem;
461478
}
462479

463-
.markdown-content h3 {
480+
.markdown-content h4 {
464481
font-size: 1.2rem;
465482
}
466483

467-
.markdown-content h4 {
484+
.markdown-content h5 {
468485
font-size: 1.05rem;
469486
}
470487

471488
.markdown-content ul,
472489
.markdown-content ol {
473490
padding-left: 1rem;
474491
}
475-
476-
.markdown-content h2+ul>li::before,
477-
.markdown-content h2+*+ul>li::before {
478-
left: -2rem;
479-
}
480-
}
492+
}

src/content/blog/style-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ image: "/assets/images/blog/blog-2.png"
55
publishDate: "26 December 2024"
66
---
77

8-
# **Style Guide Documentation**
8+
## **Style Guide Documentation**
99

1010
This document outlines the style guide we follow to maintain consistency and readability in our codebase. These principles apply to both CSS and JavaScript/TypeScript components.
1111

0 commit comments

Comments
 (0)