io.styles: renamed the 'border-width' style to 'inset'. inset takes a pair of 2 numbers (horizontal and vertical insets)

db4
Keith Lazuka 2009-09-09 15:50:25 -04:00
parent 5421f4fcb4
commit a96e828d7c
6 changed files with 16 additions and 15 deletions

View File

@ -35,7 +35,7 @@ H{
{ wrap-margin 500 } { wrap-margin 500 }
{ foreground COLOR: gray20 } { foreground COLOR: gray20 }
{ page-color COLOR: FactorLightTan } { page-color COLOR: FactorLightTan }
{ border-width 5 } { inset { 5 5 } }
} title-style set-global } title-style set-global
SYMBOL: help-path-style SYMBOL: help-path-style
@ -72,7 +72,7 @@ H{
SYMBOL: code-style SYMBOL: code-style
H{ H{
{ page-color COLOR: FactorLightTan } { page-color COLOR: FactorLightTan }
{ border-width 5 } { inset { 5 5 } }
{ wrap-margin f } { wrap-margin f }
} code-style set-global } code-style set-global
@ -89,7 +89,7 @@ SYMBOL: warning-style
H{ H{
{ page-color COLOR: gray90 } { page-color COLOR: gray90 }
{ border-color COLOR: red } { border-color COLOR: red }
{ border-width 5 } { inset { 5 5 } }
{ wrap-margin 500 } { wrap-margin 500 }
} warning-style set-global } warning-style set-global
@ -97,7 +97,7 @@ SYMBOL: deprecated-style
H{ H{
{ page-color COLOR: gray90 } { page-color COLOR: gray90 }
{ border-color COLOR: red } { border-color COLOR: red }
{ border-width 5 } { inset { 5 5 } }
{ wrap-margin 500 } { wrap-margin 500 }
} deprecated-style set-global } deprecated-style set-global

View File

@ -30,7 +30,7 @@ SYMBOL: tip-of-the-day-style
H{ H{
{ page-color COLOR: lavender } { page-color COLOR: lavender }
{ border-width 5 } { inset { 5 5 } }
{ wrap-margin 500 } { wrap-margin 500 }
} tip-of-the-day-style set-global } tip-of-the-day-style set-global

View File

@ -99,7 +99,8 @@ M: html-span-stream dispose
: border-css, ( border -- ) : border-css, ( border -- )
"border: 1px solid #" % hex-color, "; " % ; "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;" 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, } { page-color bg-css, }
{ border-color border-css, } { border-color border-css, }
{ border-width padding-css, } { inset padding-css, }
} make-css } make-css
] [ ] [
wrap-margin swap at wrap-margin swap at

View File

@ -140,7 +140,7 @@ ARTICLE: "paragraph-styles" "Paragraph styles"
"Paragraph styles for " { $link with-nesting } ":" "Paragraph styles for " { $link with-nesting } ":"
{ $subsection page-color } { $subsection page-color }
{ $subsection border-color } { $subsection border-color }
{ $subsection border-width } { $subsection inset }
{ $subsection wrap-margin } { $subsection wrap-margin }
{ $subsection presented } ; { $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" } { $code "H{ { border-color T{ rgba f 1 0 0 1 } } }\n[ \"A border\" write ] with-nesting nl" }
} ; } ;
HELP: border-width HELP: inset
{ $description "Paragraph style. Pixels between edge of text and border, an integer." } { $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 { $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 HELP: wrap-margin

View File

@ -135,7 +135,7 @@ SYMBOL: image
! Paragraph styles ! Paragraph styles
SYMBOL: page-color SYMBOL: page-color
SYMBOL: border-color SYMBOL: border-color
SYMBOL: border-width SYMBOL: inset
SYMBOL: wrap-margin SYMBOL: wrap-margin
! Table styles ! Table styles

View File

@ -242,11 +242,11 @@ MEMO: specified-font ( assoc -- font )
: apply-page-color-style ( style gadget -- style gadget ) : apply-page-color-style ( style gadget -- style gadget )
page-color [ <solid> >>interior ] apply-style ; page-color [ <solid> >>interior ] apply-style ;
: apply-border-width-style ( style gadget -- style gadget ) : apply-inset-style ( style gadget -- style gadget )
border-width [ dup 2array <border> ] apply-style ; inset [ <border> ] apply-style ;
: style-pane ( style pane -- pane ) : style-pane ( style pane -- pane )
apply-border-width-style apply-inset-style
apply-border-color-style apply-border-color-style
apply-page-color-style apply-page-color-style
apply-presentation-style apply-presentation-style