Skip to content

Latest commit

 

History

History
232 lines (156 loc) · 10.7 KB

styleguide.md

File metadata and controls

232 lines (156 loc) · 10.7 KB

Styleguide

Kind: global interface

styleguide.type : String

Type of the styleguide, base, web, android, ios or osx.

Kind: instance property of Styleguide

styleguide.name : String

Name of the styleguide.

Kind: instance property of Styleguide

styleguide.parent : Styleguide?

Parent styleguide of the styleguide.

Kind: instance property of Styleguide

styleguide.textStyles : Array<TextStyle>

Text styles in the styleguide.

Kind: instance property of Styleguide

styleguide.colors : Array<Color>

Colors in the styleguide.

Kind: instance property of Styleguide

styleguide.spacingSections : Array<SpacingSection>

Spacing sections in the styleguide.

Kind: instance property of Styleguide

project.components : Array<Component>

components in the project.

Kind: instance property of Project

styleguide.density : String

Pixel density of the styleguide.

Kind: instance property of Styleguide

styleguide.densityDivisor : Number

Divisor corresponding to the density, used to obtain actual values from unit values.

Kind: instance property of Styleguide

styleguide.lengthUnit : String

Length unit of the styleguide, based on the type, e.g. px for Web, pt for iOS.

Kind: instance property of Styleguide

styleguide.textLengthUnit : String

Text length unit of the styleguide, based on the type, e.g. dp for Android.

Kind: instance property of Styleguide

Styleguide.remPreferences : RemPreferences?

rem preferences of the styleguide (web styleguides only). This property exists only if rem is enabled for the styleguide.

Kind: instance property of Styleguide

styleguide.findTextStyleByName(name, useParentStyleguides = true) ⇒ TextStyle?

Finds text style in the styleguide or in the parent styleguides (if useParentStyleguides is true) by name.

Kind: instance method of Styleguide

Param Type Description
name String
useParentStyleguides Boolean Whether parent styleguides should be included in the search. Defaults to true.

styleguide.findTextStyleEqual(textStyle, useParentStyleguides = true) ⇒ TextStyle?

Finds text style in the styleguide or in the parent styleguides (if useParentStyleguides is true) equal to another text style.

Kind: instance method of Styleguide

Param Type Description
textStyle TextStyle
useParentStyleguides Boolean Whether parent styleguides should be included in the search. Defaults to true.

styleguide.findBestConformingTextStyle(textStyle, useParentStyleguides = true) ⇒ TextStyle?

Finds best conforming text style in the styleguide or in the parent styleguides (if useParentStyleguides is true).

Kind: instance method of Styleguide

Param Type Description
textStyle TextStyle
useParentStyleguides Boolean Whether parent styleguides should be included in the search. Defaults to true.

styleguide.findColorByName(name, useParentStyleguides = true) ⇒ Color?

Finds color in the styleguide or in the parent styleguides (if useParentStyleguides is true) by name.

Kind: instance method of Styleguide

Param Type Description
name String
useParentStyleguides Boolean Whether parent styleguides should be included in the search. Defaults to true.

styleguide.findColorEqual(color, useParentStyleguides = true) ⇒ Color?

Finds color in the styleguide or in the parent styleguides (if useParentStyleguides is true) equal to another color.

Kind: instance method of Styleguide

Param Type Description
color Color
useParentStyleguides Boolean Whether parent styleguides should be included in the search. Defaults to true.

styleguide.findColorByHexAndAlpha(values, useParentStyleguides = true) ⇒ Color?

Finds color in the styleguide or in the parent styleguides (if useParentStyleguides is true) by hex and alpha values.

Kind: instance method of Styleguide

Param Type Description
values Object
values.hex String Hex string for RGB components of the color, e.g. rrggbb.
values.alpha String Alpha value of the color.
useParentStyleguides Boolean Whether parent styleguides should be included in the search. Defaults to true.

styleguide.findSpacingTokenByValue(value, useParentStyleguides = true) ⇒ SpacingToken?

Finds spacing token in the styleguide or in the parent styleguides (if useParentStyleguides is true) by value.

Kind: instance method of Styleguide

Param Type Description
value Number
useParentStyleguides Boolean Whether parent styleguides should be included in the search. Defaults to true.

styleguide.findSpacingTokenByName(name, useParentStyleguides = true) ⇒ SpacingToken?

Finds spacing token in the styleguide or in the parent styleguides (if useParentStyleguides is true) by name.

Kind: instance method of Styleguide

Param Type Description
name String
useParentStyleguides Boolean Whether parent styleguides should be included in the search. Defaults to true.

styleguide.findComponentByName(name, useLinkedStyleguides = true) ⇒ Component?

Finds a component in the styleguide or in the linked styleguides (if useLinkedStyleguides is true) by name.

Kind: instance method of Styleguide

Param Type Description
name String
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

styleguide.findComponentBySourceId(name, useLinkedStyleguides = true) ⇒ Component?

Finds a component in the styleguide or in the linked styleguides (if useLinkedStyleguides is true) by id in the source design document.

Kind: instance method of Styleguide

Param Type Description
name String
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.