You've already forked 98.css
mirror of
https://github.com/jdan/98.css.git
synced 2026-05-05 06:01:22 +09:00
Merge remote-tracking branch 'upstream/master'
# Conflicts: # docs/index.html
This commit is contained in:
@@ -48,7 +48,7 @@ Refer to the [documentation page](https://jdan.github.io/98.css/) for specific i
|
|||||||
|
|
||||||
[`style.css`](https://github.com/jdan/98.css/blob/master/style.css) is where everything happens.
|
[`style.css`](https://github.com/jdan/98.css/blob/master/style.css) is where everything happens.
|
||||||
|
|
||||||
`npm run build:docs` will compile `style.css` (and all fonts/icons/etc) and rebuild the docs/ directory which powers http://jdan.github.io/98.css. It's a static directory so serve it with your server of choice (I am partial to `python -m SimpleHTTPServer 3000`) to see your changes.
|
`npm run build:docs` will compile `style.css` (and all fonts/icons/etc) and rebuild the `dist/` directory which powers https://jdan.github.io/98.css. It's a static directory so serve it with your server of choice (I am partial to `python -m SimpleHTTPServer 3000`) to see your changes.
|
||||||
|
|
||||||
### Issues, Contributing, etc.
|
### Issues, Contributing, etc.
|
||||||
|
|
||||||
|
|||||||
@@ -32,14 +32,14 @@ function example(code) {
|
|||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
glob("dist/*", (err, files) => {
|
glob("docs/*", (err, files) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
files.forEach((srcFile) =>
|
files.forEach((srcFile) =>
|
||||||
fs.copyFileSync(srcFile, path.join("docs", path.basename(srcFile)))
|
fs.copyFileSync(srcFile, path.join("dist", path.basename(srcFile)))
|
||||||
);
|
);
|
||||||
} else throw "error globbing dist directory.";
|
} else throw "error globbing dist directory.";
|
||||||
});
|
});
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
"docs/index.html",
|
path.join(__dirname, "/dist/index.html"),
|
||||||
ejs.render(template, { getNewId, getCurrentId, example })
|
ejs.render(template, { getNewId, getCurrentId, example })
|
||||||
);
|
);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
859
docs/index.html
859
docs/index.html
@@ -1,859 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>98.css - A design system for building faithful recreations of old UIs</title>
|
|
||||||
<link rel="Shortcut Icon" type="image/x-icon" href="icon.png" />
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
|
|
||||||
<meta property="og:title" content="98.css" />
|
|
||||||
<meta name="Description" content="A design system for building faithful recreations of old UIs." />
|
|
||||||
<meta property="og:description" content="A design system for building faithful recreations of old UIs." />
|
|
||||||
<meta
|
|
||||||
property="og:image"
|
|
||||||
content="https://github.com/jdan/98.css/raw/master/docs/window.png?raw=true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="98.css">
|
|
||||||
<link rel="stylesheet" href="docs.css">
|
|
||||||
<link rel="stylesheet" href="vs.css">
|
|
||||||
</head>
|
|
||||||
<body ontouchstart>
|
|
||||||
<aside>
|
|
||||||
<ul class="tree-view">
|
|
||||||
<li><a href="#intro">Intro</a></li>
|
|
||||||
<li>
|
|
||||||
<a href="#components">Components</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#button">Button</a></li>
|
|
||||||
<li><a href="#checkbox">Checkbox</a></li>
|
|
||||||
<li><a href="#option-button">OptionButton</a></li>
|
|
||||||
<li><a href="#group-box">GroupBox</a></li>
|
|
||||||
<li><a href="#text-box">TextBox</a></li>
|
|
||||||
<li><a href="#dropdown">Dropdown</a></li>
|
|
||||||
<li>
|
|
||||||
<a href="#window">Window</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#title-bar">Title Bar</a></li>
|
|
||||||
<li><a href="#window-contents">Window contents</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#tree-view">TreeView</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#issues-contributing-etc">Issues, Contributing, etc.</a></li>
|
|
||||||
</ul>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<h1>98.css</h1>
|
|
||||||
<hr>
|
|
||||||
<p>A design system for building faithful recreations of old UIs.</p>
|
|
||||||
|
|
||||||
<h2 id="intro">Intro</h2>
|
|
||||||
<p>
|
|
||||||
98.css is a CSS library for building interfaces that look like Windows 98.
|
|
||||||
See more <a href="https://github.com/jdan/98.css">on GitHub</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="window" style="margin: 32px; width: 250px">
|
|
||||||
<div class="title-bar">
|
|
||||||
<div class="title-bar-text">
|
|
||||||
My First VB4 Program
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="title-bar-controls">
|
|
||||||
<button aria-label="Minimize"></button>
|
|
||||||
<button aria-label="Maximize"></button>
|
|
||||||
<button aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="window-body">
|
|
||||||
<p>Hello, world!</p>
|
|
||||||
<section class="field-row" style="justify-content: flex-end">
|
|
||||||
<button>OK</button>
|
|
||||||
<button>Cancel</button>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This library relies on the usage of <strong>semantic HTML</strong>. To make a button, you'll need
|
|
||||||
to use a <code><button></code>. Input elements require labels. Icon buttons rely on
|
|
||||||
<code>aria-label</code>. This page will guide you through that process, but accessibility is a primary
|
|
||||||
goal of this project.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can override many of the styles of your elements while maintaining the appearance provided by
|
|
||||||
this library. Need more padding on your buttons? Go for it. Need to add some color to your input labels?
|
|
||||||
Be our guest.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<strong>This library does not contain any JavaScript</strong>, it merely styles your HTML with some CSS.
|
|
||||||
This means 98.css is compatible with your frontend framework of choice.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Here is an example of <a href="https://codesandbox.io/s/objective-chandrasekhar-t5t6h?file=/src/index.js">98.css used with React</a>, and
|
|
||||||
<a href="https://codesandbox.io/s/late-sound-miqho?file=/index.html">an example with vanilla JavaScript</a>. The fastest way to use 98.css is to import it from unpkg.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre style="max-width: 375px"><code><link
|
|
||||||
rel="stylesheet"
|
|
||||||
href="https://unpkg.com/98.css"
|
|
||||||
></code></pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can install 98.css from the <a href="https://github.com/jdan/98.css/releases">GitHub releases page</a>, or <a href="https://www.npmjs.com/package/98.css">from npm</a>.
|
|
||||||
</p>
|
|
||||||
<pre style="max-width: 375px"><code>npm install 98.css</code></pre>
|
|
||||||
|
|
||||||
<h2 id="components">Components</h2>
|
|
||||||
|
|
||||||
<section class="component">
|
|
||||||
<h3 id="button">Button</h3>
|
|
||||||
<div>
|
|
||||||
<blockquote>
|
|
||||||
A <em>command button</em>, also referred to as a push button, is a control
|
|
||||||
that causes the application to perform some action when the user clicks it.
|
|
||||||
|
|
||||||
<footer>— Microsoft Windows User Experience p. 160</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A standard button measures 75px wide and 23px tall, with a raised outer and inner border.
|
|
||||||
They are given 12px of horizontal padding by default.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<button>Click me</button>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">button</span>></span>Click me<span class="hljs-tag"></<span class="hljs-name">button</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When buttons are clicked, the raised borders become sunken.
|
|
||||||
The following button is simulated to be in the pressed (active) state.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<button class="active">I am being pressed</button>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">button</span>></span>I am being pressed<span class="hljs-tag"></<span class="hljs-name">button</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Disabled buttons maintain the same raised border, but have a "washed out"
|
|
||||||
appearance in their label.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<button disabled>I cannot be clicked</button>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">disabled</span>></span>I cannot be clicked<span class="hljs-tag"></<span class="hljs-name">button</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Button focus is communicated with a dotted border, set 4px within the contents of the button.
|
|
||||||
The following example is simulated to be focused.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<button class="focused">I am focused</button>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">button</span>></span>I am focused<span class="hljs-tag"></<span class="hljs-name">button</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="component">
|
|
||||||
<h3 id="checkbox">Checkbox</h3>
|
|
||||||
<div>
|
|
||||||
<blockquote>
|
|
||||||
A <em>check box</em> represents an independent or non-exclusive choice.
|
|
||||||
<footer>— Microsoft Windows User Experience p. 167</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Checkboxes are represented with a sunken panel, populated with a "check" icon when
|
|
||||||
selected, next to a label indicating the choice.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Note: You <strong>must</strong> include a corresponding label <strong>after</strong>
|
|
||||||
your checkbox, using the <code><label></code> element with a <code>for</code> attribute
|
|
||||||
pointed at the <code>id</code> of your input. This ensures the checkbox is easy to use with
|
|
||||||
assistive technologies, on top of ensuring a good user experience for all (navigating with the tab key,
|
|
||||||
being able to click the entire label to select the box).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<input type="checkbox" id="example1">
|
|
||||||
<label for="example1">This is a checkbox</label>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"checkbox"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"example1"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"example1"</span>></span>This is a checkbox<span class="hljs-tag"></<span class="hljs-name">label</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Checkboxes can be selected and disabled with the standard <code>checked</code> and <code>disabled</code>
|
|
||||||
attributes.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When grouping inputs, wrap each input in a container with the <code>field-row</code> class. This ensures
|
|
||||||
a consistent spacing between inputs.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="field-row">
|
|
||||||
<input checked type="checkbox" id="example2">
|
|
||||||
<label for="example2">I am checked</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input disabled type="checkbox" id="example3">
|
|
||||||
<label for="example3">I am inactive</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input checked disabled type="checkbox" id="example4">
|
|
||||||
<label for="example4">I am inactive but still checked</label>
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">checked</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"checkbox"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"example2"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"example2"</span>></span>I am checked<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">disabled</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"checkbox"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"example3"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"example3"</span>></span>I am inactive<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">checked</span> <span class="hljs-attr">disabled</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"checkbox"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"example4"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"example4"</span>></span>I am inactive but still checked<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="component">
|
|
||||||
<h3 id="option-button">OptionButton</h3>
|
|
||||||
<div>
|
|
||||||
<blockquote>
|
|
||||||
An <em>option button</em>, also referred to as a radio button, represents a single
|
|
||||||
choice within a limited set of mutually exclusive choices. That is, the user can choose only
|
|
||||||
one set of options.
|
|
||||||
|
|
||||||
<footer>— Microsoft Windows User Experience p. 164</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Option buttons can be used via the <code>radio</code> type on an input element.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Option buttons can be grouped by specifying a shared <code>name</code> attribute on each
|
|
||||||
input. Just as before: when grouping inputs, wrap each input in a container with the
|
|
||||||
<code>field-row</code> class to ensure a consistent spacing between inputs.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio5" type="radio" name="first-example">
|
|
||||||
<label for="radio5">Yes</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio6" type="radio" name="first-example">
|
|
||||||
<label for="radio6">No</label>
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio5"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"first-example"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio5"</span>></span>Yes<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio6"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"first-example"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio6"</span>></span>No<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Option buttons can also be <code>checked</code> and <code>disabled</code> with their corresponding
|
|
||||||
HTML attributes.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio7" type="radio" name="second-example">
|
|
||||||
<label for="radio7">Peanut butter should be smooth</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input checked disabled id="radio8" type="radio" name="second-example">
|
|
||||||
<label for="radio8">I understand why people like crunchy peanut butter</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input disabled id="radio9" type="radio" name="second-example">
|
|
||||||
<label for="radio9">Crunchy peanut butter is good</label>
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio7"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"second-example"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio7"</span>></span>Peanut butter should be smooth<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">checked</span> <span class="hljs-attr">disabled</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio8"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"second-example"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio8"</span>></span>I understand why people like crunchy peanut butter<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">disabled</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio9"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"second-example"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio9"</span>></span>Crunchy peanut butter is good<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="component">
|
|
||||||
<h3 id="group-box">GroupBox</h3>
|
|
||||||
<div>
|
|
||||||
<blockquote>
|
|
||||||
A <em>group box</em> is a special control you can use to organize a set of
|
|
||||||
controls. A group box is a rectangular frame with an optional label that surrounds
|
|
||||||
a set of controls.
|
|
||||||
|
|
||||||
<footer>— Microsoft Windows User Experience p. 189</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A group box can be used by wrapping your elements with the <code>fieldset</code> tag.
|
|
||||||
It contains a sunken outer border and a raised inner border, resembling an engraved box
|
|
||||||
around your controls.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<fieldset>
|
|
||||||
<div class="field-row">Select one:</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio10" type="radio" name="fieldset-example">
|
|
||||||
<label for="radio10">Diners</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio11" type="radio" name="fieldset-example">
|
|
||||||
<label for="radio11">Drive-Ins</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio12" type="radio" name="fieldset-example">
|
|
||||||
<label for="radio12">Dives</label>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">fieldset</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>Select one:<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio10"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"fieldset-example"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio10"</span>></span>Diners<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio11"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"fieldset-example"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio11"</span>></span>Drive-Ins<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio12"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"fieldset-example"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio12"</span>></span>Dives<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">fieldset</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can provide your group with a label by placing a <code>legend</code> element
|
|
||||||
within the <code>fieldset</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<fieldset>
|
|
||||||
<legend>Today's mood</legend>
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio13" type="radio" name="fieldset-example2">
|
|
||||||
<label for="radio13">Claire Saffitz</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio14" type="radio" name="fieldset-example2">
|
|
||||||
<label for="radio14">Brad Leone</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio15" type="radio" name="fieldset-example2">
|
|
||||||
<label for="radio15">Chris Morocco</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-row">
|
|
||||||
<input id="radio16" type="radio" name="fieldset-example2">
|
|
||||||
<label for="radio16">Carla Lalli Music</label>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">fieldset</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">legend</span>></span>Today's mood<span class="hljs-tag"></<span class="hljs-name">legend</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio13"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"fieldset-example2"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio13"</span>></span>Claire Saffitz<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio14"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"fieldset-example2"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio14"</span>></span>Brad Leone<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio15"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"fieldset-example2"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio15"</span>></span>Chris Morocco<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"radio16"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"radio"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"fieldset-example2"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"radio16"</span>></span>Carla Lalli Music<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">fieldset</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="component">
|
|
||||||
<h3 id="text-box">TextBox</h3>
|
|
||||||
<div>
|
|
||||||
<blockquote>
|
|
||||||
A <em>text box</em> (also referred to as an edit control) is a
|
|
||||||
rectangular control where the user enters or edits text. It can
|
|
||||||
be defined to support a single line or multiple lines of text.
|
|
||||||
|
|
||||||
<footer>— Microsoft Windows User Experience p. 181</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Text boxes can rendered by specifying a <code>text</code> type on an
|
|
||||||
<code>input</code> element. As with checkboxes and radio buttons, you
|
|
||||||
should provide a corresponding label with a properly set <code>for</code>
|
|
||||||
attribute, and wrap both in a container with the <code>field-row</code> class.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="field-row">
|
|
||||||
<label for="text17">Occupation</label>
|
|
||||||
<input id="text17" type="text" />
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"text17"</span>></span>Occupation<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"text17"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> /></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Additionally, you can make use of the <code>field-row-stacked</code> class
|
|
||||||
to position your label above the input instead of beside it.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="field-row-stacked" style="width: 200px">
|
|
||||||
<label for="text18">Address (Line 1)</label>
|
|
||||||
<input id="text18" type="text" />
|
|
||||||
</div>
|
|
||||||
<div class="field-row-stacked" style="width: 200px">
|
|
||||||
<label for="text19">Address (Line 2)</label>
|
|
||||||
<input id="text19" type="text" />
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row-stacked"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 200px"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"text18"</span>></span>Address (Line 1)<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"text18"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> /></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row-stacked"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 200px"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"text19"</span>></span>Address (Line 2)<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"text19"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> /></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To support multiple lines in the user's input, use the <code>textarea</code>
|
|
||||||
element instead.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="field-row-stacked" style="width: 200px">
|
|
||||||
<label for="text20">Additional notes</label>
|
|
||||||
<textarea id="text20" rows="8"></textarea>
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"field-row-stacked"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 200px"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"text20"</span>></span>Additional notes<span class="hljs-tag"></<span class="hljs-name">label</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">textarea</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"text20"</span> <span class="hljs-attr">rows</span>=<span class="hljs-string">"8"</span>></span><span class="hljs-tag"></<span class="hljs-name">textarea</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="component">
|
|
||||||
<h3 id="dropdown">Dropdown</h3>
|
|
||||||
<div>
|
|
||||||
<blockquote>
|
|
||||||
A <em>drop-down list box</em> allows the selection of only a
|
|
||||||
single item from a list. In its closed state, the control displays
|
|
||||||
the current value for the control. The user opens the list to change
|
|
||||||
the value.
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
— Microsoft Windows User Experience p. 175
|
|
||||||
</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Dropdowns can be rendered by using the <code>select</code> and <code>option</code>
|
|
||||||
elements.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<select>
|
|
||||||
<option>5 - Incredible!</option>
|
|
||||||
<option>4 - Great!</option>
|
|
||||||
<option>3 - Pretty good</option>
|
|
||||||
<option>2 - Not so great</option>
|
|
||||||
<option>1 - Unfortunate</option>
|
|
||||||
</select>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">select</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>5 - Incredible!<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>4 - Great!<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>3 - Pretty good<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>2 - Not so great<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>1 - Unfortunate<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">select</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
By default, the first option will be selected. You can change this by
|
|
||||||
giving one of your <code>option</code> elements the <code>selected</code>
|
|
||||||
attribute.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<select>
|
|
||||||
<option>5 - Incredible!</option>
|
|
||||||
<option>4 - Great!</option>
|
|
||||||
<option selected>3 - Pretty good</option>
|
|
||||||
<option>2 - Not so great</option>
|
|
||||||
<option>1 - Unfortunate</option>
|
|
||||||
</select>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">select</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>5 - Incredible!<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>4 - Great!<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span> <span class="hljs-attr">selected</span>></span>3 - Pretty good<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>2 - Not so great<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">option</span>></span>1 - Unfortunate<span class="hljs-tag"></<span class="hljs-name">option</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">select</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<h3 id="window">Window</h3>
|
|
||||||
<p>
|
|
||||||
The following components illustrate how to build complete windows using
|
|
||||||
98.css.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<section class="component">
|
|
||||||
<h4 id="title-bar">Title Bar</h4>
|
|
||||||
<div>
|
|
||||||
<blockquote>
|
|
||||||
At the top edge of the window, inside its border, is the title bar
|
|
||||||
(also reffered to as the caption or caption bar), which extends across
|
|
||||||
the width of the window. The title bar identifies the contents of the
|
|
||||||
window.
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
— Microsoft Windows User Experience p. 118
|
|
||||||
</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<blockquote>
|
|
||||||
Include command buttons associated with the common commands of the
|
|
||||||
primary window in the title bar. These buttons act as shortcuts to specific
|
|
||||||
window commands.
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
— Microsoft Windows User Experience p. 122
|
|
||||||
</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can build a complete title bar by making use of three classes,
|
|
||||||
<code>title-bar</code>, <code>title-bar-text</code>, and <code>title-bar-controls</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="title-bar">
|
|
||||||
<div class="title-bar-text">A Title Bar</div>
|
|
||||||
<div class="title-bar-controls">
|
|
||||||
<button aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar-text"</span>></span>A Title Bar<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar-controls"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Close"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
We make use of <code>aria-label</code> to render the Close button, to let
|
|
||||||
assistive technologies know the intent of this button. You may also use
|
|
||||||
"Minimize" and "Maximize" like so:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="title-bar">
|
|
||||||
<div class="title-bar-text">A Title Bar</div>
|
|
||||||
<div class="title-bar-controls">
|
|
||||||
<button aria-label="Minimize"></button>
|
|
||||||
<button aria-label="Maximize"></button>
|
|
||||||
<button aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar-text"</span>></span>A Title Bar<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar-controls"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Minimize"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Maximize"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Close"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="component">
|
|
||||||
<h4 id="window-contents">Window contents</h4>
|
|
||||||
<div>
|
|
||||||
<blockquote>
|
|
||||||
Every window has a boundary that defines its shape.
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
— Microsoft Windows User Experience p. 118
|
|
||||||
</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To give our title bar a home, we make use of the <code>window</code>
|
|
||||||
class. This provides a raised outer and inner border, as well as some
|
|
||||||
padding. We can freely resize the window by specifying a width in the
|
|
||||||
container style.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="window" style="width: 300px">
|
|
||||||
<div class="title-bar">
|
|
||||||
<div class="title-bar-text">A Complete Window</div>
|
|
||||||
<div class="title-bar-controls">
|
|
||||||
<button aria-label="Minimize"></button>
|
|
||||||
<button aria-label="Maximize"></button>
|
|
||||||
<button aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"window"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 300px"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar-text"</span>></span>A Complete Window<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar-controls"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Minimize"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Maximize"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Close"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To draw the contents of the window, we use the <code>window-body</code>
|
|
||||||
class under the title bar.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<div class="window" style="width: 300px">
|
|
||||||
<div class="title-bar">
|
|
||||||
<div class="title-bar-text">A Window With Stuff In It</div>
|
|
||||||
<div class="title-bar-controls">
|
|
||||||
<button aria-label="Minimize"></button>
|
|
||||||
<button aria-label="Maximize"></button>
|
|
||||||
<button aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="window-body">
|
|
||||||
<p>There's so much room for activities!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"window"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 300px"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar-text"</span>></span>A Window With Stuff In It<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title-bar-controls"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Minimize"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Maximize"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">aria-label</span>=<span class="hljs-string">"Close"</span>></span><span class="hljs-tag"></<span class="hljs-name">button</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"window-body"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">p</span>></span>There's so much room for activities!<span class="hljs-tag"></<span class="hljs-name">p</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="component">
|
|
||||||
<h3 id="tree-view">TreeView</h3>
|
|
||||||
<div>
|
|
||||||
<blockquote>
|
|
||||||
A <em>tree view control</em> is a special list box control
|
|
||||||
that displays a set of objects as an indented outline based
|
|
||||||
on their logical hierarchical relationship.
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
— Microsoft Windows User Experience p. 178
|
|
||||||
</footer>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To render a tree view, use an <code>ul</code> element with the
|
|
||||||
<code>tree-view</code> class. The children of this list (<code>li</code>
|
|
||||||
elements), can contain whatever you'd like.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<ul class="tree-view">
|
|
||||||
<li>We can put</li>
|
|
||||||
<li><strong style="color: purple">✨ Whatever ✨</strong></li>
|
|
||||||
<li>We want in here</li>
|
|
||||||
</ul>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">ul</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"tree-view"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>We can put<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span><span class="hljs-tag"><<span class="hljs-name">strong</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"color: purple"</span>></span>✨ Whatever ✨<span class="hljs-tag"></<span class="hljs-name">strong</span>></span><span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>We want in here<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">ul</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To make this a tree, we can nest further <code>ul</code> elements
|
|
||||||
(no class needed on these). This will provide them with a nice dotted
|
|
||||||
border and indentation to illustrate the structure of the tree.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="example">
|
|
||||||
<ul class="tree-view">
|
|
||||||
<li>Table of Contents</li>
|
|
||||||
<li>What is web development?</li>
|
|
||||||
<li>
|
|
||||||
CSS
|
|
||||||
<ul>
|
|
||||||
<li>Selectors</li>
|
|
||||||
<li>Specificity</li>
|
|
||||||
<li>Properties</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
JavaScript
|
|
||||||
<ul>
|
|
||||||
<li>Avoid at all costs</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>HTML</li>
|
|
||||||
<li>Special Thanks</li>
|
|
||||||
</ul>
|
|
||||||
<details>
|
|
||||||
<summary>Show code</summary>
|
|
||||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">ul</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"tree-view"</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>Table of Contents<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>What is web development?<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>
|
|
||||||
CSS
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">ul</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>Selectors<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>Specificity<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>Properties<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">ul</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>
|
|
||||||
JavaScript
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">ul</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>Avoid at all costs<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">ul</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>HTML<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"><<span class="hljs-name">li</span>></span>Special Thanks<span class="hljs-tag"></<span class="hljs-name">li</span>></span>
|
|
||||||
<span class="hljs-tag"></<span class="hljs-name">ul</span>></span></code></pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<h2 id="issues-contributing-etc">Issues, Contributing, etc.</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
98.css is <a href="https://github.com/jdan/98.css/blob/master/LICENSE">MIT licensed</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Refer to <a href="https://github.com/jdan/98.css/issues">the GitHub issues page</a> to see bugs
|
|
||||||
in my CSS or report new ones. I'd really like to see your pull requests (especially those new to
|
|
||||||
open-source!) and will happily provide code review. 98.css is a fun, silly project and I'd like
|
|
||||||
to make it a fun place to build your open-source muscle.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Thank you for checking my little project out, I hope it brought you some joy today. Consider
|
|
||||||
<a href="https://github.com/jdan/98.css/stargazers">starring/following along on GitHub</a> and maybe
|
|
||||||
subscribing to more fun things on <a href="https://twitter.com/jdan">my twitter</a>. 👋
|
|
||||||
</p>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
242
package-lock.json
generated
242
package-lock.json
generated
@@ -58,6 +58,21 @@
|
|||||||
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
|
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"array-union": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"array-uniq": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"array-uniq": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"array-unique": {
|
"array-unique": {
|
||||||
"version": "0.3.2",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
|
||||||
@@ -70,6 +85,15 @@
|
|||||||
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
|
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"async": {
|
||||||
|
"version": "2.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
|
||||||
|
"integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"lodash": "^4.17.14"
|
||||||
|
}
|
||||||
|
},
|
||||||
"atob": {
|
"atob": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
|
||||||
@@ -354,6 +378,12 @@
|
|||||||
"simple-swizzle": "^0.2.2"
|
"simple-swizzle": "^0.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"commander": {
|
||||||
|
"version": "2.20.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||||
|
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"component-emitter": {
|
"component-emitter": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
|
||||||
@@ -671,6 +701,12 @@
|
|||||||
"integrity": "sha512-GbtYqKffx3sU8G0HxwXuJFfs58Q7+iwLa5rBwaULwET6jWW8IAQSrVnu7vEfiUIcMVfbYyFg7cw3zdm+EbBJmw==",
|
"integrity": "sha512-GbtYqKffx3sU8G0HxwXuJFfs58Q7+iwLa5rBwaULwET6jWW8IAQSrVnu7vEfiUIcMVfbYyFg7cw3zdm+EbBJmw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"email-addresses": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"entities": {
|
"entities": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
|
||||||
@@ -855,6 +891,33 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"filename-reserved-regex": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"filenamify": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz",
|
||||||
|
"integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"filename-reserved-regex": "^1.0.0",
|
||||||
|
"strip-outer": "^1.0.0",
|
||||||
|
"trim-repeated": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"filenamify-url": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"filenamify": "^1.0.0",
|
||||||
|
"humanize-url": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"fill-range": {
|
"fill-range": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
||||||
@@ -902,6 +965,17 @@
|
|||||||
"map-cache": "^0.2.2"
|
"map-cache": "^0.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fs-extra": {
|
||||||
|
"version": "8.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
||||||
|
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.2.0",
|
||||||
|
"jsonfile": "^4.0.0",
|
||||||
|
"universalify": "^0.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"fs.realpath": {
|
"fs.realpath": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
@@ -920,6 +994,20 @@
|
|||||||
"integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
|
"integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"gh-pages": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-c+yPkNOPMFGNisYg9r4qvsMIjVYikJv7ImFOhPIVPt0+AcRUamZ7zkGRLHz7FKB0xrlZ+ddSOJsZv9XAFVXLmA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"async": "^2.6.1",
|
||||||
|
"commander": "^2.18.0",
|
||||||
|
"email-addresses": "^3.0.1",
|
||||||
|
"filenamify-url": "^1.0.0",
|
||||||
|
"fs-extra": "^8.1.0",
|
||||||
|
"globby": "^6.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"glob": {
|
"glob": {
|
||||||
"version": "7.1.6",
|
"version": "7.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||||
@@ -934,6 +1022,33 @@
|
|||||||
"path-is-absolute": "^1.0.0"
|
"path-is-absolute": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"globby": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
|
||||||
|
"integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"array-union": "^1.0.1",
|
||||||
|
"glob": "^7.0.3",
|
||||||
|
"object-assign": "^4.0.1",
|
||||||
|
"pify": "^2.0.0",
|
||||||
|
"pinkie-promise": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"pify": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||||
|
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"graceful-fs": {
|
||||||
|
"version": "4.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
|
||||||
|
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"has": {
|
"has": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||||
@@ -1040,6 +1155,30 @@
|
|||||||
"readable-stream": "^3.1.1"
|
"readable-stream": "^3.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"humanize-url": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"normalize-url": "^1.0.0",
|
||||||
|
"strip-url-auth": "^1.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"normalize-url": {
|
||||||
|
"version": "1.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz",
|
||||||
|
"integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"object-assign": "^4.0.1",
|
||||||
|
"prepend-http": "^1.0.0",
|
||||||
|
"query-string": "^4.1.0",
|
||||||
|
"sort-keys": "^1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"import-fresh": {
|
"import-fresh": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
|
||||||
@@ -1213,6 +1352,12 @@
|
|||||||
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
|
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"is-plain-obj": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"is-plain-object": {
|
"is-plain-object": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
||||||
@@ -1295,6 +1440,15 @@
|
|||||||
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
|
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"jsonfile": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||||
|
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"kind-of": {
|
"kind-of": {
|
||||||
"version": "6.0.3",
|
"version": "6.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
|
||||||
@@ -1311,6 +1465,12 @@
|
|||||||
"path-exists": "^3.0.0"
|
"path-exists": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lodash": {
|
||||||
|
"version": "4.17.15",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||||
|
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"lodash.memoize": {
|
"lodash.memoize": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
||||||
@@ -1459,6 +1619,12 @@
|
|||||||
"boolbase": "~1.0.0"
|
"boolbase": "~1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object-assign": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"object-copy": {
|
"object-copy": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
|
||||||
@@ -1621,6 +1787,21 @@
|
|||||||
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"pinkie": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
|
||||||
|
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"pinkie-promise": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
|
||||||
|
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"pinkie": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"pkg-up": {
|
"pkg-up": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",
|
||||||
@@ -2296,12 +2477,28 @@
|
|||||||
"integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==",
|
"integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"prepend-http": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
|
||||||
|
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"q": {
|
"q": {
|
||||||
"version": "1.5.1",
|
"version": "1.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
|
||||||
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
|
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"query-string": {
|
||||||
|
"version": "4.3.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz",
|
||||||
|
"integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"object-assign": "^4.1.0",
|
||||||
|
"strict-uri-encode": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"readable-stream": {
|
"readable-stream": {
|
||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||||
@@ -2539,6 +2736,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"sort-keys": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-plain-obj": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
@@ -2606,6 +2812,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"strict-uri-encode": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"string.prototype.trimend": {
|
"string.prototype.trimend": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
|
||||||
@@ -2666,6 +2878,21 @@
|
|||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"strip-outer": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"escape-string-regexp": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-url-auth": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"stylehacks": {
|
"stylehacks": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz",
|
||||||
@@ -2779,6 +3006,15 @@
|
|||||||
"repeat-string": "^1.6.1"
|
"repeat-string": "^1.6.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"trim-repeated": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"escape-string-regexp": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"union-value": {
|
"union-value": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
|
||||||
@@ -2803,6 +3039,12 @@
|
|||||||
"integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=",
|
"integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"universalify": {
|
||||||
|
"version": "0.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||||
|
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"unquote": {
|
"unquote": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz",
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node build.js",
|
"build": "node build.js",
|
||||||
"build:docs": "npm run build && node build-docs.js"
|
"build:docs": "npm run build && node build-docs.js",
|
||||||
|
"deploy:docs": "npm run build:docs && gh-pages -d dist"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"dedent": "^0.7.0",
|
"dedent": "^0.7.0",
|
||||||
"ejs": "^3.0.2",
|
"ejs": "^3.0.2",
|
||||||
|
"gh-pages": "^2.2.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"highlight.js": "^9.18.1",
|
"highlight.js": "^9.18.1",
|
||||||
"mkdirp": "^1.0.4",
|
"mkdirp": "^1.0.4",
|
||||||
|
|||||||
Reference in New Issue
Block a user