@@ -5,92 +5,91 @@ import { until } from 'lit/directives/until.js';
55import type { RendererObject , RendererThis , Tokens } from 'marked' ;
66import { marked } from 'marked' ;
77import type { ThemeIcon } from 'vscode' ;
8+ import { ruleStyles } from '../../../plus/shared/components/vscode.css' ;
89
910@customElement ( 'gl-markdown' )
1011export class GlMarkdown extends LitElement {
11- static override styles = css `
12- a ,
13- a code {
14- text-decoration : none;
15- color : var (--vscode-textLink-foreground );
16- }
17-
18- a : hover ,
19- a : hover code {
20- color : var (--vscode-textLink-activeForeground );
21- }
12+ static override styles = [
13+ ruleStyles ,
14+ css `
15+ a ,
16+ a code {
17+ text-decoration : none;
18+ color : var (--vscode-textLink-foreground );
19+ }
2220
23- a : hover : not (.disabled ) {
24- cursor : pointer;
25- }
21+ a : hover ,
22+ a : hover code {
23+ color : var (--vscode-textLink-activeForeground );
24+ }
2625
27- p ,
28- .code ,
29- ul ,
30- h1 ,
31- h2 ,
32- h3 ,
33- h4 ,
34- h5 ,
35- h6 {
36- margin : 8px 0 ;
37- }
26+ a : hover : not (.disabled ) {
27+ cursor : pointer;
28+ }
3829
39- h1 ,
40- h2 ,
41- h3 ,
42- h4 ,
43- h5 ,
44- h6 {
45- line-height : 1.1 ;
46- }
30+ p ,
31+ .code ,
32+ ul ,
33+ h1 ,
34+ h2 ,
35+ h3 ,
36+ h4 ,
37+ h5 ,
38+ h6 {
39+ margin : 8px 0 ;
40+ }
4741
48- code {
49- background : var (--vscode-textCodeBlock-background );
50- border-radius : 3px ;
51- padding : 0px 4px 2px 4px ;
52- font-family : var (--vscode-editor-font-family );
53- }
42+ h1 ,
43+ h2 ,
44+ h3 ,
45+ h4 ,
46+ h5 ,
47+ h6 {
48+ line-height : 1.1 ;
49+ }
5450
55- code code-icon {
56- color : inherit;
57- font-size : inherit;
58- vertical-align : middle;
59- }
51+ code {
52+ background : var (--vscode-textCodeBlock-background );
53+ border-radius : 3px ;
54+ padding : 0px 4px 2px 4px ;
55+ font-family : var (--vscode-editor-font-family );
56+ }
6057
61- hr {
62- border : none;
63- border-top : 1px solid var (--color-foreground--25 );
64- }
58+ code code-icon {
59+ color : inherit;
60+ font-size : inherit;
61+ vertical-align : middle;
62+ }
6563
66- p : first-child ,
67- .code : first-child ,
68- ul : first-child {
69- margin-top : 0 ;
70- }
64+ p : first-child ,
65+ .code : first-child ,
66+ ul : first-child {
67+ margin-top : 0 ;
68+ }
7169
72- p : last-child ,
73- .code : last-child ,
74- ul : last-child {
75- margin-bottom : 0 ;
76- }
70+ p : last-child ,
71+ .code : last-child ,
72+ ul : last-child {
73+ margin-bottom : 0 ;
74+ }
7775
78- /* MarkupContent Layout */
79- ul {
80- padding-left : 20px ;
81- }
82- ol {
83- padding-left : 20px ;
84- }
76+ /* MarkupContent Layout */
77+ ul {
78+ padding-left : 20px ;
79+ }
80+ ol {
81+ padding-left : 20px ;
82+ }
8583
86- li > p {
87- margin-bottom : 0 ;
88- }
84+ li > p {
85+ margin-bottom : 0 ;
86+ }
8987
90- li > ul {
91- margin-top : 0 ;
92- }
93- ` ;
88+ li > ul {
89+ margin-top : 0 ;
90+ }
91+ ` ,
92+ ] ;
9493
9594 @property ( { type : String } )
9695 private markdown = '' ;
0 commit comments