Skip to main content

Float

Set how an element floats within its container.

View as Markdown
baselinewidely
ClassCSS
fl:iefloat: inline-end;
fl:isfloat: inline-start;
fl:lfloat: left;
fl:nonefloat: none;
fl:rfloat: right;

Variants

Prefix any class with a variant to apply it only under that condition. Variants stack, as in @md:h:fl:l.

Breakpoints

Apply a class from a viewport width up. Each breakpoint covers its width & every width above it.

@xs:fl:lFrom 32rem up.
@sm:fl:lFrom 40rem up.
@md:fl:lFrom 48rem up.
@lg:fl:lFrom 64rem up.
@xl:fl:lFrom 80rem up.
@xxl:fl:lFrom 96rem up.

Containers

Apply a class from a container's width up, not the viewport's. Mark the parent with ct:is first.

@c:xs:fl:lContainer from 32rem up.
@c:sm:fl:lContainer from 40rem up.
@c:md:fl:lContainer from 48rem up.
@c:lg:fl:lContainer from 64rem up.
@c:xl:fl:lContainer from 80rem up.
@c:xxl:fl:lContainer from 96rem up.

Media

Apply a class when the device or the page matches a condition, or on the first frame an element renders.

@pc:fl:lOn a touch screen.
@prm:fl:lWith reduced motion on.
@st:fl:lOn the first frame.

States

Apply a class only while the element is in a state, such as hovered, focused or checked.

h:fl:lOn :hover.
f:fl:lOn :focus.
fv:fl:lOn :focus-visible.
a:fl:lOn :active.
d:fl:lOn :disabled.
fc:fl:lOn :first-child.
c:fl:lOn :checked.
e:fl:lOn :empty.
fw:fl:lOn :focus-within.
i:fl:lOn :invalid.
in:fl:lOn :indeterminate.
lc:fl:lOn :last-child.
nc:fl:lOn :nth-child.
r:fl:lOn :required.
ro:fl:lOn :read-only.
v:fl:lOn :valid.

Pseudo Elements

Style a part of the element rather than the element itself, such as its placeholder or the selected text.

a::fl:lOn ::after.
b::fl:lOn ::before.
p::fl:lOn ::placeholder.
s::fl:lOn ::selection.