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 title="Command">⌘</kbd><kbd title="Option">⌥</kbd><kbd title="Shift">⇧</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




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
<picture>
tag.
<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 typebuttonare 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 theclickevent). –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 typecheckboxare 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
Description
<input>elements of typecolorprovide 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#rrggbbhexadecimal 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.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. –mdn
<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
Description
<input>elements oftype="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.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. –mdn
<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
Description
<input>elements of typedatetime-localcreate input controls that let the user easily enter both a date and a time, including the year, month, and day as well as the time in hours and minutes. –mdn
<label for="start">Start date:</label>
<input type="date" id="start" name="trip-start" value="2020-08-15">
Description
<input>elements of typemultipleattribute is specified, a list of e-mail addresses. –mdn
<label for="email">Email:</label>
<input type="email" name="email" id="email">
File
Description
<input>elements withtype="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
Description
<input>elements of typeimageare used to create graphical submit buttons, i.e. submit buttons that take the form of an image rather than text. –mdn
<input class="dark-icon" type="image" id="image" alt="Login" src="/light-dark.svg">
Month
Description
<input>elements of typemonthcreate input fields that let the user enter a month and year allowing a month and year to be easily entered. The value is a string whose value is in the format “YYYY-MM”, where YYYY is the four-digit year and MM is the month number. –mdn
<label for="start">Month:</label>
<input type="month" id="start" name="start" min="2018-03" value="2020-08">
Number
Description
<input>elements of typenumberare 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 typepasswordprovide 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 typeradioare generally used inradio 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 typerangelet 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
Description
<input>elements of type"reset"are rendered as buttons, with a defaultclickevent handler that resets all of the inputs in the form to their initial values. –mdn
<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 typesearchare text fields designed for the user to enter search queries into. These are functionally identical totextinputs, but may be styled differently by the user agent. –mdn
<input placeholder="Search..." type="search" name="search">
Submit
Description
<input>elements of typesubmitare rendered as buttons. When theclickevent 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 typetelare 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
Description
The
<textarea>HTML element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form. –mdn
<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-disabled"
name="story-disabled"
rows="5"
cols="33">
It wasn't a dark and stormy night...
</textarea>
</label>
Time
Description
<input>elements of typetimelet users enter a time. The control’s interface varies by browser and operating system. –mdn
Office hours are 9am to 6pm
<label for="appt">Choose a time for your meeting:</label>
<input type="time" id="appt" name="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 typeweekcreate 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"
name="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>