Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Layout
A layout is the top level object. It contains 3 properties:
Embellishment Config
An embellishment config has two top level properties:
backgroundRepeat BackgroundRepeat No Sets the repeating behavior Top and bottom: "repeat-
of the background image. x", Left and right: "repeat-
Specify as a string value "no y"
-repeat", "repeat", "re
peat-x", "repeat-y", or
"repeat".
zIndex number No Used to specify the stacking "auto": This is the default
order as an integer. Larger CSS value. Note "auto"is
numbers are higher on the not a valid value to specify
stacking order. Values
should be specified as >= 1,
otherwise the element will
be invisible.
offsetX CSSLengthUnit (px) No Sets a horizontal offset "auto": This has the effect of
using margin-left or mar centering elements. Note "a
gin-rightdepending on uto"is not a valid value to
where the element is specify
naturally anchored.
offsetY CSSLengthUnit (px) No Sets a vertical offset using m "auto": This has the effect of
argin-top or margin- centering elements. Note "a
bottom depending on uto"is not a valid value to
where the element is specify
naturally anchored.
In addition to the existing Edge properties, top and bottom edges specify a few custom properties with unique requirements.
width CSSLengthUnit (px) No Specifies a pixel width. Spans the entire width of the
block
In addition to the existing Edge properties, left and right edges specify a few custom properties with unique requirements.
height CSSLengthUnit (px) No Specifies a pixel height. Spans the entire height of
the block
Example:
{
"component": {
"url": "http://assets.digital.vistaprint.com/2671176/icons/icon1.svg"
},
"width": 50,
"offsetX": -25
}
Corner
backgroundRepeat BackgroundRepeat No Sets the repeating behavior Top and bottom: "repeat-
of the background image. x", Left and right: "repeat-
Specify as a string value "no y"
-repeat", "repeat", "re
peat-x", "repeat-y", or
"repeat".
offsetX CSSLengthUnit (px) No Sets a horizontal offset "auto": This has the effect of
using margin-left or mar centering elements. Note "a
gin-rightdepending on uto"is not a valid value to
where the element is specify
naturally anchored.
offsetY CSSLengthUnit (px) No Sets a vertical offset using m "auto": This has the effect of
argin-top or margin- centering elements. Note "a
bottom depending on uto"is not a valid value to
where the element is specify
naturally anchored.
height CSSLengthUnit (px) No Specifies a pixel height. Spans the entire height of
the block
Component
Components are a common element found within edges and corners. They are used to specify background images.
Transform
Allows modifiction of limited CSS transform values.
Embellishment Container
Key Type Required Description Default value
CSSLengthUnit
These are values that can be specified as a unitless number (e.g. 22) or a string with a unit (e.g. "22%", "22em", etc.). Each CSSLengthUnit
property will have its own default behavior whenever values are specified as a number. Some will translate 22 to 22px while others will translate
22 to 22%. The default/numeric behavior is specified in parenthesis.
For mobile devices, this corner will have a background image set to icon1.svg, a width of 50, and X and Y offsets of 20. However, once the
screen reaches a tablet screen size, the existing base (mobile) styles are applied, but the width is overridden to be 75, the X offset to 25, and we
add an opacity value of 0.5 (overriding the inherited default of 1). Finally, once the screen reaches desktop size, all the aforementioned styles
(base + tablet) are applied and the additional Y offset of 40 overrides the original base Y offset of 20.