- A customisable CSS framework that strives to be small, yet complete. With a strong focus on
- typography, clean spacing, and semantic naming conventions,
- Spirit is the perfect CSS microframework for everyone.
-
-
-
-
Typography
-
Opiniated styles are applied on the HTML heading elements in order to fluidly style them. Use the
- variables
- available to
- customise them to your need.
-
-
Typefaces used
-
These are freely available, high quality typefaces.
Custom sizes are not fluid, but they let you 'lock' the font-size of text across all device widths.
-
.size-1
-
.size-2
-
.size-3
-
.size-4
-
.size-5
-
.size-6
-
.size-7
-
-
Links
-
- Links are specially styled to look better in a block of text.
-
-
-
Scale text
-
A utility class to make the font-size of text content slightly smaller than it's parent. It uses fluid
- sizing
- in order to be perfectly responsive.
-
This sentence, for example, is scaled down.
-
-
Title
-
This provides a sans-serif title font, with extra weight.
-
-
-
-
Grids:
-
Use Grids to create responsive layouts that flow in two dimensions. The default grid is 12x12 cells, this
- can
- easily be extended to any arbitrary number by using CSS variables.
- This one stays the same across all viewports:
Composable flexbox utilities allows you to quickly style content that flows in one-dimension.
- Applying class="container row is-fullheight flex-center" to a div element creates the following content:
-
-
-
-
Lorem ipsum.
-
-
Infinitely nestable rows and columns allow you to effortlessly create incredibly
- complex
- layouts. Use the
- full power
- of Flexbox and Grid to bend CSS to your will.
-
-
-
- C1
-
-
N1
-
N2
-
N3
-
-
-
C2
-
C3
-
-
-
Note: Fixed width content within a flex container may overflow on smaller displays.
-
-
Forms:
-
Simple styles with rational defaults, to provide a cohesive design.
-
-
-
-
Tables:
-
Tables are minimally styled, and come with a handy .table-container class for horizontally scrollable
- tables.
-
-
-
-
-
-
Name
-
ID
-
Favorite Color
-
Favorite Color
-
Favorite Color
-
Favorite Color
-
Favorite Color
-
Favorite Color
-
Favorite Color
-
Favorite Color
-
Favorite Color
-
Favorite Color
-
-
-
-
-
Jim
-
Green
-
Green
-
Green
-
Green
-
00001
-
Blue
-
Blue
-
Blue
-
Blue
-
Blue
-
Blue
-
-
-
Sue
-
00002
-
Red
-
Green
-
Green
-
Green
-
Green
-
Blue
-
Blue
-
Red
-
Red
-
Red
-
-
-
Barb
-
00003
-
Red
-
Red
-
Red
-
Red
-
Red
-
Blue
-
Blue
-
Green
-
Green
-
Green
-
-
-
-
-
-
-
-
Images
-
Images are styled using an aspect ratio box technique. It requires you to add the aspect ratio of the
- image
- using the style attribute.
These images will maintain their aspect ratio across all viewports. In combination with using the
- picture tag, responsive images has never been easier.
-
-
Note: Based on code from this article. In particular, Thierry Koblentz's
- work.
-
-
-
-
Elements
-
A collection of other useful elements and styles.
-
-
Box
-
-
- The box element is a simple container with padding and shadow. It can contain any arbitrary content.
-
-
-
-
Lists
-
-
-
Unordered lists:
-
-
List item 1
-
List item 2
-
List item 3
-
List item 4
-
-
-
-
Ordered lists:
-
-
List item 1
-
List item 2
-
List item 3
-
List item 4
-
-
-
-
-
Horizontal rule:
-
A restyled horizontal rule element you can use to add class to your design.
-
-
-
Article wrapper & breakout
-
- It's common to see articles limit the width of the content on wide displays in order to improve
- readability.
- Spirit provides a Grid powered wrapper for this situation, which is completely responsive. As a bonus,
- it
- also supplies a customisable .breakout class
- which you can use to allow elements to be fullwidth, responsively.
-
-
-
Example
-
This content will only extend until a max-width of 480px, beyond which it will start wrapping. This
- width
- is customisable inline. The default can be customised in the _variables.scss file.
-
-
- On the other hand, this content is placed within a .breakout class. This means that it will always
- span
- the fullwidth of the viewport. This is especially useful for images or charts.
-
-
-
This effect is easily nestable, as seen on this very element. All the content on this page has been
- wrapped in this style, with this element being wrapped twice.
-
- Use these utility classes to perfectly position your content using margins and padding.
-
-
Available class prefixes:
-
-
-
-
.mt
-
.mr
-
.mb
-
.ml
-
-
-
-
-
.pt
-
.pr
-
.pb
-
.pl
-
-
-
-
-
In order to use these classes, combine a prefix with one of the following levels to achieve the desired
- result. For example, .mr-3 defines margin-right: 1.75 rem.
-
-
-
-
Level
-
Value
-
-
-
-
-
0
-
0
-
-
-
1
-
0.75 rem
-
-
-
2
-
1.25 rem
-
-
-
3
-
1.75 rem
-
-
-
4
-
2.25 rem
-
-
-
5
-
2.75 rem
-
-
-
-
-
Special class: .mx-auto sets margin: auto on the left and right. Useful for centering
- content,
- but honestly, you should just use flexbox.
-
-
-
-
Responsive helpers
-
A host of helper classes to conditionally display content based on the viewport width. There are 9 helper
- classes. Resize your window to see the effect.
-
-
-
This sentence is hidden on mobile devices.
-
This sentence is hidden on tablets.
-
This sentence is hidden on desktops.
-
This sentence is hidden on widescreen.
-
-
This sentence is hidden upto touch devices.
-
This sentence is hidden from tablet and above.
-
This sentence is hidden from desktop and above.
-
This sentence is hidden from widescreen and above.
-
This sentence is hidden from fullhd and above.
-
-
Note: These helpers were taken directly from Bulma CSS.
-
-
-
-
Color helpers
-
Spirit includes a tiny set of classes to quickly style the background, font-color or border-color of any
- element.