struct
UI::Fluid
- UI::Fluid
- Struct
- Value
- Object
Overview
Responsive sizing value. Translates to clamp(min, ideal, max) on web,
and to the platform's idiomatic size class behavior on Apple/Android
(handled by later phases).
#min, #ideal, and #max are CSS-compatible size strings (e.g., "20rem",
"60vw", "480px"). Use the Fluid.px / Fluid.vw constructors when you
have numeric pixel values rather than building strings by hand.
Defined in:
ui/fluid.crConstructors
- .new(min : String, ideal : String, max : String)
-
.px(min : Number, ideal : Number, max : Number) : Fluid
Construct from numeric pixel values.
-
.vw(min_px : Number, ideal_vw : Number, max_px : Number) : Fluid
Construct from a fluid
.vwideal with px floor/ceiling.
Instance Method Summary
- #clone
- #copy_with(min _min = @min, ideal _ideal = @ideal, max _max = @max)
- #ideal : String
- #max : String
- #min : String
-
#to_css : String
Render as a CSS
clamp()expression.
Constructor Detail
Construct from numeric pixel values. Pixels are emitted as Npx.
Construct from a fluid .vw ideal with px floor/ceiling.