CSS helpers
Clearfix
Clearfix is used to clear elements that are taken out of flow, such as when float has been used in legacy layout methods.
Clearfix must be applied to a parent container when all child elements are floated, or have fixed or absolute positioning. This stops the parent container collapsing.
Avoid using float
Clearfix implementation
Focus
Focus mixins allow you to customise the styling of focus states. These can be used alongside FocusService.
When using these mixins to customise focus on a Tangram component or custom element, consider how accessibility and usability may be impacted.
Learn more about how focus states help with accessibility.
Focus implementation
Focus hover implementation
Focus none implementation
Row container padding
Used to add padding to the container of a row without adding the full grid container styles.
This is useful at smaller breakpoints to avoid horizontal scrolling on rows that do not sit in a grid container.
Row container padding
Visually hidden
Visually hidden styling is used to hide elements on a page, while keeping it available for customers using screen readers.
Learn more about how visually hidden content helps with accessibility.