Platform
Resources
Pricing
Sign in
Get started
Trevor Manz
phd student, middle child
Workspace
Fork
Public
By
Trevor Manz
Edited
Jan 14, 2023
Insert cell
Insert cell
tw
=
await
import
(
"https://cdn.skypack.dev/twind"
)
.
then
(
(
m
)
=>
{
let
util
=
m
.
create
(
{
preflight
:
false
}
)
;
let
styles
;
return
(
...
tokens
)
=>
{
util
.
tw
(
(
{
css
}
)
=>
{
styles
=
css
(
...
tokens
)
;
styles
.
_
=
undefined
;
return
""
;
}
)
;
return
styles
;
}
;
}
)
Insert cell
viewof
str
=
Inputs
.
text
(
)
Insert cell
Object
.
entries
(
tw
(
str
)
)
.
map
(
(
[
k
,
v
]
)
=>
{
if
(
typeof
v
===
"object"
)
{
v
=
Object
.
entries
(
v
)
.
map
(
(
d
)
=>
d
[
0
]
+
": "
+
d
[
1
]
+
";"
)
;
return
k
+
"{\n"
+
v
+
"\n}\n"
;
}
return
k
+
": "
+
v
+
";"
;
}
)
.
join
(
"\n"
)
Insert cell
tw
(
str
)
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tw
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
str
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML