File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
apps/svelte.dev/content/docs/svelte Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,10 @@ To mark a style as important, use the `|important` modifier:
3535<div style:color|important="red">...</div>
3636```
3737
38- When ` style: ` directives are combined with ` style ` attributes, the directives will take precedence:
38+ When ` style: ` directives are combined with ` style ` attributes, the directives will take precedence,
39+ even over ` !important ` properties:
3940
4041``` svelte
41- <div style="color: blue;" style:color="red">This will be red</div>
42+ <div style:color="red" style="color: blue">This will be red</div>
43+ <div style:color="red" style="color: blue !important">This will still be red</div>
4244```
Original file line number Diff line number Diff line change @@ -130,12 +130,12 @@ test('Effect', () => {
130130 // effects normally run after a microtask,
131131 // use flushSync to execute all pending effects synchronously
132132 flushSync ();
133- expect (log . value ).toEqual ([0 ]);
133+ expect (log).toEqual ([0 ]);
134134
135135 count = 1 ;
136136 flushSync ();
137137
138- expect (log . value ).toEqual ([0 , 1 ]);
138+ expect (log).toEqual ([0 , 1 ]);
139139 });
140140
141141 cleanup ();
@@ -149,17 +149,13 @@ test('Effect', () => {
149149 */
150150export function logger (getValue ) {
151151 /** @type {any[]} */
152- let log = $state ([]) ;
152+ let log = [] ;
153153
154154 $effect (() => {
155155 log .push (getValue ());
156156 });
157157
158- return {
159- get value () {
160- return log;
161- }
162- };
158+ return log;
163159}
164160```
165161
You can’t perform that action at this time.
0 commit comments