io.styles: renamed the 'border-width' style to 'inset'. inset takes a pair of 2 numbers (horizontal and vertical insets)
parent
5421f4fcb4
commit
a96e828d7c
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -135,7 +135,7 @@ SYMBOL: image
|
|||
! Paragraph styles
|
||||
SYMBOL: page-color
|
||||
SYMBOL: border-color
|
||||
SYMBOL: border-width
|
||||
SYMBOL: inset
|
||||
SYMBOL: wrap-margin
|
||||
|
||||
! Table styles
|
||||
|
|
|
@ -242,11 +242,11 @@ MEMO: specified-font ( assoc -- font )
|
|||
: apply-page-color-style ( style gadget -- style gadget )
|
||||
page-color [ <solid> >>interior ] apply-style ;
|
||||
|
||||
: apply-border-width-style ( style gadget -- style gadget )
|
||||
border-width [ dup 2array <border> ] apply-style ;
|
||||
: apply-inset-style ( style gadget -- style gadget )
|
||||
inset [ <border> ] 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
|
||||
|
|
Loading…
Reference in New Issue