PhoenixPaper.Elevation (PhoenixPaper v0.1.0)

Copy Markdown View Source

Material Design elevation (dp 0-24) as Tailwind utility classes.

The actual box-shadow values are defined once, in CSS, in priv/static/phoenix_paper.css as @utility pp-elevation-0 .. pp-elevation-24. This module only maps an integer level to the matching class name.

Class names below are written as full literal strings (never built with string interpolation) so Tailwind's static source scanner can find them in this file — see the "Tailwind class safety" rule in AGENTS.md.

Summary

Functions

Returns the pp-elevation-N class for the given level, clamped to 0..24.

Types

level()

@type level() :: 0..24

Functions

class(level)

@spec class(integer()) :: String.t()

Returns the pp-elevation-N class for the given level, clamped to 0..24.

iex> PhoenixPaper.Elevation.class(4)
"pp-elevation-4"

iex> PhoenixPaper.Elevation.class(99)
"pp-elevation-24"