Skip to content

Commit 71f58f5

Browse files
Refactor Website CSS: eliminate duplication, add CSS variables (#3262)
* Initial plan * Consolidate duplicate color values with CSS variables Co-authored-by: BornToBeRoot <[email protected]> * Remove unused duplicate CSS file and import Co-authored-by: BornToBeRoot <[email protected]> * Add CSS variable for content max-width to eliminate duplication Co-authored-by: BornToBeRoot <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: BornToBeRoot <[email protected]>
1 parent b913d83 commit 71f58f5

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

Website/docs/introduction.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
sidebar_position: 0
33
---
44

5-
import styles from "./styles.module.css";
6-
75
# Introduction
86

97
NETworkManager is a powerful tool for managing networks and troubleshoot network problems!

Website/docs/styles.module.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

Website/src/css/custom.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616

1717
--ifm-code-font-size: 95%;
1818
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
19+
20+
/* Custom color variables */
21+
--ifm-background-dark: #2b3137;
22+
23+
/* Custom layout variables */
24+
--content-max-width: 1060px;
1925
}
2026

2127
/* For readability concerns, you should choose a lighter palette in dark mode. */
@@ -33,11 +39,11 @@
3339
*/
3440

3541
.footer--dark {
36-
--ifm-footer-background-color: #2b3137;
42+
--ifm-footer-background-color: var(--ifm-background-dark);
3743
}
3844

3945
.image {
4046
display: block;
4147
margin: auto;
42-
max-width: 1060px;
48+
max-width: var(--content-max-width);
4349
}

Website/src/pages/styles.module.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ table {
1414
position: relative;
1515
overflow: hidden;
1616

17-
background-color: #2b3137;
17+
background-color: var(--ifm-background-dark);
1818
}
1919

2020
@media screen and (max-width: 996px) {
@@ -30,7 +30,7 @@ table {
3030
}
3131

3232
.hero {
33-
background-color: #2b3137;
33+
background-color: var(--ifm-background-dark);
3434
padding: 48px;
3535
}
3636

@@ -97,7 +97,7 @@ table {
9797
.imageScreenshot {
9898
display: block;
9999
margin: auto;
100-
max-width: 1060px;
100+
max-width: var(--content-max-width);
101101
width: 100%;
102102
height: auto;
103103
}

0 commit comments

Comments
 (0)