{% extends 'layouts/docs.html' %} {% set page = pages.base %} {% set isdocs = true %} {% block content %}

Base element styles control native HTML elements such as headings, paragraphs, buttons, and forms in a systematic and opinionated way. These styles include typographical considerations and utilities derived from base elements, such as typefaces, the type scale, forms, and buttons.

Typography

Base type scale

Typographic elements are normalized to a simple type scale that works well across devices. Default top and bottom margins are set for commonly-used typographic elements.

{{ macros.example('headings.html') }}

Type scale utilities

The .h1.h6 font-size utilities can be used to override an element’s default size.

{{ macros.example('type-scale.html') }}

Lists

By default, lists have bullets or numbers and padding left.

{{ macros.example('lists.html') }}

To remove default list styling, use .list-reset.

{{ macros.example('list-reset.html') }}

To set lists inline, use utilities.

{{ macros.example('list-inline.html') }}

Forms

Forms use base styles for their structure with color styles applied to adjust the look and feel. This creates a rhythmic consitency among all forms while allowing thematic differences where needed. Form elements do not rely on nested styles or markup structure, so utility styles can be used for contextual adjustments.

Inline Forms

By default, form elements display inline.

{{ macros.example('form-inline.html') }}

Stacked Forms

Use .block and other utilities to stack form elements. The use of utilities allows for a lot of flexibility when building form layouts.

{{ macros.example('form-basic.html') }}

Fieldsets can be reset with .fieldset-reset to allow for easier styling of the fieldset and legend.

{{ macros.example('form-fieldset.html') }}

Buttons

Structural styles and resets for buttons are set in base. All buttons share common padding and height, well suited for tap targets on touchscreen displays. Color styles and other custom extensions adjust their surface-level appearance.

{{ macros.example('buttons.html') }}

Tables

Default table styles are defined in base. Use the table-light color style with other color utilities or create custom theme extensions to suit your needs.

{{ macros.example('tables.html') }}

Default Variables

Base styles use the following variables. To alter these defaults, declare new values after importing Basscss with Rework.

{% highlight 'css' %}{% include 'examples/base-variables.css' %}{% endhighlight %}

NPM

Base styles are also available as a standalone NPM module.

npm install basscss-base
{% endblock %}