SUI.Padding

SUI.Padding is a simple class to group border width data.

Extends SUI.Border
Defined in: Padding.js


Constructor summary

Attr. Name / Description
public

SUI.Padding(t, r, b, l)

Create a SUI.Padding object. The arguments are optional and are given in CSS style: one argument sets all, two arguments set the top/bottom right/left, three arguments the top right/left and bottom and four set the individual padding widths.

Method summary

Attr. Type Name / Description
public

growH(h)

Make the border top and border widths smaller or larger.

public

growW(w)

Make the border left and right widths smaller or larger.

public

set(el)

Apply the padding defintion to the CSS style of an element.

 


Constructor

public SUI.Padding( int t, int r, int b, int l)

Create a SUI.Padding object. The arguments are optional and are given in CSS style: one argument sets all, two arguments set the top/bottom right/left, three arguments the top right/left and bottom and four set the individual padding widths.

Parameters:

Name Type Description
int t Padding top (or right, bottom, left) width
int r Padding right (or left) width
int b Padding bottom width
int l Padding left width

Methods

public growH( int h)

Make the border top and border widths smaller or larger.

Parameters:

Name Type Description
int h The amount that will be added to the border widths. Note that the amount is distributed over the borders. An amount of 3 will cause one border width to increase by 1 and the other by 2.
public growW( int w)

Make the border left and right widths smaller or larger.

Parameters:

Name Type Description
int w The amount that will be added to the border widths. Note that the amount is distributed over the borders. An amount of 3 will cause one border width to increase by 1 and the other by 2.
public set( HTMLElementNode el)

Apply the padding defintion to the CSS style of an element.

Parameters:

Name Type Description
HTMLElementNode el HTML element node of which to set the padding style.