Skip to content

Commit 0f10ceb

Browse files
KouroshRZKouroshRZ
authored andcommitted
Tables color fix
1 parent 4205012 commit 0f10ceb

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

docs/assets/css/extra.css

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
--md-code-fg-color: #000000; /* White for code text */ /* Changed to white */
1212
--md-comment-color: #4b4b4b;
1313
--md-typeset-a-color: #ff4444;
14+
--md-table-fg: #1c1e20;
15+
--md-table-bg: #e2dada;
1416
--md-n-color: #000000;
1517
--md-o-color: #227a38;
1618
--md-nn-color: #70166c;
@@ -21,6 +23,17 @@
2123
--md-nb-color: #768303;
2224
--md-kc-color: #1c2599;
2325
--md-s-color: #186415;
26+
--table-header-bg: #acb2bd;
27+
--table-header-color: #1d1e20;
28+
--table-header-border-color: #282529;
29+
--table-cell-bg: #f3eaea;
30+
--table-cell-color: #1f1c1c;
31+
--table-cell-border-color: #d6bfbe;
32+
--table-hover-bg: #7283ce;
33+
--table-zebra-bg: #418cd6;
34+
--table-header-bg: #88a9df;
35+
--table-header-fg: #0b1f46;
36+
--table-header-border: #3a68b3;
2437
}
2538

2639
[data-md-color-scheme="mydark"] {
@@ -36,6 +49,8 @@
3649
--md-code-fg-color: #ffffff; /* White for code text */ /* Changed to white */
3750
--md-comment-color: #cfcfcf;
3851
--md-typeset-a-color: #ff4444;
52+
--md-table-fg: #d5d9dd;
53+
--md-table-bg: #1f1d1d;
3954
--md-n-color: #8dc9ec;
4055
--md-o-color: #92f08f;
4156
--md-nn-color: #1e8694;
@@ -48,8 +63,81 @@
4863
--md-nt-color: #d5df4b;
4964
--md-na-color: #ffffff;
5065
--md-s-color: #93e290;
66+
--table-header-bg: #27292c;
67+
--table-header-color: #c7ced8;
68+
--table-header-border-color: #a991af;
69+
--table-cell-bg: #222020;
70+
--table-cell-color: #e9e0e0;
71+
--table-cell-border-color: #2b1514;
72+
--table-hover-bg: #668eda;
73+
--table-zebra-bg: #418cd6;
74+
--table-header-bg: #16376b;
75+
--table-header-fg: #dbe0e9;
76+
--table-header-border: #051b3f;
5177
}
5278

79+
/********************************************************************************************/
80+
81+
.md-typeset table:not([class]) th {
82+
/* Background */
83+
background-color: var(--table-header-bg);
84+
85+
/* Text */
86+
color: var(--table-header-color);
87+
88+
/* Borders */
89+
border-color: var(--table-header-border-color);
90+
91+
/* Additional */
92+
text-transform: var(--table-header-text-transform);
93+
}
94+
95+
96+
.md-typeset table:not([class]) td {
97+
/* Background */
98+
background-color: var(--table-cell-bg);
99+
100+
/* Text */
101+
color: var(--table-cell-color);
102+
103+
/* Borders */
104+
border-color: var(--table-cell-border-color);
105+
border-width: var(--table-border-width);
106+
}
107+
108+
/* Zebra striping */
109+
.md-typeset table:not([class]) tr:nth-child(even) td {
110+
background-color: var(--table-zebra-bg);
111+
}
112+
113+
/* Hover effects */
114+
.md-typeset table:not([class]) tr:hover td {
115+
background-color: var(--table-hover-bg);
116+
117+
--table-hover-color: inherit;
118+
color: var(--table-hover-color);
119+
}
120+
121+
122+
123+
/* Force header background color */
124+
.md-typeset table:not([class]) thead tr th {
125+
background-color: var(--table-header-bg) !important;
126+
color: var(--table-header-fg) !important;
127+
border-color: var(--table-header-border) !important;
128+
}
129+
130+
/* Remove any gradient effects */
131+
.md-typeset table:not([class]) thead tr th {
132+
background-image: none !important;
133+
}
134+
135+
/***************************************************************************************/
136+
137+
/* Back To Top Button Fix*/
138+
139+
/***************************************************************************************/
140+
53141

54142
html {
55143
scroll-behavior: smooth;

0 commit comments

Comments
 (0)