Skip to content
Support Yumma CSS by starring us on GitHub!

Font Family

Controls the font family of an element.

Class Properties

ff-c

font-family: Charter, Cambria, serif;

ff-m

font-family: ui-monospace, Consolas, monospace;

ff-s

font-family: system-ui, sans-serif;

Charter

This example sets the font family to Charter. If Charter is not available, it will fall back to Cambria, and then to a generic serif font.

The quick brown fox jumps over the lazy dog.

<div class="bg-l-indigo-6 p-4 rad-1">
<p class="bg-white ff-c fs-sm p-4 rad-1 ta-c tc-lead">The quick brown fox jumps over the lazy dog.</p>
</div>

UI Monospace

This example sets the font family to ui-monospace. If ui-monospace is not available, it will fall back to Consolas, and then to a generic monospace font.

The quick brown fox jumps over the lazy dog.

<div class="bg-l-indigo-6 p-4 rad-1">
<p class="bg-white ff-m fs-sm p-4 rad-1 ta-c tc-lead">The quick brown fox jumps over the lazy dog.</p>
</div>

System UI

This example sets the font family to system-ui. If system-ui is not available, it will fall back to a generic sans-serif font.

The quick brown fox jumps over the lazy dog.

<div class="bg-l-indigo-6 p-4 rad-1">
<p class="bg-white ff-s fs-sm p-4 rad-1 ta-c tc-lead">The quick brown fox jumps over the lazy dog.</p>
</div>

Utilizing utilities conditionally

Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.

Responsive breakpoints

You can combine responsive breakpoints like sm:ff-*,md:ff-*, lg:ff-*, and xxl:ff-* allows targeting specific utilities in different viewports.

<div class="ff-s md:ff-m ..."></div>

Utilizing utilities conditionally

Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.

Hover states

Alternatively, you can apply :hover by using h:ff-* utility to override elements and change their values when hovering over them.

<div class="ff-s h:ff-m ..."></div>