1- // XMarkdown default styles
2- // Note: No theme colors included, only basic layout and typography styles
1+ /* XMarkdown default styles */
2+ /* Note: No theme colors included, only basic layout and typography styles */
33@keyframes x-markdown-fade-in {
44 from {
55 opacity : 0 ;
2929 --hr-margin : 1.5em 0 ;
3030 --table-margin : 1em 0 ;
3131
32- // Base styles
32+ /* Base styles */
3333 font-size : var (--font-size );
3434 line-height : 1.5714285714285714 ;
3535 word-wrap : break-word;
3636 overflow-wrap : break-word;
3737 width : 100% ;
3838 color : var (--text-color );
3939
40- // Long content wrapping
40+ /* Long content wrapping */
4141 p ,
4242 div ,
4343 span ,
4848 overflow-wrap : break-word;
4949 }
5050
51- // Code block wrapping
51+ /* Code block wrapping */
5252 pre ,
5353 code {
5454 word-break : break-word;
5555 overflow-wrap : break-word;
5656 white-space : pre-wrap;
5757 }
5858
59- // Table overflow handling
59+ /* Table overflow handling */
6060 table {
6161 word-break : break-word;
6262 overflow-wrap : break-word;
7575
7676 pre ,
7777 code {
78-
7978 td ,
8079 th {
8180 padding : var (--pre-th-td-padding );
8483 }
8584 }
8685
87-
88-
89- // Paragraph styles optimization
86+ /* Paragraph styles optimization */
9087 p {
9188 margin : var (--margin-block );
89+ }
9290
93- // First paragraph has no top margin
94- & :first-child {
95- margin-top : 0 ;
96- }
91+ /* First paragraph has no top margin */
92+ p : first-child {
93+ margin-top : 0 ;
94+ }
9795
98- // Last paragraph has no bottom margin
99- & :last-child {
100- margin-bottom : 0 ;
101- }
96+ /* Last paragraph has no bottom margin */
97+ p : last-child {
98+ margin-bottom : 0 ;
10299 }
103100
104- // List styles optimization
101+ /* List styles optimization */
105102 ul ,
106103 ol {
107104 margin : var (--margin-ul-ol );
108105 padding : var (--padding-ul-ol );
106+ }
109107
110- & :first-child {
111- margin-top : 0 ;
112- }
108+ ul : first-child ,
109+ ol : first-child {
110+ margin-top : 0 ;
111+ }
113112
114- & :last-child {
115- margin-bottom : 0 ;
116- }
113+ ul : last-child ,
114+ ol : last-child {
115+ margin-bottom : 0 ;
117116 }
118117
119- ol > li {
118+ ol > li {
120119 list-style : decimal;
121120 }
122121
123- ul > li {
122+ ul > li {
124123 list-style : disc;
125124 }
126125
127126 li {
128127 margin : var (--margin-li );
128+ }
129129
130- & :first-child {
131- margin-top : 0 ;
132- }
130+ li : first-child {
131+ margin-top : 0 ;
132+ }
133133
134- & :last-child {
135- margin-bottom : 0 ;
136- }
134+ li : last-child {
135+ margin-bottom : 0 ;
137136 }
138137
139- // Code block styles
138+ /* Code block styles */
140139 pre {
141140 margin : var (--margin-pre );
142141 overflow-x : auto;
142+ }
143143
144- & :first-child {
145- margin-top : 0 ;
146- }
144+ pre : first-child {
145+ margin-top : 0 ;
146+ }
147147
148- & :last-child {
149- margin-bottom : 0 ;
150- }
148+ pre : last-child {
149+ margin-bottom : 0 ;
151150 }
152151
153- // Inline code styles
152+ /* Inline code styles */
154153 code {
155154 padding : var (--padding-code-inline );
156155 margin : var (--margin-code-inline );
166165 line-height : 2 ;
167166 }
168167
169- // Image styles
168+ /* Image styles */
170169 img {
171170 max-width : 100% ;
172171 height : auto;
173172 margin : var (--image-margin );
174173 }
175174
176- // Horizontal rule
175+ /* Horizontal rule */
177176 hr {
178177 margin : var (--hr-margin );
179178 }
180179
181- // Table styles
180+ /* Table styles */
182181 table : not (pre , code ) {
183182 margin : var (--table-margin );
184183 border-collapse : collapse;
184+ }
185185
186- & :first-child {
187- margin-top : 0 ;
188- }
186+ table : not ( pre , code ) : first-child {
187+ margin-top : 0 ;
188+ }
189189
190- & :last-child {
191- margin-bottom : 0 ;
192- }
190+ table : not (pre , code ): last-child {
191+ margin-bottom : 0 ;
193192 }
194193}
195194
199198 margin : 0 ;
200199 text-align : initial;
201200 vertical-align : middle;
201+ }
202202
203- > .katex {
204- display : inline-block ;
205- text-align : initial ;
206- white-space : normal ;
203+ .katex-display > .katex {
204+ display : inline-block;
205+ text-align : initial;
206+ white-space : normal;
207+ }
207208
208- > .katex-html {
209- display : inline-block ;
210- position : static ;
209+ .katex-display > .katex > .katex-html {
210+ display : inline-block;
211+ position : static;
212+ }
211213
212- > .tag {
213- position : static ;
214- }
215- }
216- }
214+ .katex-display > .katex > .katex-html > .tag {
215+ position : static;
217216 }
218- }
217+ }
0 commit comments