You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The theme definition is nothing more than a plain JS-Object wrapped in a writable store, that should contain an attribute `breakpoints: string[]` at the top level as a minimum config if you want to use responsive attributes.
25
+
The theme definition is nothing more than a plain JS-Object wrapped in a writable store, that should contain an attribute `breakpoints: string[]` at the top level as a minimum config (if you want to use responsive attributes).
26
26
27
27
Besides that you can define all of your design variables just as you like.
28
28
@@ -55,12 +55,12 @@ Using your theme is pretty straight forward, too. `styled` from `svelte-styled-s
55
55
```jsx
56
56
// Box.svelte
57
57
<script>
58
-
import { styled } from'svelte-styled-system';
59
-
import { theme } from'./theme.js';
58
+
import { styled } from'svelte-styled-system';
59
+
import { theme } from'./theme.js';
60
60
</script>
61
61
62
62
<div use:styled={[$$props, $theme]}>
63
-
<slot></slot>
63
+
<slot></slot>
64
64
</div>
65
65
```
66
66
@@ -69,16 +69,16 @@ That's all! Your are ready to use all css property names + [shorthand](#currentl
69
69
```jsx
70
70
// App.svelte
71
71
<script>
72
-
importBoxfrom'./Box.svelte';
72
+
importBoxfrom'./Box.svelte';
73
73
</script>
74
74
75
75
<Box
76
-
p={["space.s", "space.m", "space.l"]}
77
-
bg="color.primary" color="color.secondary"
78
-
textAlign="center"
76
+
p={["space.s", "space.m", "space.l"]}
77
+
bg="color.primary" color="color.secondary"
78
+
textAlign="center"
79
79
>
80
-
<h3>Using styled-system in svelte!</h3>
81
-
<p>Resize me to see my responsive padding in action</p>
80
+
<h3>Using styled-system in svelte!</h3>
81
+
<p>Resize me to see my responsive padding in action</p>
82
82
</Box>
83
83
```
84
84
@@ -91,13 +91,13 @@ That's all! Your are ready to use all css property names + [shorthand](#currentl
91
91
92
92
```jsx
93
93
{
94
-
color: {
95
-
primary:"dodgerblue", // path: color.primary
96
-
},
97
-
// path: scale.0 => 0
98
-
// path: scale.1 => 0.5rem
99
-
// path: scale.2 => 1rem
100
-
scale: ["0", "0.5rem", "1rem"]
94
+
color: {
95
+
primary:"dodgerblue", // path: color.primary
96
+
},
97
+
// path: scale.0 => 0
98
+
// path: scale.1 => 0.5rem
99
+
// path: scale.2 => 1rem
100
+
scale: ["0", "0.5rem", "1rem"]
101
101
}
102
102
```
103
103
@@ -115,23 +115,15 @@ For commonly used css properties there are shortcuts to make your code _even les
0 commit comments