DocLooks
Crystal clear documentation stylingAbout
Providing great documentation is a fundamental part of developing a library, API or tool. Users need easy access to usage instructions or information that is clear and easy to consume. DocLooks is a CSS framework designed specifically for documentation. It focuses on:
- Clarity
- Readability
- Simplicity
DocLooks uses the SMACSS methodology and features base styles, layouts and modules. It is built using SCSS and includes a range of variables for modifying the appearance.
Base Styles
Doclooks applies some styles to all elements without needing to add additional classes or markup.
Text
Doclooks uses a system font string (like GitHub) to ensure text looks its best on all operating systems. Blocks of text can be broken up into evenly spaced paragraphs. Common inline elements are supported and appropriately styled.
Text in a paragraph. Some italic or emphasized text. Some bold or strong text.
Another paragraph of text. Some highlighted text. Some linked text.
Headings
Different levels of headings can be used to structure your page.
| Markup | Example |
|---|---|
|
Heading 1 |
|
Heading 2 |
|
Heading 3 |
|
Heading 4 |
|
Heading 5 |
|
Heading 6 |
Code
Some inline code within a paragraph.
Some preformatted code within a block.
Lists
Lists include support for nesting with three levels of item markers
Unordered
- List item
- Nested list
- List item
- Nested list
- List item
Ordered
- List item
- Nested list
- List item
- Nested list
- List item
Definition
- Perge;
- Ita relinquet duas.
- Efficiens.
- Cum id fugiunt.
- Immo;
- Cur igitur easdem.
Quotes
Quotes can be created using the q or blockquote tag.
Quoniam, inquiunt, omne peccatum inbecillitatis et inconstantiae est, haec autem vitia in omnibus stultis aeque magna sunt, necesse est paria esse peccata.
Modules
Modules are re-usable elements that can be used throughout your page.
Header
A page level header with navigation.
MySite
Title
A title for the article or page. It can optionally include a tagline to offer more description.
My Title
Tagline describing the page or articleTable
| Company | Country |
|---|---|
| Alfreds Futterkiste | Germany |
| Centro comercial Moctezuma | Mexico |
| Ernst Handel | Austria |
Code Block
A multi-line block of code.
function greet() {
console.log("Hello World!");
}
Line Numbers
Code blocks can have line numbers using span.code-block--line-number. Not that this example does not use <code> tags.
function greet() { console.log("Hello World!"); }
Inverted Colors
Code blocks can have an inverted palette using the is-inverted state.
function greet() {
console.log("Hello World!");
}
Rounded Corners
Code blocks can have an rounded corners using the is-rounded state.
function greet() {
console.log("Hello World!");
}
Jump List
A list of links that can be used as navigation. Nested links have different colours to reinforce the hierarchy. The sizes of different headers can be constrained using .jump-list--heading allowing you to keep your HTML semantically structured.
Section
Break up the page into sections. Dividing lines will only be placed between subsequent sections.
First
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Second
Donec odio. Quisque volutpat mattis eros.
Demo
The demo module allows you to display code alongside a preview. You can optionally add a button
<p>Lorem Ipsum</p>
Horizontal Layout
Add the .is-horizontal state to lay out the code and preview side-by-side.
<p>Lorem Ipsum</p>
Default Colors
If your want to preserve the default theme - or just prefer the border - you can use the default colour for the preview using add the .is-default-color state.
<p>Lorem Ipsum</p>
Buttons
Buttons have a minimal style with a simple 3D effect to indicate that they are clickable.
States
States can be used to give buttons some extra semantic meaning and help the user.
Full Width
Buttons can be made to span the full width of their parent using the is-full-width class.
Rounded
Buttons can have an rounded corners using the is-rounded state.
Card
Cards can be used to create a simple cutout area for a small segment of content.
Heading
A paragraph of text or other content inside the card.
Split Columns
The split columns module can be used to be placed multiple elements side-by-side.
Left
A card on the left-hand-side.
// Some code on the right
function greet() {
console.log("Hello World!");
}
Log
939c42b
States
Theme
Dark
The default dark colour scheme. For this theme use dist/dark.css.
Light
An alternate lighter theme. For this theme use dist/light.css.