-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathms.ts
34 lines (32 loc) · 858 Bytes
/
ms.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { MathMLElement, html, TemplateResult, customElement, property } from './mathml-element.js';
@customElement('math-s')
export class MathSElement extends MathMLElement {
@property({ type: String, reflect: true }) lquote?: string;
@property({ type: String, reflect: true }) rquote?: string;
render(): TemplateResult {
return html`
<style>
:host {
display: inline-block;
color: var(--math-color, inherit);
background: var(--math-background, inherit);
}
:host:before {
content: "\\0022";
margin-right: -0.2em;
}
:host:after {
content: "\\0022";
margin-left: -0.2em;
}
:host([lquote]):before {
content: attr(lquote)
}
:host([rquote]):after {
content: attr(rquote)
}
</style>
<slot></slot>
`;
}
}