Skip to main content

@microsoft/fast-components > DirectionalStyleSheetBehavior

DirectionalStyleSheetBehavior class

Behavior to conditionally apply LTR and RTL stylesheets. To determine which to apply, the behavior will use the nearest DesignSystemProvider's 'direction' design system value.

Signature:
export declare class DirectionalStyleSheetBehavior implements Behavior 

Example

import { css } from "@microsoft/fast-element";
import { DirectionalStyleSheetBehavior } from "@microsoft/fast-foundation";

css`
// ...
`.withBehaviors(new DirectionalStyleSheetBehavior(
css`:host { content: "ltr"}`),
css`:host { content: "rtl"}`),
)

Constructors

ConstructorModifiersDescription
(constructor)(ltr, rtl)Constructs a new instance of the DirectionalStyleSheetBehavior class