Skip to content

Commit

Permalink
Merge branch 'stage-v3.5.0' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Harvey committed Jan 28, 2016
2 parents 35b1cde + 8e0f1e1 commit 44b0757
Show file tree
Hide file tree
Showing 32 changed files with 88 additions and 71 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# xmeter
A default stylesheet with a set of tools that make designing with vertical rhythm easy.

Pronounced "Cross Meter".
Pronounced Cross Meter.

## Installation and Usage

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xmeter",
"version": "3.4.0",
"version": "3.5.0",
"description": "A default stylesheet with a set of tools that make designing with vertical rhythm easy.",
"main": "xmeter.css",
"dependencies": {
Expand Down
22 changes: 15 additions & 7 deletions src/__settings.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__settings.less
xmeter | __settings.less
\*################################*/


Expand All @@ -18,12 +18,20 @@
@xmeter_vru_px: (@xmeter_line_height * @1rem); // fallback for @xmeter_vru, which is in rems
@xmeter_vru: (@xmeter_line_height * 1rem);

@h1_font_size: (32/16); // 2.000
@h2_font_size: (24/16); // 1.500
@h3_font_size: (20/16); // 1.250
@h4_font_size: (16/16); // 1.000
@h5_font_size: (14/16); // 0.875
@h6_font_size: (12/16); // 0.750
@xmeter_font_size_h1: 32/16; // 2.000
@xmeter_font_size_h2: 24/16; // 1.500
@xmeter_font_size_h3: 20/16; // 1.250
@xmeter_font_size_h4: 16/16; // 1.000
@xmeter_font_size_h5: 14/16; // 0.875
@xmeter_font_size_h6: 12/16; // 0.750

// TODO: remove these on next major release
@h1_font_size: @xmeter_font_size_h1;
@h2_font_size: @xmeter_font_size_h2;
@h3_font_size: @xmeter_font_size_h3;
@h4_font_size: @xmeter_font_size_h4;
@h5_font_size: @xmeter_font_size_h5;
@h6_font_size: @xmeter_font_size_h6;
}
.CONSTS() {
// fractional percentages used for anything, usually widths
Expand Down
2 changes: 1 addition & 1 deletion src/__tool.fallback.box-sizing.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.fallback.box-sizing.less
xmeter | __tool.fallback.box-sizing.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/__tool.fallback.column-count.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.fallback.column-count.less
xmeter | __tool.fallback.column-count.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/__tool.fallback.flexbox.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.fallback.flexbox.less
xmeter | __tool.fallback.flexbox.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/__tool.fallback.gradient.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.fallback.gradient.less
xmeter | __tool.fallback.gradient.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/__tool.fallback.rotate.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.fallback.rotate.less
xmeter | __tool.fallback.rotate.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/__tool.fallback.transition.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.fallback.transition.less
xmeter | __tool.fallback.transition.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/__tool.module.borders.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.module.borders.less
xmeter | __tool.module.borders.less
\*################################*/
@import (reference) url('__tool.module.spacing.less');

Expand Down
2 changes: 1 addition & 1 deletion src/__tool.module.clearfix.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.module.clearfix.less
xmeter | __tool.module.clearfix.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/__tool.module.delims.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.module.delims.less
xmeter | __tool.module.delims.less
\*################################*/


Expand Down
10 changes: 6 additions & 4 deletions src/__tool.module.fontsize.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.module.fontsize.less
xmeter | __tool.module.fontsize.less
\*################################*/
@import (reference) url('__settings.less');

Expand All @@ -11,16 +11,18 @@
// Use this on elements with `display: block;` or `display: inline-block;` or anything
// that will affect vertical rhythm.
//
// ^params
// @ratio - the ratio of the new font size to `@fontsize_base`, i.e., the number of 'rem's
// @line_height_orig - (default: @xmeter_line_height) the `line-height` of the parent element
// @lines - (default: 1) the number of vrus each line of text will take up. should be a whole number to satisfy vertical rhythm.
// ^author
// : Chris Harvey
// ^updated
// : 2015-10-04
.font-size-block(@ratio; @line_height_orig: @xmeter_line_height) {
// : 2016-01-08
.font-size-block(@ratio; @line_height_orig: @xmeter_line_height; @lines: 1) {
#XMETER .VARS();
font-size: (@ratio * @1rem); // legacy browsers (see __settings for more info)
font-size: (@ratio * 1rem);
line-height: (@line_height_orig / @ratio);
line-height: ((@line_height_orig / @ratio) * @lines);
}
}
2 changes: 1 addition & 1 deletion src/__tool.module.spacing.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.module.spacing.less
xmeter | __tool.module.spacing.less
\*################################*/


Expand Down
14 changes: 10 additions & 4 deletions src/__tool.module.sprite.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.module.sprite.less
xmeter | __tool.module.sprite.less
\*################################*/


Expand All @@ -14,11 +14,17 @@
// ^author
// : Chris Harvey
// ^updated
// : 2015-10-12
.sprite(horizontal; @position; @iconsize; @iconpadd) {
// : 2016-01-19
.sprite(horizontal; @position; @iconsize; @iconpadd) when (@position > 1) {
background-position: ((@position - 1) * -(@iconsize + @iconpadd)) 0;
}
.sprite(vertical; @position; @iconsize; @iconpadd) {
.sprite(horizontal; @position; @iconsize; @iconpadd) when (@position == 1) {
background-position: 0 0;
}
.sprite(vertical; @position; @iconsize; @iconpadd) when (@position > 1) {
background-position: 0 ((@position - 1) * -(@iconsize + @iconpadd));
}
.sprite(vertical; @position; @iconsize; @iconpadd) when (@position == 1) {
background-position: 0 0;
}
}
2 changes: 1 addition & 1 deletion src/__tool.module.translucent.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
__tool.module.translucent.less
xmeter | __tool.module.translucent.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/_base.embedded.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.embedded.less
xmeter | _base.embedded.less
\*################################*/


Expand Down
6 changes: 3 additions & 3 deletions src/_base.forms.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.forms.less
xmeter | _base.forms.less
\*################################*/
@import (reference) url('__settings.less');
@import (reference) url('__tool.fallback.box-sizing.less');
Expand Down Expand Up @@ -39,14 +39,14 @@ button {
input:not([type="button"]):not([type="reset"]):not([type="submit"]),
textarea {
#XMETER .VARS();
#XMETER .font-size-block(@h6_font_size; @xmeter_line_height);
#XMETER .font-size-block(@xmeter_font_size_h6);
}

textarea {
width: 30rem;
#XMETER .VARS();
height: 6 * @xmeter_vru;
line-height: @xmeter_line_height; // simply looks better
line-height: @xmeter_line_height; // override browser-default (simply looks better)
}

input[type="button"],
Expand Down
2 changes: 1 addition & 1 deletion src/_base.generic.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.generic.less
xmeter | _base.generic.less
\*################################*/
@import (reference) url('__settings.less');
@import (reference) url('__tool.fallback.box-sizing.less');
Expand Down
2 changes: 1 addition & 1 deletion src/_base.grouping.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.grouping.less
xmeter | _base.grouping.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/_base.grouping.lists.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.grouping.lists.less
xmeter | _base.grouping.lists.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/_base.grouping.paras.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.grouping.paras.less
xmeter | _base.grouping.paras.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/_base.grouping.tables.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.grouping.tables.less
xmeter | _base.grouping.tables.less
\*################################*/


Expand Down
14 changes: 7 additions & 7 deletions src/_base.sections.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.sections.less
xmeter | _base.sections.less
\*################################*/
@import (reference) url('__settings.less');
@import (reference) url('__tool.module.spacing.less');
Expand Down Expand Up @@ -32,12 +32,12 @@ footer {
h1, h2, h3, h4, h5, h6 {
font-weight: 700;
}
h1 { #XMETER .VARS(); #XMETER .font-size-block(@h1_font_size); }
h2 { #XMETER .VARS(); #XMETER .font-size-block(@h2_font_size); }
h3 { #XMETER .VARS(); #XMETER .font-size-block(@h3_font_size); }
h4 { #XMETER .VARS(); #XMETER .font-size-block(@h4_font_size); }
h5 { #XMETER .VARS(); #XMETER .font-size-block(@h5_font_size); }
h6 { #XMETER .VARS(); #XMETER .font-size-block(@h6_font_size); }
h1 { #XMETER .VARS(); #XMETER .font-size-block(@xmeter_font_size_h1); }
h2 { #XMETER .VARS(); #XMETER .font-size-block(@xmeter_font_size_h2); }
h3 { #XMETER .VARS(); #XMETER .font-size-block(@xmeter_font_size_h3); }
h4 { #XMETER .VARS(); #XMETER .font-size-block(@xmeter_font_size_h4); }
h5 { #XMETER .VARS(); #XMETER .font-size-block(@xmeter_font_size_h5); }
h6 { #XMETER .VARS(); #XMETER .font-size-block(@xmeter_font_size_h6); }

h1 {
margin-top: 0; // undo Normalize
Expand Down
2 changes: 1 addition & 1 deletion src/_base.text.data.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.text.data.less
xmeter | _base.text.data.less
\*################################*/


Expand Down
2 changes: 1 addition & 1 deletion src/_base.text.doctext.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.text.doctext.less
xmeter | _base.text.doctext.less
\*################################*/
@import (reference) url('__tool.module.delims.less');

Expand Down
2 changes: 1 addition & 1 deletion src/_base.text.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.text.less
xmeter | _base.text.less
\*################################*/


Expand Down
9 changes: 4 additions & 5 deletions src/_base.text.links.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.text.links.less
xmeter | _base.text.links.less
\*################################*/


Expand All @@ -13,8 +13,7 @@ a {
// so keeping it under `a`.
}
a:not([href]) {
opacity: 0.5;
}
// `a[href]` selects both `a:link` and `a:visited`. all three have the same specificity (which is 11)
a[href] {
@media screen {
opacity: 0.5;
}
}
2 changes: 1 addition & 1 deletion src/_base.text.stress.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*################################*\
_base.text.stress.less
xmeter | _base.text.stress.less
\*################################*/


Expand Down
Loading

0 comments on commit 44b0757

Please sign in to comment.