Vocabulary
help.html

Inputs
stylean object


Outputs
style'an object


Definition


: css-style ( style -- style' )
R/ font-size: \d+pt;/ [
"font-size: " ?head drop "pt;" ?tail drop
string>number 2 - "font-size: %dpt;" sprintf
] re-replace-with R/ padding: \d+px;/ [
"padding: " ?head drop "px;" ?tail drop
string>number dup even? [ 2 * 1 + ] [ 2 * ] if
number>string "padding: " "px;" surround
] re-replace-with R/ width: \d+px;/
[ drop "" ] re-replace-with R/ font-family: monospace;/
[ " white-space: pre-wrap; line-height: 125%;" append ]
re-replace-with ;