Legacy float layout: float-left/right/none with clear utilities and flow-root containment. This family contains 11 generated classes in Nakshora 3.1.

Classes#

ClassGenerated CSS
float-startfloat: inline-start;
float-endfloat: inline-end;
float-rightfloat: right;
float-leftfloat: left;
float-nonefloat: none;
clear-startclear: inline-start;
clear-endclear: inline-end;
clear-leftclear: left;
clear-rightclear: right;
clear-bothclear: both;
clear-noneclear: none;

Example#

example
html
<img class="float-left mr-4 mb-2" src="fig.jpg" alt="" />
<p>Text wraps around the figure…</p>
<div class="clear-both"></div>

Responsive & variants#

Every class here accepts screen prefixes (xxs:5xl:) and state variants — md:hover:p-4 style stacks compile to a single media query. See responsive/index|Responsive design and variants/index|Variants.

Best practices#

  • Prefer flex/grid for layout; keep floats for text-wrap-around-image effects
  • flow-root on the parent contains floats without a clear element

Common mistakes#

  • Floating removes the element from normal flow — siblings slide underneath if not cleared

utilities/spacing/margin|Margin · utilities/sizing/width|Width · responsive/index|Responsive