Origami Frontend Components & Services

SassDoc: o-tooltip

oTooltip

Outputs all available features and styles for tooltips.

The output includes the .o-tooltip class definition.

Example

All tooltip styles

@include oTooltip();

Links

oOverlayContentClose

Overlay close button styles.

The output does not include a class definition, and should be wrapped in a selector.

Example

Output button styles

.my-close-button {
    @include oOverlayContentClose();
}

Links

oSpacingByName(size-name)

parameter type default description
size-name Get a recommended space size by name.

Returns

Number - A px value (or rem value if relative units have been enabled).

Links

oSpacingByIncrement(increment)

parameter type default description
increment The number to multiply the baseline size by.

Returns

Number - A px value (or rem value if relative units have been enabled).

Links

oSpacingGetBaselineValue

Returns

Number - A px value representing our spacing baseline (or rem value if relative units have been enabled).

Links

oTooltipAddTheme(name, opts)

Output styles for a custom o-tooltip theme.

parameter type default description
name The name of the custom theme. This is used to create a new CSS class name so should be descriptive and include the project name.
opts A map of theme options including "background-color" (color), "foreground-color" (color), and optionally "close-foreground-color" (color).

Example

a custom tooltip theme named "my-product-modifier" with a slate background, and white foreground. Outputs a class 'o-tooltip--my-product-modifier'

// Outputs CSS class "o-tooltip--my-product-modifier"
@include oTooltipAddTheme('my-product-modifier', (
	'background-color': oColorsByName('slate'),
	'foreground-color': oColorsByName('white'),
	'close-foreground-color': oColorsByName('white') // optional
));

Links

o-tooltip-is-silent

Silent mode: on (true) or off (false) Set to false to output default tooltip classes

Links

oTooltip

Outputs all available features and styles for tooltips.

The output includes the .o-tooltip class definition.

Example

All tooltip styles

@include oTooltip();

Links

Status
active
Switch component view

GitHub: o-tooltip@5.2.5

Install o-tooltip

If using the Build Service, add o-tooltip@^5.2.5 to your script and link tags.

If using the npm package manager for a Manual Build, run npm install --save-peer "@financial-times/o-tooltip@^5.2.5".

Help & Support

o-tooltip is maintained directly by the Origami team. If you have any questions about o-tooltip or Origami in general, we are happy to help. 😊

Slack: #origami-support
Email: origami.support@ft.com

Feedback / Issues

To report a bug or request features please create an issue on Github. For support or general feedback please get in touch 😊

Slack: #origami-support
Email: origami.support@ft.com