Documentation
Main | Download | Documentation | FAQ | Forums | Boxely Buzz
User Guide | OCP Services APIs | Actions | Animation | Event Types | Styles


Style Property Reference

Style Attributes

Bounds

top

Top of the bounding rectangle. Property Types:

Values: length, %, start, center, end

Note

This is only valid for boxes that are fixed position.

right

Right of the bounding rectangle. Property Types:

Values: length, %, start, center, end

Note

This is only valid for boxes that are fixed position.

bottom

Bottm of the bounding rectangle. Property Types:

Values: length, %, start, center, end

Note

This is only valid for boxes that are fixed position.

left

Left of the bounding rectangle. Property Types:

Values: length, %, start, center, end

Note

This is only valid for boxes that are fixed position.

width

The width of the box. Property Types:

Values: positive, %, auto
height

The height of the box. Property Types:

Values: positive, %, auto
minWidth

The min width a box will size to.

Values: positive, auto
minHeight

The min height a box will size to.

Values: positive, auto
maxWidth

The max width a box will size to.

Values: positive, auto
maxHeight

The max height a box will size to.

Values: positive, auto
margin

The margins on the outside of the box.

For example: margin="2 0 2 0" or margin="1 0" or margin="1". margin="1 0" would equal margin="1 0 1 0" margin="1" would equal margin="1 1 1 1".

Values: rect
marginTop

The margin top. This would be equivalent to margin="X 0 0 0"

Values: length, %, center

Note

For boxes that are fixed position, marginTop can be specified in pixel coordinates, percentage (of parent), or with the "center" keyword. For flowed boxes, percentage units are not supported and are interepreted as pixel dimensions.

marginRight

The margin right. This would be equivalent to margin="0 X 0 0"

Values: length, %, center

Note

For boxes that are fixed position, marginRight can be specified in pixel coordinates, percentage (of parent), or with the "center" keyword. For flowed boxes, percentage units are not supported and are interepreted as pixel dimensions.

marginBottom

The margin bottom. This would be equivalent to margin="0 0 X 0"

Values: length, %, center

Note

For boxes that are fixed position, marginBottom can be specified in pixel coordinates, percentage (of parent), or with the "center" keyword. For flowed boxes, percentage units are not supported and are interepreted as pixel dimensions.

marginLeft

The margin left. This would be equivalent to margin="0 0 0 X"

Values: length, %, center

Note

For boxes that are fixed position, marginLeft can be specified in pixel coordinates, percentage (of parent), or with the "center" keyword. For flowed boxes, percentage units are not supported and are interepreted as pixel dimensions.

padding

Adds space to the inside of the box (inside the border).

Values: rect
paddingTop

The padding top. This would be equivalent to padding="X 0 0 0"

Values: length
paddingRight

The padding right. This would be equivalent to padding="0 X 0 0"

Values: length
paddingBottom

The padding bottom. This would be equivalent to padding=" 0 0 X 0"

Values: length
paddingLeft

The padding left. This would be equivalent to padding="0 0 0 X"

Values: length
clip

The "clip" rectangle gets subtracted from the box's rectangle in determining the clip rect. See User Guide - Arranging Boxes for more details about clipping.

For example: clip="2 0 2 0" or clip="1 0" or clip="1". clip="1 0" would equal clip="1 0 1 0" clip="1" would equal clip="1 1 1 1".

Values: rect
clipTop

The clip top. This would be equivalent to clip="X 0 0 0"

Values: length, %, center

Note

For boxes that are fixed position, clipTop can be specified in pixel coordinates, percentage (of parent), or with the "center" keyword. For flowed boxes, percentage units are not supported and are interepreted as pixel dimensions.

clipRight

The clip right. This would be equivalent to clip="0 X 0 0"

Values: length, %, center

Note

For boxes that are fixed position, clipRight can be specified in pixel coordinates, percentage (of parent), or with the "center" keyword. For flowed boxes, percentage units are not supported and are interepreted as pixel dimensions.

clipBottom

The clip bottom. This would be equivalent to clip="0 0 X 0"

Values: length, %, center

Note

For boxes that are fixed position, clipBottom can be specified in pixel coordinates, percentage (of parent), or with the "center" keyword. For flowed boxes, percentage units are not supported and are interepreted as pixel dimensions.

clipLeft

The clip left. This would be equivalent to clip="0 0 0 X"

Values: length, %, center

Note

For boxes that are fixed position, clipLeft can be specified in pixel coordinates, percentage (of parent), or with the "center" keyword. For flowed boxes, percentage units are not supported and are interepreted as pixel dimensions.

Layout

position

Specifies whether the box uses fixed or flow positioning. The default is flow positioning. When using fixed positioning, the box is positioned at an offset from the origin of its parent and will find its own width and height. Flow positioning automatically arranges the boxes to fit within its parent box.

Values: fixed, flow
orient

Specifies the box's axis when flow positioning is used. This value is used to determine whether child boxes are arranged along the horizontal or vertical axis. The default is horizontal.

hAlign

Specifies the alignment of child boxes along the horizontal axis. This style allows child boxes to be aligned to the left (start), right (end), centered or stretched.

Values: start, center, end, stretch
vAlign

Specifies the alignment of child boxes along the vertical axis. This style allows child boxes to be aligned to the top (start), bottom (end), centered or stretched.

Values: start, center, end, stretch
hSpace

Specifies the amount of space between child boxes along the horizontal axis when flow layout is used.

Values: positive
vSpace

Specifies the amount of space between child boxes along the vertical axis when flow layout is used.

Values: positive
flex

Specifies how the a container box will distribute leftover space among child boxes. Setting the flex style on a child box will stretch it occupy all extra space available in the parent box. If more than one box has flex, the larger flex values will grab a proportionately larger amount of space.

Values: positive
layer

Specifies the layer in which the box is to be painted. This value is used to arrange boxes along the z-axis. Boxes whose layer style is set to "below" are pained first (underneith all other boxes), followed by "stacked" boxes (in order of their zIndex), followed finally by boxes whose layer is style is set to "above".

Values: above, below, stack
crop

Specify the crop value of the box.

Values: right, none
overflow

Specify how overflow is handled when a box's children outgrow their parent box. The default is "none".

Values: scroll, hidden, none
zIndex

Specifies the box's zIndex value. This value is used to determine the order in which boxes are drawn on the z-axis. Higher integer values are pained last (on top). This is only valid when using layers and fixed position.

Values: positive

Fill

fill

Specifies the fill of a box.

Values: color, url, none
fillRepeat

Specifies the fill repeat. Refer to the Boxely samples for examples.

Values: x, y, both
fillSize

Specifies how to stretch the bitmap used in the fill property.

Values: x, y, both
fillSlice

Specifies how to slice the bitmap used in the fill property.

Values: rect
fillRepeatOriginX

Specifies the origin of the fill on the x-axis. If fillRepeatOriginX and fillRepeatOriginY are left blank, they revert to the default value of 0.

Values: positive
fillRepeatOriginY

Specifies the origin of the fill on the y-axis. If fillRepeatOriginX and fillRepeatOriginY are left blank, they revert to the default value of 0.

Values: positive
fillCornerRadius

Controls how the fill's edge is drawn based on curve's radius

Values: positive
fillCornerRadiusTop

Controls how the fill's top left edge is drawn based on curve's radius

Values: positive
fillCornerRadiusRight

Controls how the fill's top right edge is drawn based on curve's radius

Values: positive
fillCornerRadiusBottom

Controls how the fill's bottom rightedge is drawn based on curve's radius

Values: positive
fillCornerRadiusLeft

Controls how the fill's bottom left edge is drawn based on curve's radius

Values: positive
icon

The icon resource used to fill the box.

Values: url
mask

Used to apply a mask to a box. Uses alpha of mask image; areas that are transparent protect the target image (masking it out) and areas that are opaque allow the original to show through. Example: s:mask="url(#myMask)"

Values: url

Stroke

stroke

Specifies the color of the stroke (border) which is drawn around a box.

Values: color, none
strokeWidth

Specifies the width of the stroke (border) which is drawn around a box.

Values: positive
strokeLayer

Specifies the layer in which the stroke around the box is drawn.

Values: above, below, stack
strokePattern

Specifies the pattern of the stroke (border) which is drawn around a box.

strokeCornerRadius

Specifies the radius of the corners of the stroke (border) which is drawn around a box. Larger integer values make the box's stroke appear more rounded.

Values: positive

Shadow

shadowColor

Specifies the color of the drop shadow which is drawn around the box.

Values: color
shadowRadius

Specifies the radius of the drop shadow which is drawn around a box. Larger integer values make the drop shadow appear deeper.

Values: positive
shadowOpacity

Specifies the opacity of the drop shadow which is drawn around a box. Larger integer values make the drop shadow appear more opaque.

Values: %
shadowLeft

Specifies the left origin of the drop shadow which is drawn around a box.

Values: positive
shadowTop

Specifies the top origin of the drop shadow which is drawn around a box.

Values: positive
shadowKeying

Supported values are "false" or "none", and "alpha". Alpha means to draw shadows using the box's alpha channel as a key, instead of just a rectangle corresponding to the box's bounds. Alpha keying is also slower, performance-wise.

Values: alpha, false, none

Bevel

bevelColor

Specifies the color of the bevel which is drawn around the box.

Values: color
bevelRadius

Specifies the radius of the bevel which is drawn around a box. Larger integer values make bevel more pronounced.

Values: positive
bevelCornerRadius

Specifies corner radius for bevels. Can be specified per-side like other rect styles.

Values: rect
bevelCornerRadiusTop

Specifies top corner radius for bevels.

Values: positive
bevelCornerRadiusRight

Specifies right corner radius for bevels.

Values: positive
bevelCornerRadiusBottom

Specifies bottom corner radius for bevels.

Values: positive
bevelCornerRadiusLeft

Specifies left corner radius for bevels. Can be specified per-side like other rect styles.

Values: positive
bevelLeft

Horizontal offset for bevels. Works the same as shadowLeft except for bevels.

Values: positive
bevelTop

Vertical offset for bevels. Works the same as shadowTop except for bevels

Values: positive
bevelOpacity

Specifies the opacity of the bevel which is drawn around a box. Larger integer values make the bevel appear more opaque.

Values: %

AffineTransform

rotation

Specifies the rotation of the box, in degrees. For example, specifying a value of 90 would display the box rotated a quarter turn clockwise.

Values: angle
scale

Specifies the amount that the box is scaled, relative to its pixel size. Values larger than 100 will increase the size of the box, and values less than 100 will decrease the box's size.

Values: positive
affineQuality

Using "high" attempts to filter the results when boxes are affine scaled or rotated, but is slower, performance-wise.

Values: high, low

Transform

offset

Transforms (moves) the box by the specified offset from its actual layout position.

Values: length

Text

fontFamily

The font name to be used.

Values: string
fontSize

The font size to be used.

Values: positive
fontBold

Specifies if the font will be bolded.

Values: true, false
fontItalic

Specifies if the font will be italicized.

Values: true, false
fontUnderline

Specifies if the font will be underlined.

Values: true, false
textColor

The font color.

Values: color
textOrientation

Orientation of the text

Values: up, down, left, right
textHighlight

Sets the color that is used by the textHightlightString attribute.

Values: color
textShadowColor

The color of the text shadow

Values: color
textShadowOffsetY

Sets the offset of the text shadow from the y axis.

Values: positive
textShadowOffsetX

Sets the offset of the text shadow from the x axis.

Values: positive
textHighlightString

String value that will use the color defined in textHightlight to highlight a string in a textbox.

Values: string

Effects

opacity

Controls the opacity applied to the entire box when blending it with the contents behind it.

Values: %
colorAdd

Add the given color value to the current box color style.

Values: color
colorSubtract

Subtracts the given color value to the current box color style.

Values: color
colorSaturation

Adjusts the overall saturation of the color.

Values: %
colorScaleR

Adjusts the red channel for the current box.

Values: %
colorScaleG

Adjusts the green channel for the current box.

Values: %
colorScaleB

Adjusts the blue channel for the current box.

Values: %
colorScaleA

Adjusts the alpha channel for the current box.

Values: %
blur

Specifies how much blur you wish to apply to the box.

Values: positive

Animation

animate

Used to call the animations that you would like to run on enter of the state.

Values: url
animateExit

Used to call the animations that you would like to run on exit of the state

Values: url

Miscellaneous

flip

will visually flip a box vertically. Hit testing will not be effected, only the visual content of the box is flipped.

Values: x, y
cursor

Specifies the cursor you would like to use.

Definitions and Constants

Terminology used in this reference:

Definitions

string

Any string value. Refer to each individual style property for details.

length

Any integer value, including positive (+) and negative (-) values.

positive

Any positive integer value.

angle

Any value between 0 and 360.

% (percentage)

A percentage value, typically from 0 to 100.

rect (rectangle)

A format to describe values applied to each side of a rectangle. Commonly used in CSS to specify "top right bottom left".

color

A 6 character hex value (#RRGGBB), an 8 character hex value containing alpha information (#AARRGGBB), or one of the 16 W3C defined color names.

url

An URL referring to a file, style definitions, animation definitions, etc. The format is as follows: "url(#URL)". For example: url(#buttonGradient)

Constants

auto

Let Boxely automatically choose the appropriate value for the given property.

none

Disable the specified property.

true

A boolean value of true. Enables the associate style property.

false

A boolean value of false. Disables the associate style property.

start

Equivalent to the starting position of text according to the locale. For example, in a left-to-right locale this keyword will be equivalent to left.

center

The middle position.

end

Equivalent to the ending position of text according to the locale. For example, in a left-to-right locale this keyword will be equivalent to right.

fixed

Use the fixed layout scheme. This is similar to the way absolute layouts work in HTML.

flow

Use the flowed layout scheme. This is similar to the way layout normally works in HTML.

vertical

Use the vertical axis to orient boxes.

horizontal

Use the horizontal axis to orient boxes.

stretch

Strecth the box to align to both ends.

above

Place box above others in the z-axis. Boxes with this attribute are drawn last (on top of all the other boxes).

below

Place box below others in the z-axis. Boxes with this attribute are drawn first (under all the other boxes).

stack

Place box between boxes that are above and below.

up

Indicates the top-side position.

down

Indicates the bottom-side position.

left

Indicates the left-side position.

right

Indicates the right-side position.

scroll

Scrolls the content within a box if it overflows.

hidden

Hides the content within a box if it overflows.

x

Performs the operation across the x-axis.

y

Performs the operation across the y-axis.

both

Performs the operation across both, the x-axis and y-axis.

alpha

Draw shadows using the alpha channel of the box as a key. This may result in a slight performance hit.

solid

Draws a solid stroke around the box.

dotted

Draws a dotted stroke around the box.

mediumDotted

Draws a medium, dotted stroke around the box.

largeDotted

Draws a large, dotted stroke around the box.

dotDash

Draws a dot-dashed stroke around the box.

high

Indicates the use of a higher quality transform, at some expense of performance.

low

Indicates the use of a faster transform, at some expense of quality.

move

Display a cursor with four arrows pointing "up down left right" to indicate that something is movable.

text

Display an I-beam cursor to indicate that a text operation is possible.

pointer

Display a finger cursor to indicate that something is clickable.

arrow

Display a standard arrow cursor.

hourglass

Display an hourglass cursor to indicate that a time consuming operation is occurring.

splitter

Display a splitter cursor to indicate that a split-pane can be resized.

splitterh

Display a horizontal splitter cursor.

splitterv

Display a vertical splitter cursor.

se-resize

Displays an angled resize cursor to indicate that the box can be resized from the bottom right or top left.

sw-resize

Displays an angled resize cursor to indicate that the box can be resized from the bottom left or top right.

w-resize

Displays a horizontal resize cursor to indicate that the box can be resized from the left or right.

s-resize

Displays a vertical resize cursor to indicate that the box can be resized from the bottom or top.

Copyright © 2007 AOL, LLC. All rights reserved.