Skip to content

ResponsiveBaseTheme

Type class

What the responsive themes share: the breakpoints, the functions that test them, and the rules that apply while the chart's size meets a condition.

More info: Responsive theme

Sources

This information about ResponsiveBaseTheme is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

ResponsiveBaseTheme extends Theme.

ResponsiveBaseTheme is extended by ResponsiveMaxTheme, ResponsiveTheme.

Properties

heightL

StaticType (width: number, height: number) => boolean

true when the height is at most L (600 pixels).

heightM

StaticType (width: number, height: number) => boolean

true when the height is at most M (400 pixels).

heightS

StaticType (width: number, height: number) => boolean

true when the height is at most S (300 pixels).

heightXL

StaticType (width: number, height: number) => boolean

true when the height is at most XL (800 pixels).

heightXS

StaticType (width: number, height: number) => boolean

true when the height is at most XS (200 pixels).

heightXXL

StaticType (width: number, height: number) => boolean

true when the height is at most XXL (1000 pixels).

heightXXS

StaticType (width: number, height: number) => boolean

true when the height is at most XXS (100 pixels).

isL

StaticType (width: number, height: number) => boolean

true when both the width and the height are at most L (600 pixels).

isM

StaticType (width: number, height: number) => boolean

true when both the width and the height are at most M (400 pixels).

isS

StaticType (width: number, height: number) => boolean

true when both the width and the height are at most S (300 pixels).

isXL

StaticType (width: number, height: number) => boolean

true when both the width and the height are at most XL (800 pixels).

isXS

StaticType (width: number, height: number) => boolean

true when both the width and the height are at most XS (200 pixels).

isXXL

StaticType (width: number, height: number) => boolean

true when both the width and the height are at most XXL (1000 pixels).

isXXS

StaticType (width: number, height: number) => boolean

true when both the width and the height are at most XXS (100 pixels).

L

StaticType number

Breakpoint of 600 pixels.

M

StaticType number

Breakpoint of 400 pixels.

maybeL

StaticType (width: number, height: number) => boolean

true when the width or the height is at most L (600 pixels).

maybeM

StaticType (width: number, height: number) => boolean

true when the width or the height is at most M (400 pixels).

maybeS

StaticType (width: number, height: number) => boolean

true when the width or the height is at most S (300 pixels).

maybeXL

StaticType (width: number, height: number) => boolean

true when the width or the height is at most XL (800 pixels).

maybeXS

StaticType (width: number, height: number) => boolean

true when the width or the height is at most XS (200 pixels).

maybeXXL

StaticType (width: number, height: number) => boolean

true when the width or the height is at most XXL (1000 pixels).

maybeXXS

StaticType (width: number, height: number) => boolean

true when the width or the height is at most XXS (100 pixels).

responsiveRules

Type IResponsiveRule[]Default []

Rules added to the theme.

S

StaticType number

Breakpoint of 300 pixels.

widthL

StaticType (width: number, height: number) => boolean

true when the width is at most L (600 pixels).

widthM

StaticType (width: number, height: number) => boolean

true when the width is at most M (400 pixels).

widthS

StaticType (width: number, height: number) => boolean

true when the width is at most S (300 pixels).

widthXL

StaticType (width: number, height: number) => boolean

true when the width is at most XL (800 pixels).

widthXS

StaticType (width: number, height: number) => boolean

true when the width is at most XS (200 pixels).

widthXXL

StaticType (width: number, height: number) => boolean

true when the width is at most XXL (1000 pixels).

widthXXS

StaticType (width: number, height: number) => boolean

true when the width is at most XXS (100 pixels).

XL

StaticType number

Breakpoint of 800 pixels.

XS

StaticType number

Breakpoint of 200 pixels.

XXL

StaticType number

Breakpoint of 1000 pixels.

XXS

StaticType number

Breakpoint of 100 pixels.

Methods

addRule(rule: IResponsiveRule)

Returns IResponsiveRule

Adds a responsive rule and returns it. It applies at once if it is relevant.

More info: Responsive theme

constructor(root: Root,
isReal: boolean
)

Returns ResponsiveBaseTheme

dispose()

Returns void

newEmpty(root: Root)

StaticReturns InstanceType

Creates the theme without its built-in rules, for rules of your own.

removeRule(rule: IResponsiveRule)

Returns void

Removes a responsive rule from the theme.

3 inherited items
new(root: Root)

StaticReturns InstanceTypeInherited from Theme

Use this method to create an instance of this class.

More info: Getting started: new element syntax

rule(themeClass: K,
themeTags: Array
)

Returns TemplateInherited from Theme

Returns the rule for a class and theme tags, as a Template. Settings set on it go to every element of that class (or a class extending it) that has all of these tags. The same class and tags return the same rule.

More info: Themes

ruleRaw(themeClass: string,
themeTags: Array
)

Returns TemplateInherited from Theme

Same as rule(), but takes any class name, without type checks.

More info: Themes

Events

ResponsiveBaseTheme does not have any events.