Handbook
Glossary
css-styles-to-classes ( body -- stylesheet body )
Vocabulary
help
.
html
Inputs
body
an
object
Outputs
stylesheet
an
object
body
an
object
Definition
USING:
accessors
assocs
combinators.short-circuit
kernel
sequences
sequences.deep
sorting
xml.data
;
IN:
help.html
::
css-styles-to-classes
( body -- stylesheet body )
H{
}
clone
:>
classes body
[
dup
xml-chunk?
[
seq>>
[
dup
{
[
tag?
]
[
"style"
attr
]
[
"class"
attr
not
]
}
1&&
[
[
clone
~quotation~
change-alist
]
change-attrs
"style"
over
delete-at*
drop
classes
css-class
"class"
rot
set-at
]
[
drop
]
if
]
deep-each
]
[
drop
]
if
]
each
classes
sort-values
css-classes
body
;