Skip to content

Commit fa696d3

Browse files
committed
Update examples
1 parent 4f6d176 commit fa696d3

File tree

3 files changed

+39
-35
lines changed

3 files changed

+39
-35
lines changed

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"@codemirror/lang-css": "^6.0.0",
1919
"codemirror": "^6.0.1",
20-
"css-doodle": "0.39.2"
20+
"css-doodle": "0.40.0"
2121
},
2222
"engines": {
2323
"node": ">= 18.0.0"

src/examples.js

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,13 @@ export default {
128128

129129
'99 bottles of beer': read(`
130130
svg {
131-
viewBox: 0 0 50 1200;
131+
viewBox: 0 0 16 $(99*5);
132132
overflow: visible;
133133
style max-height: inherit;
134134
foreignObject {
135135
width, height: 100%;
136-
font-size: 2;
136+
font-size: 1;
137+
style line-height: 1;
137138
p*99-1 {
138139
content: \`
139140
@n bottles of beer on the wall, <br />
@@ -355,31 +356,33 @@ export default {
355356
`),
356357

357358
'blob circles': read(`
358-
--color: #f5f0e1, #ff6e40;
359-
--color2: #1e3d59, #ffc13b, #ffcce7;
360-
361-
viewBox: 0 0 1 1;
362-
preserveAspectRatio: xMidYMid slice;
363-
364-
rect {
365-
width, height: 100%;
366-
fill: defs pattern {
367-
viewBox: 0 0 8 8;
368-
patternTransform: rotate(-45);
369-
width, height: 25%;
370-
rect*4 {
371-
fill: @pn(--color);
372-
x, y: 0 @pn(0, 2, 6, 4);
373-
width, height: 8 2;
374-
}
375-
circle*4 {
376-
r: 1.25;
377-
cx, cy: @pn(2 2, 6 2, 6 6, 2 6);
378-
fill: @pnr(--color);
379-
stroke-width: 1.5;
380-
stroke: defs radialgradient {
381-
stop {offset: .99; stop-color: @pnr(--color2) }
382-
stop {offset: 0; stop-color: @pn(--color) }
359+
svg {
360+
--color: #f5f0e1, #ff6e40;
361+
--color2: #1e3d59, #ffc13b, #ffcce7;
362+
363+
viewBox: 0 0 1 1;
364+
preserveAspectRatio: xMidYMid slice;
365+
366+
rect {
367+
width, height: 100%;
368+
fill: defs pattern {
369+
viewBox: 0 0 8 8;
370+
patternTransform: rotate(-45);
371+
width, height: 25%;
372+
rect*4 {
373+
fill: @pn(--color);
374+
x, y: 0 @pn(0, 2, 6, 4);
375+
width, height: 8 2;
376+
}
377+
circle*4 {
378+
r: 1.25;
379+
cx, cy: @pn(2 2, 6 2, 6 6, 2 6);
380+
fill: @pnr(--color);
381+
stroke-width: 1.5;
382+
stroke: defs radialgradient {
383+
stop {offset: .99; stop-color: @pnr(--color2) }
384+
stop {offset: 0; stop-color: @pn(--color) }
385+
}
383386
}
384387
}
385388
}
@@ -419,10 +422,10 @@ export default {
419422
`),
420423

421424
'planet': read(`
422-
--color-a: pink;
423-
--color-b: #322EA2;
424-
425425
svg {
426+
--color-a: pink;
427+
--color-b: #322EA2;
428+
426429
viewBox: -5 -5 10 10;
427430
g {
428431
mask: defs mask {

0 commit comments

Comments
 (0)