diff --git a/basis/help/stylesheet/stylesheet.factor b/basis/help/stylesheet/stylesheet.factor index 7f7975a652..c2e8e98476 100644 --- a/basis/help/stylesheet/stylesheet.factor +++ b/basis/help/stylesheet/stylesheet.factor @@ -35,7 +35,7 @@ H{ { wrap-margin 500 } { foreground COLOR: gray20 } { page-color COLOR: FactorLightTan } - { border-width 5 } + { inset { 5 5 } } } title-style set-global SYMBOL: help-path-style @@ -72,7 +72,7 @@ H{ SYMBOL: code-style H{ { page-color COLOR: FactorLightTan } - { border-width 5 } + { inset { 5 5 } } { wrap-margin f } } code-style set-global @@ -89,7 +89,7 @@ SYMBOL: warning-style H{ { page-color COLOR: gray90 } { border-color COLOR: red } - { border-width 5 } + { inset { 5 5 } } { wrap-margin 500 } } warning-style set-global @@ -97,7 +97,7 @@ SYMBOL: deprecated-style H{ { page-color COLOR: gray90 } { border-color COLOR: red } - { border-width 5 } + { inset { 5 5 } } { wrap-margin 500 } } deprecated-style set-global diff --git a/basis/help/tips/tips.factor b/basis/help/tips/tips.factor index 4685b6c517..8569be0b8f 100644 --- a/basis/help/tips/tips.factor +++ b/basis/help/tips/tips.factor @@ -30,7 +30,7 @@ SYMBOL: tip-of-the-day-style H{ { page-color COLOR: lavender } - { border-width 5 } + { inset { 5 5 } } { wrap-margin 500 } } tip-of-the-day-style set-global diff --git a/basis/html/streams/streams.factor b/basis/html/streams/streams.factor index 49a9225402..26a3d5f391 100644 --- a/basis/html/streams/streams.factor +++ b/basis/html/streams/streams.factor @@ -99,7 +99,8 @@ M: html-span-stream dispose : border-css, ( border -- ) "border: 1px solid #" % hex-color, "; " % ; -: padding-css, ( padding -- ) "padding: " % # "px; " % ; +: padding-css, ( padding -- ) + first2 "padding: " % # "px " % # "px; " % ; CONSTANT: pre-css "white-space: pre; font-family: monospace;" @@ -108,7 +109,7 @@ CONSTANT: pre-css "white-space: pre; font-family: monospace;" { { page-color bg-css, } { border-color border-css, } - { border-width padding-css, } + { inset padding-css, } } make-css ] [ wrap-margin swap at diff --git a/basis/io/styles/styles-docs.factor b/basis/io/styles/styles-docs.factor index a952c05dbf..19952b2b15 100755 --- a/basis/io/styles/styles-docs.factor +++ b/basis/io/styles/styles-docs.factor @@ -140,7 +140,7 @@ ARTICLE: "paragraph-styles" "Paragraph styles" "Paragraph styles for " { $link with-nesting } ":" { $subsection page-color } { $subsection border-color } -{ $subsection border-width } +{ $subsection inset } { $subsection wrap-margin } { $subsection presented } ; @@ -250,10 +250,10 @@ HELP: border-color { $code "H{ { border-color T{ rgba f 1 0 0 1 } } }\n[ \"A border\" write ] with-nesting nl" } } ; -HELP: border-width -{ $description "Paragraph style. Pixels between edge of text and border, an integer." } +HELP: inset +{ $description "Paragraph style. A pair of integers representing the number of pixels that the content should be inset from the border. The first number is the horizontal inset, and the second is the vertical inset." } { $examples - { $code "H{ { border-width 10 } }\n[ \"Some inset text\" write ] with-nesting nl" } + { $code "H{ { inset { 10 10 } } }\n[ \"Some inset text\" write ] with-nesting nl" } } ; HELP: wrap-margin diff --git a/basis/io/styles/styles.factor b/basis/io/styles/styles.factor index 108d4c9eb0..a3a1d991f3 100644 --- a/basis/io/styles/styles.factor +++ b/basis/io/styles/styles.factor @@ -135,7 +135,7 @@ SYMBOL: image ! Paragraph styles SYMBOL: page-color SYMBOL: border-color -SYMBOL: border-width +SYMBOL: inset SYMBOL: wrap-margin ! Table styles diff --git a/basis/ui/gadgets/panes/panes.factor b/basis/ui/gadgets/panes/panes.factor index 6f68c32ff0..50a609b897 100644 --- a/basis/ui/gadgets/panes/panes.factor +++ b/basis/ui/gadgets/panes/panes.factor @@ -242,11 +242,11 @@ MEMO: specified-font ( assoc -- font ) : apply-page-color-style ( style gadget -- style gadget ) page-color [ >>interior ] apply-style ; -: apply-border-width-style ( style gadget -- style gadget ) - border-width [ dup 2array ] apply-style ; +: apply-inset-style ( style gadget -- style gadget ) + inset [ ] apply-style ; : style-pane ( style pane -- pane ) - apply-border-width-style + apply-inset-style apply-border-color-style apply-page-color-style apply-presentation-style