StyleJack¶
-
class
StyleJack
(context)¶ Arguments: - context (HTMLElement/String) – Either a HTMLElement or a string containing a style rule (ex. “div.class” or HTMLDivElement) StyleJack also supports @font-face rules and @keyframes. These return their own APIs instead of StyleJack API.
returns: StyleJackAPI()
orStyleJackFontFaceAPI()
orStyleJackCSSKeyFrameAPI()
- context (HTMLElement/String) –
StyleJack API¶
StyleJack API is simply a representation of the Object that you are returned after initializing a new StyleJack with a Node/StyleRule
You cannot instantiate this manually, as it’s the return value from StyleJack
StyleJack is a fairly fluid API. For most contexts, if you are setting a value, you will receive the relevant API back. This means that if you’re on the level 1 API (StyleJackAPI), you will receive the StyleJack API back to allow chaining. If you are on a level 2 API (StyleJackBackgroundAPI), you will receive that API back. The property .api will allow you to return to the level 1 API
Note
The String “$” Is a special value that you can pass into all of the StyleJackAPI methods to get the raw value back. Else, StyleJack will attempt to parse the value from px to a programatically usable value (eg: String(“16px”) => Number(16). If the value is in any other format (eg: em, pt, cm) it will be returned as a String.
This is convenient in the cases where the Style returns a Level 2 API (ex: Background), as you can simply call:
KUBE.Class('/Library/DOM/StyleJack')(document.body).Background('$');instead of:
KUBE.Class('/Library/DOM/StyleJack')(document.body).Background().Get();
-
class
StyleJackAPI
()¶
-
StyleJackAPI.
Delete
()¶ Deletes the current style rule from the stylesheet.
Returns: void
-
StyleJackAPI.
GetStyleObj
()¶ Returns the CSSStyleRule that this current StyleJack represents
Returns: CSSStyleRule()
-
StyleJackAPI.
Appearance
([_value])¶ Used for getting/setting the appearance property.
returns: StyleJackAPI()
Todo
Appearance property has some flaws. It’s prefixed everywhere, and the values are prefixed as well We might need to re-assess it and possibly remove it from StyleJack for the time being.
-
StyleJackAPI.
BackfaceVisibility
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
returns: StyleJackAPI()
- _value (String) –
-
StyleJackAPI.
Background
([_value])¶ Arguments: - _value (String) – If no value passed in, returns StyleJackBackgroundAPI. Any value other than “$” attempts to set the passed value to the property “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Border
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Bottom
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Box
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
CaptionSide
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Clear
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Clip
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Color
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Content
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Cursor
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Direction
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Display
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
EmptyCells
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Float
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Font
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Height
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Left
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
LetterSpacing
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
LineHeight
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Margin
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
MinHeight
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
MinWidth
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
MaxHeight
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
MaxWidth
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Opacity
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Outline
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Overflow
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Padding
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Position
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Resize
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Right
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
TableLayout
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Text
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Top
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Transform
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Transition
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
VerticalAlign
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Visibility
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
Width
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns: StyleJackAPI()
Or Number
-
StyleJackAPI.
WhiteSpace
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
WordSpacing
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
WordBreak
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
WordWrap
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackAPI.
ZIndex
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
StyleJack Background API¶
-
class
StyleJackBackgroundAPI
()¶
-
StyleJackBackgroundAPI.
Set
([_value])¶ Arguments: - _value (String) – Equivalent to calling Set on the level 1 API. Only difference is that ‘$’ is not a valid input value,
as set will always return
StyleJackBackground()
Returns: - _value (String) – Equivalent to calling Set on the level 1 API. Only difference is that ‘$’ is not a valid input value,
as set will always return
-
StyleJackBackgroundAPI.
Get
()¶ The object that’s returned has both numerical and string keys. The object returned looks like:
{ 0:color,1:position,2:size,3:repeat,4:origin,5:clip,6:attachment,7:image, 'color':color, 'position':position, 'size':size, 'repeat':repeat, 'origin':origin,'clip':clip, 'attachment':attachment, 'image':image };
Returns: Object
-
StyleJackBackgroundAPI.
Color
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBackgroundAPI.
Attachment
()¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBackgroundAPI.
Image
()¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBackgroundAPI.
Position
()¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBackgroundAPI.
Repeat
()¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBackgroundAPI.
Clip
()¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBackgroundAPI.
Origin
()¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBackgroundAPI.
Size
()¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBackgroundAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Border API¶
-
class
StyleJackBorderAPI
()¶
-
StyleJackBorderAPI.
Get
()¶ The object that’s returned has both numerical and string keys.
{ 0:width, 1:style, 2:color, 'width':width, 'style':style, 'color':color,'length':3 };
Returns: Object
-
StyleJackBorderAPI.
Set
([_value])¶ Arguments: - _value (String/Object/Array) –
Any value attempts to set the passed value to the property.
Note
_value can be in the form of an object, with the keys “width”,”style” and “color”. It can be also in an array, with index 0 being width, index 1 being style and index 2 being color
Returns: - _value (String/Object/Array) –
-
StyleJackBorderAPI.
Top
([_value])¶ Arguments: - _value (String/Object/Array) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property.
Note
_value can be in the form of an object, with the keys “width”,”style” and “color”. It can be also in an array, with index 0 being width, index 1 being style and index 2 being color
Returns: - _value (String/Object/Array) –
-
StyleJackBorderAPI.
Right
([_value])¶ Arguments: - _value (String/Object/Array) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property.
Note
_value can be in the form of an object, with the keys “width”,”style” and “color”. It can be also in an array, with index 0 being width, index 1 being style and index 2 being color
Returns: - _value (String/Object/Array) –
-
StyleJackBorderAPI.
Bottom
([_value])¶ Arguments: - _value (String/Object/Array) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property.
Note
_value can be in the form of an object, with the keys “width”,”style” and “color”. It can be also in an array, with index 0 being width, index 1 being style and index 2 being color
Returns: - _value (String/Object/Array) –
-
StyleJackBorderAPI.
Left
([_value])¶ Arguments: - _value (String/Object/Array) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property.
Note
_value can be in the form of an object, with the keys “width”,”style” and “color”. It can be also in an array, with index 0 being width, index 1 being style and index 2 being color
Returns: - _value (String/Object/Array) –
-
StyleJackBorderAPI.
Radius
()¶ Returns the Border Radius API for manipulating the Border Radius property
Returns: StyleJackBorderRadiusAPI()
StyleJack Border Radius API¶
-
class
StyleJackBorderRadiusAPI
()¶
-
StyleJackBorderRadiusAPI.
Set
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBorderRadiusAPI.
Get
()¶ The object that’s returned has both numerical and string keys.
{ 0:topLeft, 1:topRight, 2:bottomRight, 3:bottomLeft, 'topLeft':topLeft, 'topRight':topRight, 'bottomRight':bottomRight, 'bottomLeft':bottomLeft }
Returns: Object
-
StyleJackBorderRadiusAPI.
TopLeft
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBorderRadiusAPI.
TopRight
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBorderRadiusAPI.
BottomRight
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBorderRadiusAPI.
BottomLeft
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBorderRadiusAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Box API¶
-
class
StyleJackBoxAPI
()¶
-
StyleJackBoxAPI.
Align
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
Direction
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
Flex
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
FlexGroup
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
Lines
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
OrdinalGroup
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
Orient
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
Pack
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
Sizing
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
Shadow
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Box Shadow API¶
-
class
StyleJackBoxShadowAPI
()¶
-
StyleJackBoxShadowAPI.
Get
()¶ The object that’s returned has both numerical and string keys.
{ 'horizontal':horizontal, 'vertical':vertical, 'blur':blur, 'color':color,'inset': inset }
Returns: Object
-
StyleJackBoxShadowAPI.
Set
([_value])¶ Any value attempts to set the passed value to the property.
Note
_value can be in the form of an object, with the keys “width”,”style” and “color”. It can be also in an array, with index 0 being width, index 1 being style and index 2 being color
-
StyleJackBoxShadowAPI.
Horizontal
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxShadowAPI.
Vertical
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxShadowAPI.
H
([_value])¶ Arguments: - _value (String) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
An alias for Horizontal
Returns: - _value (String) –
-
StyleJackBoxShadowAPI.
V
([_value])¶ Arguments: - _value (String) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
An alias for Vertical
Returns: - _value (String) –
-
StyleJackBoxShadowAPI.
Blur
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxShadowAPI.
Spread
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxShadowAPI.
Color
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxShadowAPI.
Inset
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackBoxShadowAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Font API¶
-
class
StyleJackFontAPI
()¶
-
StyleJackFontAPI.
Get
([asArray])¶ If passed a truthy value, it will return an array with the order of Style, Variant, Weight, Size, Family. else, it’ll simply return the string that the font property represents.
Returns: Array/String
-
StyleJackFontAPI.
Set
([_value])¶ Any value attempts to set the passed value to the property.
Note
_value can be a string, which will attempt to set the font property directly.
It may also be a 5 element array in the order of Style, Variant, Weight, Size and Family, which will automatically set the various font properties.
Returns: StyleJackFontAPI()
-
StyleJackFontAPI.
Family
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackFontAPI.
Size
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackFontAPI.
Style
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackFontAPI.
Variant
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackFontAPI.
Weight
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackFontAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Margin API¶
-
class
StyleJackMarginAPI
()¶
-
StyleJackMarginAPI.
Get
()¶ Returns: Object
-
StyleJackMarginAPI.
Set
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Note
You can also pass in an array or object as a value. The format for an object simply has “top”,”right”,”bottom”,”left” keys which then sets the according value for that key. Keys may be omitted. If you use an array, it can be any length between 1 and 4.
This follows normal CSS behaviour. Where a 1 length array sets all sides to the same value. 2 length array sets top and bottom to same value and left and right to same value.
Returns: StyleJackMarginAPI()
-
StyleJackMarginAPI.
Top
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackMarginAPI.
Right
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackMarginAPI.
Bottom
([_value])¶ Arguments: - _value (String) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
returns: StyleJackMarginAPI()
- _value (String) –
-
StyleJackMarginAPI.
Left
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackMarginAPI.
Center
()¶ - Automatically sets margin left and right to “auto”.
Returns: StyleJackMarginAPI()
-
StyleJackMarginAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Outline API¶
-
class
StyleJackOutlineAPI
()¶
-
StyleJackOutlineAPI.
Width
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackOutlineAPI.
Style
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackOutlineAPI.
Color
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackOutlineAPI.
Offset
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackOutlineAPI.
api
¶ Returns: StyleJackAPI()
StyleJack OverFlow API¶
-
class
StyleJackOverflowAPI
()¶
-
StyleJackOverflowAPI.
Get
()¶ Returns a 2 index array containing the X and Y value of the overflow property
Returns: array
-
StyleJackOverflowAPI.
Set
(_value)¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackOverflowAPI.
X
(_value)¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackOverflowAPI.
Y
(_value)¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackOverflowAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Padding API¶
-
class
StyleJackPaddingAPI
()¶
-
StyleJackPaddingAPI.
Get
()¶ Returns: Object
-
StyleJackPaddingAPI.
Set
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Note
You can also pass in an array or object as a value. The format for an object simply has “top”,”right”,”bottom”,”left” keys which then sets the according value for that key. Keys may be omitted. If you use an array, it can be any length between 1 and 4.
This follows normal CSS behaviour. Where a 1 length array sets all sides to the same value. 2 length array sets top and bottom to same value and left and right to same value.
Returns: - _value (String) –
-
StyleJackPaddingAPI.
Top
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
returns: StyleJackPaddingAPI()
- _value (String) –
-
StyleJackPaddingAPI.
Right
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
returns: StyleJackPaddingAPI()
- _value (String) –
-
StyleJackPaddingAPI.
Bottom
([_value])¶ Arguments: - _value (String) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
returns: StyleJackPaddingAPI()
- _value (String) –
-
StyleJackPaddingAPI.
Left
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
returns: StyleJackPaddingAPI()
- _value (String) –
-
StyleJackPaddingAPI.
Center
()¶ - Automatically sets margin left and right to “auto”.
Returns: StyleJackPaddingAPI()
-
StyleJackPaddingAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Text API¶
-
class
StyleJackTextAPI
()¶
-
StyleJackTextAPI.
Align
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTextAPI.
Decoration
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTextAPI.
Indent
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTextAPI.
Overflow
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTextAPI.
Shadow
([_value])¶ Returns: StyleJackTextAPI()
-
StyleJackTextAPI.
Transform
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTextAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Text Shadow API¶
-
class
StyleJackTextShadowAPI
()¶
-
StyleJackTextShadowAPI.
Get
()¶ The object that’s returned contains the following string keys.
{ 'horizontal':horizontal, 'vertical':vertical, 'blur':blur, 'color':color }
Returns: Object
-
StyleJackTextShadowAPI.
Set
([_value])¶ Any value attempts to set the passed value to the property.
Note
_value can be in the form of an object, with the keys “width”,”style” and “color”. It can be also in an array, with index 0 being width, index 1 being style and index 2 being color
-
StyleJackTextShadowAPI.
Horizontal
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTextShadowAPI.
Vertical
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTextShadowAPI.
H
([_value])¶ Arguments: - _value (String) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
An alias for Horizontal
Returns: - _value (String) –
-
StyleJackTextShadowAPI.
V
([_value])¶ Arguments: - _value (String) –
If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
An alias for Vertical
Returns: - _value (String) –
-
StyleJackTextShadowAPI.
Blur
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTextShadowAPI.
Color
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTextShadowAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Transform API¶
Supports 2D transforms currently.
-
class
StyleJackTransformAPI
()¶
-
StyleJackTransformAPI.
Matrix
([_value])¶ Arguments: - _value (Array/String) – If no value or “$” passed in, returns the current value (as an array). To set, you must pass in a 6 index array containing the matrix you’re attempting to set.
Returns:
-
StyleJackTransformAPI.
Translate
([_value])¶ Arguments: - _value (Array/String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. If this value is not an Array, nothing will happen. The value should be a 2 index array, representing x and y “$” as a value returns the raw value of the property. The values array should be numbers, which will become pixels
Returns:
-
StyleJackTransformAPI.
TranslateX
([_value])¶ Arguments: - _value (String/Number) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property. The value passed in should be an number which will become a pixel offset
Returns:
-
StyleJackTransformAPI.
TranslateY
([_value])¶ Arguments: - _value (String/Number) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property. The value passed in should be an number which will become a pixel offset
Returns:
-
StyleJackTransformAPI.
Scale
([_value])¶ Arguments: - _value (Array/String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. If this value is not an Array, nothing will happen. The value should be a 2 index array, representing x and y “$” as a value returns the raw value of the property. The values array should be numbers, which will become a scale ratio
Returns:
-
StyleJackTransformAPI.
ScaleX
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property. The value passed in should be an number
Returns:
-
StyleJackTransformAPI.
ScaleY
([_value])¶ Arguments: - _value (String/Number) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property. The value passed in should be an number
Returns:
-
StyleJackTransformAPI.
Rotate
([_value])¶ Arguments: - _value (String/Number) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property. The value passed in should be an number, which will get converted to degrees
Returns:
-
StyleJackTransformAPI.
Skew
([_value])¶ Arguments: - _value (Array/String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. If this value is not an Array, nothing will happen. The value should be a 2 index array, representing x and y “$” as a value returns the raw value of the property. The values passed in should be numbers, which will get converted to degrees
Returns:
-
StyleJackTransformAPI.
SkewX
([_value])¶ Arguments: - _value (String/Number) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property. The value passed in should be an number, which will get converted to degrees
Returns:
-
StyleJackTransformAPI.
SkewY
([_value])¶ Arguments: - _value (String/Number) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property. The value passed in should be an number, which will get converted to degrees
Returns:
-
StyleJackTransformAPI.
api
¶ Returns: StyleJackAPI()
StyleJack Transition API¶
-
class
StyleJackTransitionAPI
()¶
-
StyleJackTransitionAPI.
Get
()¶ The object that’s returned has both numerical and string keys.
{ 0:property,1:duration,2:timing,3:delay, 'property':property, 'duration':duration, 'timing':timing, 'delay':delay }
Returns: Object
-
StyleJackTransitionAPI.
Set
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTransitionAPI.
Property
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTransitionAPI.
Duration
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTransitionAPI.
Timing
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTransitionAPI.
Delay
([_value])¶ Arguments: - _value (String) – If no value passed in, returns the current value. Any value other than “$”, attempts to set the passed value to the property. “$” as a value returns the raw value of the property
Returns:
-
StyleJackTransitionAPI.
api
()¶ Returns: StyleJackAPI()
StyleJack FontFace API¶
The FontFace API will always return the API. It’s not designed to be used as a getter, only for creating font-face rules entirely in JavaScript. The rule will get initialized into the Stylesheet once both Family and Src are set. You do not have to call any method to “commit” the rule into the Stylesheet.
-
StyleJackFontFaceAPI.
Family
(_family)¶ Arguments: - _family (String) – The name of the font family that you’re registering. This can be any string, and provides the name that you access your font-face with (in a font-family in CSS or Font().Family() in StyleJack)
returns: StyleJackFontFaceAPI()
- _family (String) –
-
StyleJackFontFaceAPI.
Src
(_src)¶ Arguments: - _src (String) – The src of your font. This can be pre-formatted as url(‘’) or the straight string. It doesn’t check for http, so data URIs work as well.
returns: StyleJackFontFaceAPI()
- _src (String) –
-
StyleJackFontFaceAPI.
Stretch
(_stretch)¶ Arguments: - _stretch (String) –
The stretch value that your font-face implements.
Permissible Values: “normal”,”condensed”,”ultra-condensed”,”extra-condensed”,”semi-condensed”,”expanded”,”ultra-expanded”,”extra-expanded”,”semi-expanded”
Throws console.log: Logs a message if you try to set an invalid value
returns: StyleJackFontFaceAPI()
- _stretch (String) –
-
StyleJackFontFaceAPI.
Style
(_style)¶ Arguments: - _style (String) –
The font style that this font-face implements.
Permissible Values: “normal”,”italic”,”oblique”
Throws console.log: Logs a message if you try to set an invalid value :returns:
StyleJackFontFaceAPI()
- _style (String) –
-
StyleJackFontFaceAPI.
UnicodeRange
(_unicodeRange)¶ Arguments: - _unicodeRange (String) – The unicode range that you want to use from the font file. This allows you to only import specific characters from a font into this custom font-family
throws console.log: Logs a message if you try to set an invalid value returns: StyleJackFontFaceAPI()
- _unicodeRange (String) –
-
StyleJackFontFaceAPI.
Weight
(_weight)¶ Arguments: - _weight (String/Number) –
The font-weight for this font-family. This allows you to actually define what the weight of this @font-face is
Permissible values: “normal”, “bold”, “lighter”, “bolder”, 100, 200, 300, 400, 500, 600, 700, 800, 900
Throws console.log: Logs a message if you try to set an invalid value
returns: StyleJackFontFaceAPI()
- _weight (String/Number) –
StyleJack CSSKeyFrame API¶
-
StyleJackCSSKeyFrameAPI.
Index
(_index)¶ This is for inserting a new Keyframe at the given index. This returns the Stylejack representing the given index. Indexes should be 0-100 as they’re percentages along the animations duration.
Arguments: - _index (Number) – The percentage (0-100) of the animation where you want to create a new keyframe
returns: StyleJackAPI()
- _index (Number) –
-
StyleJackCSSKeyFrameAPI.
Delete
()¶ Deletes the Keyframe rule entirely.
Returns: Boolean Represents success/failure of removing the given keyframe rule.
-
StyleJackCSSKeyFrameAPI.
Debug
()¶ Returns: CSSKeyFramesRule Returns the raw DOM CSSKeyFramesRule object for debugging
Todo
StyleJack Method Implementation. These methods require implementation still.
StyleJackCSSKeyFrameAPI.
Clear
(_index)¶
-
StyleJackCSSKeyFrameAPI.
Each
()¶ Event Methods as well do nothing (Events are never emitted)