Style Guide
See how elements are styled with mine.css
.
Table of Contents
Headings
h1 Heading with code
and small text
h2 Heading with code
and small text
h3 Heading with code
and small text
h4 Heading with code
and small text
h5 Heading with code
and small text
h6 Heading with code
and small text
# h1 Heading `with code` <small>and small text</small>
## h2 Heading `with code` <small>and small text</small>
### h3 Heading `with code` <small>and small text</small>
#### h4 Heading `with code` <small>and small text</small>
##### h5 Heading `with code` <small>and small text</small>
###### h6 Heading `with code` <small>and small text</small>
Paragraphs
At the base of the mainmast, full beneath the doubloon and the flame, the Parsee was kneeling in Ahabâs front, but with his head bowed away from him; while near by, from the arched and overhanging rigging, where they had just been engaged securing a spar, a number of the seamen, arrested by the glare, now cohered together, and hung pendulous, like a knot of numbed wasps from a drooping, orchard twig. In various enchanted attitudes, like the standing, or stepping, or running skeletons in Herculaneum, others remained rooted to the deck; but all their eyes upcast.
âThere it is againâunder the hatchesâdonât you hear itâa coughâit sounded like a cough.â
At the base of the mainmast, full beneath the doubloon and the flame, the Parsee was kneeling in Ahab's front, but with his head bowed away from him; while near by, from the arched and overhanging rigging, where they had just been engaged securing a spar, a number of the seamen, arrested by the glare, now cohered together, and hung pendulous, like a knot of numbed wasps from a drooping, orchard twig. In various enchanted attitudes, like the standing, or stepping, or running skeletons in Herculaneum, others remained rooted to the deck; but all their eyes upcast.
"There it is againâunder the hatchesâdon't you hear itâa coughâit sounded like a cough."
Links
[link text](http://dev.nodeca.com)
[link with title](http://nodeca.github.io/pica/demo/ "title text!")
link with footnote style syntax
[link with footnote style syntax][footnote style]
[footnote style]: https://en.wikipedia.org/wiki/Note_(typography)
Lists
Unordered
- Create a list by starting a line with
+
,-
, or*
- Sub-lists are made by indenting 2 spaces:
- Marker character change forces new list start:
- Ac tristique libero volutpat at
- Facilisis in pretium nisl aliquet
- Nulla volutpat aliquam velit
- Marker character change forces new list start:
- Very easy!
+ Create a list by starting a line with `+`, `-`, or `*`
+ Sub-lists are made by indenting 2 spaces:
- Marker character change forces new list start:
* Ac tristique libero volutpat at
+ Facilisis in pretium nisl aliquet
- Nulla volutpat aliquam velit
+ Very easy!
Ordered
-
Lorem ipsum dolor sit amet
-
Consectetur adipiscing elit
-
Integer molestie lorem at massa
-
You can use sequential numbersâŚ
-
âŚor keep all the numbers as
1.
1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa
1. You can use sequential numbers...
1. ...or keep all the numbers as `1.`
Offset
- foo
- bar
57. foo
1. bar
Blockquotes
This is a paragraph preceding a blockquote.
<blockquote>
can also be nestedâŚâŚby using additional greater-than (
'>'
) signs right next to each otherâŚâŚor with spaces between arrows.
This is a paragraph following a blockquote.
This is a paragraph preceding a blockquote.
> `<blockquote>` can also be nested...
>> ...by using additional greater-than (`'>'`) signs right next to each other...
> > > ...or with spaces between arrows.
This is a paragraph following a blockquote.
Emphasis
- This is bold text
- This is also bold text
- This is italic text
- This is also italic text
This is deleted text
- **This is bold text**
- __This is also bold text__
- *This is italic text*
- _This is also italic text_
- ~~This is deleted text~~
Code
Inline code
Indented code
line 3 of code
line 4 of code
line 5 of code
line 7 of code
Fenced code blocks
// Syntax highlighting
var foo = function (bar) {
return bar++;
};
console.log(foo(5));
`Inline code`
Indented code
line 3 of code
line 4 of code
line 5 of code
line 7 of code
```
Fenced code blocks
```
```js
// Syntax highlighting
var foo = function (bar) {
return bar++;
};
console.log(foo(5));
```
Code blocks without any highlight.js theme:
// Syntax highlighting
var foo = function (bar) {
return bar++;
};
console.log(foo(5)); console.log(foo(5)); console.log(foo(5)); console.log(foo(5));
User Input
ctrlaltdelete
qwerty
azerty
<kbd>ctrl</kbd><kbd>alt</kbd><kbd>delete</kbd>
<kbd>q</kbd><kbd>w</kbd><kbd>e</kbd><kbd>r</kbd><kbd>t</kbd><kbd>y</kbd>
<kbd>a</kbd><kbd>z</kbd><kbd>e</kbd><kbd>r</kbd><kbd>t</kbd><kbd>y</kbd>
Tables
Option | Description |
---|---|
data | path to data files to supply the data that will be passed into templates. |
engine | engine to be used for processing templates. Handlebars is the default. |
ext | extension to be used for dest files. |
| Option | Description |
| ------ | ----------- |
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
Right aligned columns
Option | Description |
---|---|
data | path to data files to supply the data that will be passed into templates. |
engine | engine to be used for processing templates. Handlebars is the default. |
ext | extension to be used for dest files. |
| Option | Description |
| ------:| -----------:|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
Horizontal Rules
___
---
***
Images
![Finn and Jake](http://38.media.tumblr.com/tumblr_mdo6z0KBpf1rwy00jo1_400.gif "One style is all that is needed.")
![Captain Story-Martense House](https://upload.wikimedia.org/wikipedia/commons/6/66/1996.164.1-65_IMLS_SL2.jpg "Captain Story-Martense House, Front Door, Church Avenue and East 38th Street, Flatbush, Brooklyn, ca. 1899-1909.")
Like links, images also have a footnote style syntax.
The reference defining the URL location can be later in the document.
Like links, images also have a footnote style syntax.
![Alt text][id]
The reference defining the URL location can be later in the document.
[id]: https://upload.wikimedia.org/wikipedia/commons/1/1f/Ries.PNG "1550 Woodcut of 58-year-old Adam Ries, inscription: ANNO 1550 ADAM RIES SEINS ALTERS IM LVIII"
Figures
Note: Light/Dark mode override cannot correctly select the correct image, so srcset
will only be honored when the system mode is changed.
<figure>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/07/Helsinki_z00.jpg/1920px-Helsinki_z00.jpg" alt="Helsinki">
<figcaption>Panoramic view of <a href="//commons.wikimedia.org/wiki/Helsinki" title="Helsinki">Helsinki</a>, Finland from the Ateljee bar of <a href="https://en.wikipedia.org/wiki/Hotel_Torni" title="en:Hotel Torni">Hotel Torni</a>.</figcaption>
</figure>
<figure class="borderless">
<picture>
<source srcset="/img/fork-dark.png" media="(prefers-color-scheme: dark)">
<img src="/img/fork-light.png" alt="Screenshot of Fork.app">
</picture>
<figcaption>Light and dark mode images with the <code><picture></code> tag.</figcaption>
</figure>
Extras
The following markup falls outside the CommonMark specification and may require plugins or special options for your markdown parser of choice. Weâre using markdown-it and related plugins to show how the following elements look when using style.css
.
Abbreviations
via markdown-it-abbr
This is a HTML abbreviation example.
It converts âHTMLâ but keeps partial entries like âxxxHTMLyyyâ intact.
This is a HTML abbreviation example.
It converts "HTML" but keeps partial entries like "xxxHTMLyyy" intact.
*[HTML]: Hyper Text Markup Language
Definitions
- Term 1
-
Definition 1 with lazy continuation.
- Term 2 with inline markup
-
Definition 2
{ some code, part of Definition 2 }
Third paragraph of definition 2.
Compact style:
- Term 1
- Definition 1
- Term 2
- Definition 2a
- Definition 2b
Term 1
: Definition 1
with lazy continuation.
Term 2 with *inline markup*
: Definition 2
{ some code, part of Definition 2 }
Third paragraph of definition 2.
_Compact style:_
Term 1
~ Definition 1
Term 2
~ Definition 2a
~ Definition 2b
Footnotes
Footnote 1 link[1].
Footnote 2 link[2].
Inline footnote[3] definition.
Duplicated footnote reference[2:1].
Footnote 1 link[^first].
Footnote 2 link[^second].
Inline footnote^[Text of inline footnote] definition.
Duplicated footnote reference[^second].
[^first]: Footnote **can have markup**
and multiple paragraphs.
[^second]: Footnote text.
Special Emphasis
- Superscript: 19th (via markdown-it-sup)
- Subscript: H2O (via markdown-it-sub)
- Inserted text (via markdown-it-ins)
- Marked text (via markdown-it-mark)
- Superscript: 19^th^ (via [markdown-it-sup](https://github.com/markdown-it/markdown-it-sup))
- Subscript: H~2~O (via [markdown-it-sub](https://github.com/markdown-it/markdown-it-sub))
- ++Inserted text++ (via [markdown-it-ins](https://github.com/markdown-it/markdown-it-ins))
- ==Marked text== (via [markdown-it-mark](https://github.com/markdown-it/markdown-it-mark))
Input Types
Mine.css offers improved default styling of built in HTML form inputs with dark mode override support.
Button
Description
<input>
elements of typebutton
are rendered as simple push buttons, which can be programmed to control custom functionality anywhere on a webpage as required when assigned an event handler function (typically for theclick
event). âmdn
<input type="button" value="Button">
<input type="button" value="Button">
<input type="button" value="Button">
<button>Hey Hi</button>
<input disabled type="button" value="Disabled Button">
Checkbox
Description
<input>
elements of type checkbox
are rendered by default as boxes that are checked (ticked) when activated, like you might see in an official government paper form. The exact appearance depends upon the operating system configuration under which the browser is running. Generally this is a square but it may have rounded corners. A checkbox allows you to select single values for submission in a form (or not). âmdn
<div>
<input type="checkbox" name="scales" id="scales" checked>
<label for="scales">Scales</label>
</div>
<div>
<input type="checkbox" name="horns" id="horns">
<label for="horns">Horns</label>
</div>
<div>
<input disabled type="checkbox" name="teeth" id="teeth">
<label for="teeth">Teeth (Disabled)</label>
</div>
Color
The elementâs presentation may vary substantially from one browser and/or platform to anotherâit might be a simple textual input that automatically validates to ensure that the color information is entered in the proper format, or a platform-standard color picker, or some kind of custom color picker window. âmdnDescription
<input>
elements of type color
provide a user interface element that lets a user specify a color, either by using a visual color picker interface or by entering the color into a text field in #rrggbb
hexadecimal format. Only simple colors (without alpha channel) are allowed though CSS colors has more formats, e.g. color names, functional notations and a hexadecimal format with an alpha channel.
<div>
<input type="color" name="head" id="color-head" value="#e66465">
<label for="color-head">Head</label>
</div>
<div>
<input type="color" name="body" id="color-body" value="#f6b73c">
<label for="color-body">Body</label>
</div>
<div>
<input disabled type="color" name="foot" id="color-foot" value="#0083f5">
<label for="color-foot">Footer (Disabled)</label>
</div>
Date
The resulting value includes the year, month, and day, but not the time. The time and datetime-local input types support time and date+time input. âmdnDescription
<input>
elements of type="date"
create input fields that let the user enter a date, either with a textbox that validates the input or a special date picker interface.
<label class="block" for="trip-start">Date:</label>
<input type="date" name="trip-start" id="trip-start" value="2020-08-15">
<label class="block" for="placeholder-date">Date (Placeholder):</label>
<input type="date" name="placeholder-date" id="placeholder-date" placeholder="2020-08-25">
<label class="block" for="trip-end">Date (Disabled):</label>
<input disabled type="date" name="trip-end" id="trip-end" value="2020-08-25">
Datetime Local
<label for="start">Start date:</label>
<input type="date" id="start" name="trip-start" value="2020-08-15">
<label for="email">Email:</label>
<input type="email" name="email" id="email">
File
Description
<input>
elements with type="file"
let the user choose one or more files from their device storage. Once chosen, the files can be uploaded to a server using form submission, or manipulated using JavaScript code and the File API. âmdn
<input type="file" id="avatar" name="avatar" id="avatar" accept="image/png, image/jpeg">
Image
<input class="dark-icon" type="image" id="image" alt="Login" src="/light-dark.svg">
Month
<label for="start">Month:</label>
<input type="month" id="start" name="start" min="2018-03" value="2020-08">
Number
Description
<input>
elements of type number
are used to let the user enter a number. They include built-in validation to reject non-numerical entries. The browser may opt to provide stepper arrows to let the user increase and decrease the value using their mouse or by simply tapping with a fingertip. âmdn
<label class="block" for="number">Number (10-100):</label>
<input type="number" name="number" id="number" min="10" max="100" placeholder="12">
Password
Description
<input>
elements of type password
provide a way for the user to securely enter a password. The element is presented as a one-line plain text editor control in which the text is obscured so that it cannot be read, usually by replacing each character with a symbol such as the asterisk ("*") or a dot ("â˘"). This character will vary depending on the user agent and OS. âmdn
<label class="block" for="pass">Password:</label>
<input placeholder="â˘â˘â˘â˘â˘â˘â˘â˘" type="password" name="pass" id="pass" minlength="8">
Radio
Description
<input>
elements of type radio
are generally used in radio groups
âcollections of radio buttons describing a set of related options. Only one radio button in a given group can be selected at the same time. Radio buttons are typically rendered as small circles, which are filled or highlighted when selected. âmdn
<div>
<input type="radio" name="drone" value="huey" id="huey" checked>
<label for="huey">Huey</label>
</div>
<div>
<input type="radio" name="drone" value="dewey" id="dewey">
<label for="dewey">Dewey</label>
</div>
<div>
<input disabled type="radio" name="drone" value="louie" id="louie">
<label for="louie">Louie</label>
</div>
Range
Description
<input>
elements of type range
let the user specify a numeric value which must be no less than a given value, and no more than another given value. The precise value, however, is not considered important. This is typically represented using a slider or dial control rather than a text entry box like the number input type. Because this kind of widget is imprecise, it shouldnât typically be used unless the controlâs exact value isnât important. âmdn
<div>
<input type="range" name="volume" id="volume" min="0" max="11">
<label for="volume">Volume</label>
</div>
<div>
<input disabled type="range" name="cowbell" id="cowbell" min="0" max="100" value="90" step="10">
<label for="cowbell">Cowbell (Disabled)</label>
</div>
Reset
<form>
<div class="controls">
<label for="id">User ID:</label>
<input type="text" name="id" id="id" />
<input type="reset" value="Reset">
<input disabled type="reset" value="Reset (Disabled)">
</div>
</form>
Search
Description
<input>
elements of type search
are text fields designed for the user to enter search queries into. These are functionally identical to text
inputs, but may be styled differently by the user agent. âmdn
<input placeholder="Search..." type="search" name="search">
Submit
Description
<input>
elements of type submit
are rendered as buttons. When the click
event occurs (typically because the user clicked the button), the user agent attempts to submit the form to the server. âmdn
<input type="submit" value="Submit">
Tel
Description
<input>
elements of type tel
are used to let the user enter and edit a telephone number. Unlike <input type="email">
and <input type="url">
, the input value is not automatically validated to a particular format before the form can be submitted, because formats for telephone numbers vary so much around the world. âmdn
Format: 123-456-7890
<label for="phone">Enter your phone number:</label>
<input type="tel" id="phone" name="phone" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" required>
<small>Format: 123-456-7890</small>
Text
<label for="name">Name (4 to 8 characters):</label>
<input type="text" id="name" name="name" required minlength="4" maxlength="8" size="10">
Text Area
<label style="display: block;">
Tell us your story:
<textarea style="display: block;" id="story" name="story" rows="5" cols="33">
It was a dark and stormy night...
</textarea>
</label>
<label style="display: block;">
Don't tell us your story:
<textarea style="display: block;" disabled id="story" name="story" rows="5" cols="33">
It wasn't a dark and stormy night...
</textarea>
</label>
Time
Description
<input>
elements of type time
create input fields designed to let the user easily enter a time (hours and minutes, and optionally seconds). The controlâs user interface will vary from browser to browser. Support is good in modern browsers, with Safari being the sole major browser not yet implementing it; in Safari, and any other browsers that donât support <time>
, it degrades gracefully to <input type="text">
. âmdn
Office hours are 9am to 6pm
<label for="appt">Choose a time for your meeting:</label>
<input type="time" id="appt" name="appt" id="appt" min="09:00" max="18:00" required>
<small>Office hours are 9am to 6pm</small>
URL
<label for="url">Enter an https:// URL:</label>
<input type="url" name="url" id="url" placeholder="https://example.com" pattern="https://.*" size="30" required>
Week
Description
<input>
elements of type week
create input fields allowing easy entry of a year plus the ISO 8601 week number during that year (i.e., week 1 to 52 or 53). âmdn
<label class="block" for="week-example">Week:</label>
<input class="block" placeholder="2018-W18" value="2017-W01" type="week" for="week-example" id="week-example" min="2018-W18" max="2018-W26" required>
Fieldset
<form style="display: inline-block;">
<fieldset>
<legend>Log into your account:</legend>
<div>
<label class="block" for="username">Email:</label>
<input type="email" name="username" id="username">
</div>
<div>
<label class="block" for="password-fieldset">Password:</label>
<input type="password" name="password" id="password-fieldset">
</div>
<input style="width:100%" type="submit" value="Login">
</fieldset>
</form>