Handbook
Glossary
fix-css-style ( style -- style' )
Vocabulary
help
.
html
Inputs
style
an
object
Outputs
style'
an
object
Definition
USING:
formatting
kernel
math
math.parser
regexp
sequences
splitting
;
IN:
help.html
:
fix-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
2
*
number>string
"padding: "
"px;"
surround
]
re-replace-with
R/ width: \d+px;/
[
drop
""
]
re-replace-with
R/ font-family: monospace;/
[
" margin-top: 0.5em; margin-bottom: 0.5em; width: fit-content;..."
append
]
re-replace-with
;