LiveStyle.Compiler.CSS.PositionTry (LiveStyle v0.13.0)

View Source

Generates CSS @position-try rules from the manifest.

This module handles generation of CSS Anchor Positioning @position-try rules, which define fallback positions for anchored elements.

Entry Format

Entries from the position_try macro have the format:

[ident: "--xabc123", declarations: [top: "0", left: "anchor(left)"]]

Summary

Functions

Generates all @position-try CSS rules from the manifest.

Functions

generate(manifest)

@spec generate(LiveStyle.Manifest.t()) :: String.t()

Generates all @position-try CSS rules from the manifest.

Returns a string containing all position-try rules, or an empty string if there are no position-try entries.