11// wider.scss is already setting the content width
22$content-width : 75rem ;
33
4+ // CSS Variables for light/dark themes
5+ :root {
6+ // Light theme variables
7+ --bg-color : #fafdff ;
8+ --text-color : black ;
9+ --primary-color : #397DFF ;
10+ --primary-hover : #245dcc ;
11+ --border-color : #e1e4e8 ;
12+ --table-header-bg : #e4ecfa ;
13+ --table-stripe-bg : #f3f8fe ;
14+ --table-border : #c6d5f9 ;
15+ --table-row-border : #e4ecfa ;
16+ --blockquote-bg : #f0f6fe ;
17+ --hr-color : #e4ecfa ;
18+ --card-bg : #ffffff ;
19+ --card-shadow : rgba (0 , 0 , 0 , 0.1 );
20+ }
21+
22+ [data-theme = " dark" ] {
23+ // Dark theme variables
24+ --bg-color : #0d1117 ;
25+ --text-color : #f0f6fc ;
26+ --primary-color : #58a6ff ;
27+ --primary-hover : #79c0ff ;
28+ --border-color : #30363d ;
29+ --table-header-bg : #161b22 ;
30+ --table-stripe-bg : #0d1117 ;
31+ --table-border : #21262d ;
32+ --table-row-border : #21262d ;
33+ --blockquote-bg : #161b22 ;
34+ --hr-color : #21262d ;
35+ --card-bg : #161b22 ;
36+ --card-shadow : rgba (0 , 0 , 0 , 0.3 );
37+ }
38+
439// Global styles
540
641body {
742 margin : 0 auto ;
843 font-family : ' Inter' , ' Helvetica Neue' , Arial , sans-serif ;
944 font-size : 1.1rem ;
10- background : #fafdff ;
11- color : black ;
45+ background : var (--bg-color );
46+ color : var (--text-color );
47+ transition : background-color 0.3s ease , color 0.3s ease ;
1248}
1349
1450// Links
1551a ,
1652a :visited {
17- color : #397DFF !important ; // force blue for all links
53+ color : var ( --primary-color ) !important ;
1854 text-decoration : underline ;
1955 font-weight : 500 ;
2056 transition : color 0.15s ;
2157}
2258
2359a :hover ,
2460a :focus {
25- color : #245dcc !important ; // force dark blue for hover/focus
61+ color : var ( --primary-hover ) !important ;
2662 text-decoration : underline ;
2763}
2864
2965
3066// Headings
3167h1 , h2 , h3 , h4 , h5 , h6 {
32- color : #397DFF ;
68+ color : var ( --primary-color ) ;
3369 font-weight : 700 ;
3470 margin-top : 2.2rem ;
3571 margin-bottom : 1.2rem ;
@@ -42,7 +78,7 @@ h1, h2, h3, h4, h5, h6 {
4278
4379h2 {
4480 font-size : 1.75rem ;
45- border-bottom : 1px solid #e0ebfa ;
81+ border-bottom : 1px solid var ( --border-color ) ;
4682 padding-bottom : 0.2rem ;
4783}
4884
@@ -57,7 +93,7 @@ h4, h5, h6 {
5793
5894// Bold text
5995strong , b {
60- color : #397DFF ;
96+ color : var ( --primary-color ) ;
6197 font-weight : 700 ;
6298}
6399
@@ -66,30 +102,31 @@ table {
66102 width : 100% ;
67103 border-collapse : collapse ;
68104 margin : 2rem 0 ;
69- background : #fff ;
105+ background : var ( --card-bg ) ;
70106 font-size : 1rem ;
107+ transition : background-color 0.3s ease ;
71108}
72109
73110thead th {
74- background : #e4ecfa ;
75- color : #397DFF ;
111+ background : var ( --table-header-bg ) ;
112+ color : var ( --primary-color ) ;
76113 font-weight : 700 ;
77- border-bottom : 2px solid #c6d5f9 ;
114+ border-bottom : 2px solid var ( --table-border ) ;
78115 padding : 0.7rem ;
79116}
80117
81118tbody td {
82- border-bottom : 1px solid #e4ecfa ;
119+ border-bottom : 1px solid var ( --table-row-border ) ;
83120 padding : 0.7rem ;
84121 vertical-align : top ;
85122}
86123
87124tbody tr :nth-child (even ) {
88- background : #f3f8fe ;
125+ background : var ( --table-stripe-bg ) ;
89126}
90127
91128.label {
92- background : #397DFF ;
129+ background : var ( --primary-color ) ;
93130 color : #fff !important ; // ensures text stays white
94131 border-radius : 1.3em ;
95132 padding : 0.22em 1.1em ;
@@ -114,17 +151,18 @@ img {
114151}
115152
116153blockquote {
117- border-left : 4px solid #397DFF ;
118- background : #f0f6fe ;
154+ border-left : 4px solid var ( --primary-color ) ;
155+ background : var ( --blockquote-bg ) ;
119156 padding : 0.6em 1em ;
120157 margin : 1.5em 0 ;
121- color : #397DFF ;
158+ color : var ( --primary-color ) ;
122159 font-style : italic ;
160+ transition : background-color 0.3s ease ;
123161}
124162
125163hr {
126164 border : none ;
127- border-top : 2px solid #e4ecfa ;
165+ border-top : 2px solid var ( --hr-color ) ;
128166 margin : 3rem 0 ;
129167}
130168
0 commit comments