Styling
Along with the integration code snippet, hosting page can add a style attribute with CSS declaration to target Firework’s widget or global root.
General
CSS variables that apply generically for all widgets. These are recommended to be declared in global scope.
Variable | Description |
---|---|
| The general font colour for the whole widget |
| The font family for the widget to use. |
| Font color for primary buttons |
| Background color for primary buttons |
| Border type of primary buttons |
| CTA button animation |
| CTA button background color |
| Border type of CTA button |
| Border radius of CTA button |
| Color of CTA button text |
| Font size of CTA button |
| Font weight of CTA button |
| CTA button height |
| CTA button text padding |
Embed Feed Styling
CSS variables for embed feed can be declared in global scope or on specific <fw-embed-feed>
component. You can declare in :root
, head
,body
or on specific <fw-embed-feed>
component.
Variable | Description |
| Border radius for feed thumbnails. Defaults to |
| Aspect ratio of a thumbnail. Defaults to |
| Custom thumbnail width. Defaults to |
| Custom thumbnail height. Defaults to |
| Gap between thumbnails. Defaults to |
| Customize font for video title to better match you site design. |
| Custom "Sponsored" badge background |
| Custom "Sponsored" badge font color |
| Thumbnail caption font size |
| Thumbnail caption font weight |
Storyblock Styling
CSS variables for Storyblock can be declared in global scope or on specific <fw-storyblock>
component. You can declare in :root
, head
,body
or on specific <fw-storyblock>
component.
Variable | Description |
| CSS string to specify storyblock background in case its visible. Defaults to |
| CSS string to specify storyblock border radius. Defaults to |
Hero Unit Styling
Variable | Description |
| The letter spacing for hero unit countdown |
| The Text Transform for hero unit countdown (eg. upper-case) |
| The font size for hero unit countdown |
| The font-weight for hero unit countdown |
| The flex container size for hero unit countdown |
| The letter spacing for hero unit content, anything below title |
--fw-hero-unit-content-text-transform | The Text Transform for hero unit content (eg. upper-case) |
| The font-weight for hero unit content |
| The font size for hero unit CTAs |
| The letter spacing for hero unit CTAs |
| The Text Transform for hero unit CTAs (eg. upper-case) |
| The font-weight for hero unit CTAs |
| The Text Transform for hero unit Start Time (eg. upper-case) |
| The font size for hero unit Start Time |
| The font-weight for hero unit Start Time |
| The line height for hero unit Start Time |
| The letter spacing for hero unit Start Time |
| The letter spacing for hero unit title |
| The Text Transform for hero unit title (eg. upper-case) |
| The font size for hero unit title |
| The font-weight for hero unit title |
| The flex container size for hero unit title |
| The font family of the hero unit title |
| The line height for hero unit countdown |
Video Player
CSS variables for video player needs to be declared in global scope. :root
, head
or body
is ok. Values applied to all Video Player instances and Storyblocks.
Variable | Description |
| Video Player background color (backdrop, tiles, ...). Defaults to semi-transparent black. |
| Background color of chat section in fullscreen player. |
| Background color of commerce section in fullscreen player. |
| Video Player border radiuses. Defaults to |
| Video Player inset CSS string used when minimized. Defaults to |
| Video Player height as a CSS string. Defaults to |
| Video Player width as a CSS string. Defaults to |
| Video Player margin from the edge of screen. Defaults to |
| More granular font settings for header, chat and product. |
Applying CSS variables
There are multiple ways how to scope CSS variables in general.
Option 1: Target :root
, html
or body
element to achieve broader scope:
Option 2: Target specific element via CSS declaration or inline style
for narrow scope:
Styling fullscreen video element on a more broader scope (:root) might be necessary since many components do not render video within them, rather use <body> as a placement.
Examples
Remove border radius and change player backgorund to white:
Custom font family
Widget Styling Attributes
List of widget attributes which can be used to alter style or UI of Firework components.
Name | Description | Default |
| Link to custom CSS file. | |
| CSS color value of color accents. | |
| CSS color value of CTA button. | |
| CSS color value of CTA button text. | |
| Border radius style.
|
|
| Coma separated values of share sheet options. |
|
Examples
Last updated