Skip to content

Commit 0659e0e

Browse files
author
Chris Harvey
committed
Merge branch 'stage-v5.2.0'
2 parents b6e841d + a515d64 commit 0659e0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1348
-1253
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ To use the Xmeter global variables, import the `__settings` stylesheet.
6565
@import (reference) url('/node_modules/xmeter/src/__settings.less');
6666

6767
.my-selector {
68-
line-height: 2 * @g-line_height;
68+
font-size: 1.5 * @g-font_size_kilo;
6969
}
7070
```
7171

Diff for: docs/_docs.tpl.jade

+30-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
doctype html
22
html(lang="en")
3-
include includes/_data.jade
3+
mixin doctoc(args)
4+
//- NOTE parameter validation
5+
-
6+
var pages = args.pages || []
7+
var classes = args.classes || {}
8+
var depth = +args.depth || 0
9+
ol(class=classes.listclasses)
10+
each item in pages
11+
unless item.isHidden()
12+
li(class=classes.itemclasses)
13+
a(class=classes.linkclasses href=item.url())= item.name()
14+
if item.description()
15+
= ': ' + item.description()
16+
if item.findAll().length && depth > 0
17+
+doctoc({pages: item.findAll(), classes: (classes.sub || {}), depth: depth-1})
18+
mixin newSection(hn, page)
19+
-
20+
var text = page.name()
21+
var id = page.url().split('#')[1]
22+
section(id=id)
23+
if hn === 1
24+
h1 #{text} #[a.docs-_fragid(href='#' + id)]
25+
else if hn === 2
26+
h2 #{text} #[a.docs-_fragid(href='#' + id)]
27+
else if hn === 3
28+
h3 #{text} #[a.docs-_fragid(href='#' + id)]
29+
else
30+
p #{text}
31+
block
432
block vars
533
head
634
title= page.title() || (page.name() + ' | ' + Xmeter.DOCS.name())
@@ -20,7 +48,7 @@ html(lang="en")
2048
h1 #[a(href=Xmeter.DOCS.url())= Xmeter.DOCS.name()] — #{page.name()}
2149
block mainIntro
2250
p= page.description()
23-
nav#table-contents
51+
nav
2452
h2 Table of Contents
2553
block toc
2654
+doctoc({pages: page.findAll(), depth: Infinity})

Diff for: docs/atom.html

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
<!DOCTYPE html><html lang="en"><head><title>Atoms | Xmeter</title><meta charset="utf-8"><meta name="description" content="A demo of Xmeter styles."><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="../xmeter.css"><link rel="stylesheet" href="styles/docs.css"></head><body class="docs-body"><main class="docs-main"><header><h1><a href="/docs/">Xmeter</a> &mdash; Atoms</h1><p>Very specific classes used for creating anomalies or fixing broken styles.</p><nav id="table-contents"><h2>Table of Contents</h2><ol><li><a href="atom.html#table-contents">Table of Contents</a></li><li><a href="atom.html#margin-bottom">margin-bottom</a></li><li><a href="atom.html#padding-top">padding-top</a></li><li><a href="atom.html#font-size">font-size</a></li></ol></nav></header><section id="margin-bottom"><h2>margin-bottom <a class="docs-_fragid" href="#margin-bottom"></a></h2><p>This atom sets the bottom margin to one <dfn>vertical rhythm unit</dfn> (1vru),
1+
<!DOCTYPE html><html lang="en"><head><title>Atoms | Xmeter</title><meta charset="utf-8"><meta name="description" content="A demo of Xmeter styles."><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="../xmeter.css"><link rel="stylesheet" href="styles/docs.css"></head><body class="docs-body"><main class="docs-main"><header><h1><a href="/docs/">Xmeter</a> &mdash; Atoms</h1><p>Very specific classes used for creating anomalies or fixing broken styles.</p><nav><h2>Table of Contents</h2><ol><li><a href="atom.html#margin-bottom">margin-bottom</a></li><li><a href="atom.html#padding-top">padding-top</a></li><li><a href="atom.html#font-size">font-size</a></li></ol></nav></header><section id="margin-bottom"><h2>margin-bottom <a class="docs-_fragid" href="#margin-bottom"></a></h2><p>This atom sets the bottom margin to one <dfn>vertical rhythm unit</dfn> (1vru),
22
which is equal to the <code class="docs-code">html</code> element&rsquo;s
33
<code class="docs-code">line-height</code> multiplied by
4-
<code class="docs-code">1rem</code>.</p><pre class="docs-pre">@g-vru: @g-line_height * 1rem;
5-
.-mb-1vru { margin-bottom: @g-vru; }</pre><figure class="docs-figure"><div class="-mb-1vru">Most typographical block elements like paragraphs and lists are automatically given this style.</div><pre class="docs-pre">&lt;div class="<u>-mb-1vru</u>"&gt;Most ...&lt;/div&gt;</pre></figure></section><section id="padding-top"><h2>padding-top <a class="docs-_fragid" href="#padding-top"></a></h2><p>This atom sets the top padding to 1<b><abbr title="vertical rhythm unit">vru</abbr></b>.</p><pre class="docs-pre">@g-vru: @g-line_height * 1rem;
6-
.-pt-1vru { padding-top: @g-vru; }</pre><figure class="docs-figure"><div class="-pt-1vru">Usually only Heading 1 is given this style, but it is also useful for moving an element down the page.</div><pre class="docs-pre">&lt;div class="<u>-pt-1vru</u>"&gt;Usually only ...&lt;/div&gt;</pre></figure></section><section id="font-size"><h2>font-size <a class="docs-_fragid" href="#font-size"></a></h2><p>These are two groups of atoms. The first group simply sets the font size of an element.
4+
<code class="docs-code">1rem</code>.</p><pre class="docs-pre">.-mb-1vru { margin-bottom: var(--vru); }</pre><figure class="docs-figure"><div class="-mb-1vru">Most typographical block elements like paragraphs and lists are automatically given this style.</div><pre class="docs-pre">&lt;div class="<u>-mb-1vru</u>"&gt;Most ...&lt;/div&gt;</pre></figure></section><section id="padding-top"><h2>padding-top <a class="docs-_fragid" href="#padding-top"></a></h2><p>This atom sets the top padding to 1<b><abbr title="vertical rhythm unit">vru</abbr></b>.</p><pre class="docs-pre">.-pt-1vru { padding-top: var(--vru); }</pre><figure class="docs-figure"><div class="-pt-1vru">Usually only Heading 1 is given this style, but it is also useful for moving an element down the page.</div><pre class="docs-pre">&lt;div class="<u>-pt-1vru</u>"&gt;Usually only ...&lt;/div&gt;</pre></figure></section><section id="font-size"><h2>font-size <a class="docs-_fragid" href="#font-size"></a></h2><p>These are two groups of atoms. The first group simply sets the font size of an element.
75
The second group uses the <code class="docs-code">.font-size-el()</code> mixin,
86
for maintaining vertical rhythm.</p><p>See all the font sizes in the source file <code class="docs-code">/src/__settings.less</code>,
97
and all atoms in <code class="docs-code">/src/_atom.less</code></p><pre class="docs-pre">@g-font_size_peta: 96/16;

Diff for: docs/atom.jade

-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ block append vars
66
block append main
77
+newSection(2, Xmeter.DOCS.find('atom.html#margin-bottom'))
88
include includes/_atom.margin-bottom.docs.jade
9-
+docs_marginBottom(Xmeter.DOCS_CLASSES)
109
+newSection(2, Xmeter.DOCS.find('atom.html#padding-top'))
1110
include includes/_atom.padding-top.docs.jade
12-
+docs_paddingTop(Xmeter.DOCS_CLASSES)
1311
+newSection(2, Xmeter.DOCS.find('atom.html#font-size'))
1412
include includes/_atom.font-size.docs.jade
15-
+docs_fontSize(Xmeter.DOCS_CLASSES)

0 commit comments

Comments
 (0)