File tree Expand file tree Collapse file tree 1 file changed +67
-3
lines changed
Expand file tree Collapse file tree 1 file changed +67
-3
lines changed Original file line number Diff line number Diff line change 1818 --link-dark : # 00bcd4 ;
1919 --mermaid-light : # e0f7fa ;
2020 --mermaid-dark : # 2c2c3e ;
21+ --table-border-light : # ccc ;
22+ --table-border-dark : # 555 ;
23+ --table-row-light : # f9f9f9 ;
24+ --table-row-dark : # 2a2a2a ;
2125 }
2226
2327 /* Base Styles */
5155 transition : background-color 0.3s ;
5256 }
5357
54- /* Dark Mode Class */
58+ /* TABLE STYLING */
59+ table {
60+ border-collapse : collapse;
61+ width : 100% ;
62+ margin : 1.5em 0 ;
63+ font-size : 1rem ;
64+ }
65+
66+ th , td {
67+ border : 1px solid var (--table-border-light );
68+ padding : 0.6em 1em ;
69+ text-align : left;
70+ }
71+
72+ tr : nth-child (even) {
73+ background-color : var (--table-row-light );
74+ }
75+
76+ th {
77+ background-color : # e6f2e6 ;
78+ font-weight : bold;
79+ }
80+
81+ /* Dark Mode */
5582 body .dark-mode {
5683 background-color : var (--bg-dark );
5784 color : var (--text-dark );
7299 background-color : var (--mermaid-dark );
73100 }
74101
102+ /* Dark Mode Table */
103+ body .dark-mode th ,
104+ body .dark-mode td {
105+ border : 1px solid var (--table-border-dark );
106+ }
107+
108+ body .dark-mode tr : nth-child (even) {
109+ background-color : var (--table-row-dark );
110+ }
111+
112+ body .dark-mode th {
113+ background-color : # 224422 ;
114+ }
115+
75116 /* Toggle Button */
76117 # mode-toggle {
77118 position : fixed;
100141</ head >
101142< body >
102143 <!-- Mode Toggle Button -->
103-
144+ < button id =" mode-toggle " > Toggle Mode </ button >
104145
105146 < main >
106147 {{ content }}
148+
149+ <!-- Example Table -->
150+ < table >
151+ < thead >
152+ < tr >
153+ < th > Item</ th >
154+ < th > Quantity</ th >
155+ < th > Price</ th >
156+ </ tr >
157+ </ thead >
158+ < tbody >
159+ < tr >
160+ < td > Apples</ td >
161+ < td > 5</ td >
162+ < td > $4.00</ td >
163+ </ tr >
164+ < tr >
165+ < td > Bananas</ td >
166+ < td > 8</ td >
167+ < td > $3.20</ td >
168+ </ tr >
169+ </ tbody >
170+ </ table >
107171 </ main >
108172
109173 < script >
113177 } ) ;
114178 </ script >
115179</ body >
116- </ html >
180+ </ html >
You can’t perform that action at this time.
0 commit comments