Macro kas::margins

margins!() { /* proc-macro */ }
Expand description

Make a margin-adjustment widget wrapper

This is a small wrapper which adjusts the margins of its contents.

Example

let a = kas::margins!(1.0 em, "abc");
let b = kas::margins!(vert = none, "abc");

Syntax

The macro takes one of two forms:

Margins:
   margins! ( MarginSpec , Layout )
   margins! ( MarginDirection = MarginSpec , Layout )

MarginDirection :
   horiz | horizontal | vert | vertical | left | right | top | bottom

MarginSpec :
   ( LitFloat px ) | ( LitFloat em ) | none | inner | tiny | small | large | text

MarginSpecDescription (guide size; theme-specified sizes may vary and may not scale linearly)
noneNo margin (0px)
innerA very tiny theme-specified margin sometimes used to draw selection outlines (1px)
tinyA very small theme-specified margin (2px)
smallA small theme-specified margin (4px)
largeA large theme-specified margin (7px)
textText-specific margins; often asymmetric
LitFloat em (e.g. 1.2 em)Using the typographic unit Em (1Em is the text height, excluding ascender and descender)
LitFloat px (e.g. 5.0 px)Using virtual pixels (affected by the scale factor)