-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathsvelte-config-styling.ts
More file actions
62 lines (55 loc) · 1.36 KB
/
svelte-config-styling.ts
File metadata and controls
62 lines (55 loc) · 1.36 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
///
/// this configuration is work-in-progress.
///
export type SvelteStylingOption =
| SvelteStyleFragment
| SvelteInlineCssOption
| SvelteCssInJsOption;
type SvelteInlineCssOption =
| SvelteInlineCssWithHtmlStandard
| SvelteInlineCssWithStyleDirective;
type SvelteCssInJsOption = SvelteEmotionCSS;
interface SvelteEmotionCSS {}
/**
* inline css styling in svelte with html standard way.
*
* e.g. 👇
* ```html
* <div style="background: black"></div>
* ```
*/
export interface SvelteInlineCssWithHtmlStandard {
type: "inline-css-standard";
}
/**
*
* e.g. 👇
* ```html
* <div
* style:position="absolute"
* style:top={position === 'absolute' ? '20px' : null}
* style:pointer-events={pointerEvents ? null : 'none'}
* ></div>
* ```
*
* Learn more - [svelte style directive RFC](https://github.com/sveltejs/rfcs/blob/master/text/0008-style-directives.md)
*/
export interface SvelteInlineCssWithStyleDirective {
type: "inline-css-with-style-directive";
}
/**
* styling using standard scoped css under <style> tag in svelte.
*
* e.g. 👇
* ```html
* <p style="color: {color}; --opacity: {bgOpacity};">This is a paragraph.</p>
* <style>
* p {
* font-family: "Comic Sans MS", cursive;
* background: rgba(255, 62, 0, var(--opacity));
* }
* </style>
* ```
*/
// TODO: give a better clear name
export interface SvelteStyleFragment {}