diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..aa2f68fcf
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,7 @@
+[*]
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+charset = utf-8
+indent_style = tab
+indent_size = 4
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..e373b43d3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+node_modules
+normalize.css.map
+normalize.css
diff --git a/README.md b/README.md
index 19b2fc74c..b4bf30192 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,12 @@
-# normalize.css v1.0.0
+# `_normalize.scss` v2.3.1
-Normalize.css is a customisable CSS file that makes browsers render all
-elements more consistently and in line with modern standards. We researched the
+`_normalize.scss` is a customisable Sass file that makes browsers render all
+elements more consistently and in line with modern standards--derived from
+Nicholas Gallagher's `Normalize.css` project. It is the result of researching the
differences between default browser styles in order to precisely target only
the styles that need normalizing.
-[Check out the demo](http://necolas.github.com/normalize.css/1.0.0/test.html)
+[Check out the demo](https://darcmattr.github.io/_normalize.scss/test.html)
## What does it do?
@@ -17,26 +18,74 @@ the styles that need normalizing.
## How to use it
-Normalize.css is intended to be used as an alternative to CSS resets.
+I intend `_normalize.scss` to be used as a declaration of many default styles
+that I used in Ayn Rand Institute web projects, and for working around many
+browser quirks. It has been adapted for use as an `@import` into a site's
+stylesheet, and compiled in using [Sass][], using a subset of Sass that can be
+compiled by [libsass][]. An `npm` build script for making a standalone version
+is provided, if you wish to make a standalone version.
-It's suggested that you read the `normalize.css` file and consider customising
+The following variables are used throughout the code, and you can override them
+in your own loader stylesheets:
+
+```SCSS
+$base-font-size: 16px !default; // otherwise inherited from _rem library
+$text-color: #333 !default;
+$background-color: #ccc !default;
+$line-height-multiplier: 1.2 !default;
+$lh: $line-height-multiplier * 1rem !default;
+```
+
+## Dependencies:
+
+[Node.JS][] and its package manager, [npm][]. Install Node.JS via whatever
+method you choose (too much to list here, bleh).
+
+Running `npm install` in the project directory will also build the CSS.
+
+## For the future
+
+This file is becoming less of a normalizer, and more of a "framework", as my
+opinions about the margins/padding and base appearance of some links are
+creeping in. I re-sync with Necolas' project whenever I judge that another
+default or cleanup is needed.
+
+### From Nicholas Gallagher (necolas):
+
+`_normalize.scss` is intended to be used as an alternative to CSS resets.
+
+It's suggested that you read the `_normalize.scss` file and consider customising
it to meet your needs. Alternatively, include the file in your project and
override the defaults later in your CSS.
## Browser support
+I am tracking the v1 series, because I want to keep some old browser support
+around, these old browsers include:
+
* Google Chrome
-* Mozilla Firefox 3+
-* Apple Safari 4+
+* Mozilla Firefox 3+ (the Long-Term Support release of Firefox is based on v3)
+* Apple Safari 4+ (because some people haven't upgraded their iOS version)
* Opera 10+
-* Internet Explorer 6+
+* Internet Explorer 6+ (better in here than in my main CSS files)
## Contribute
-Please read my [issue
-guidelines](https://github.com/necolas/issue-guidelines).
+Please contribute to the upstream project: Please read the [issue
+guidelines][]. Issue reports to me are welcome, but either address a matter of
+my personal taste or site standards, or ultimately rely on the work of the
+upstream maintainers. Only one of those is a "public" problem (hint, it's
+upstream).
## Acknowledgements
-Normalize.css is a project by [Nicolas Gallagher](http://github.com/necolas)
-and [Jonathan Neal](http://github.com/jonathantneal).
+`_normalize.css` is adapted from Normalize.css, which is a project by [Nicolas
+Gallagher][] and [Jonathan Neal][].
+
+[Jonathan Neal]: http://github.com/jonathantneal
+[Nicolas Gallagher]: http://github.com/necolas
+[issue guidelines]: https://github.com/necolas/issue-guidelines
+[Sass]: https://sass-lang.com
+[libsass]: http://sass-lang.com/libsass
+[Node.JS]: https://nodejs.org/
+[npm]: https://www.npmjs.com/
diff --git a/_normalize.scss b/_normalize.scss
new file mode 100644
index 000000000..01a2d6260
--- /dev/null
+++ b/_normalize.scss
@@ -0,0 +1,637 @@
+/*! v2.3.1, based on normalize.css v3.0.1 | MIT License | git.io/normalize */
+
+/* =============================================================================
+Mixins
+========================================================================== */
+$base-font-size: 16px !default; // otherwise inherited from _rem
+$text-color: #333 !default;
+$background-color: #ccc !default;
+$line-height-multiplier: 1.2 !default;
+$lh: $line-height-multiplier * 1rem !default;
+
+@import "assets/_rem.scss";
+
+/* ==========================================================================
+HTML5 display definitions
+========================================================================== */
+
+/*
+ * Corrects `block` display not defined in IE 6/7/8/9 & Firefox 3.
+ */
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+ display: block;
+}
+
+/*
+ * Corrects `inline-block` display not defined in IE 6/7/8/9 & Firefox 3.
+ */
+audio,
+canvas,
+progress,
+video {
+ display: inline-block;
+ vertical-align: baseline;
+ *display: inline;
+ *zoom: 1;
+}
+
+/*
+ * Prevents modern browsers from displaying `audio` without controls.
+ * Remove excess height in iOS5 devices.
+ */
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+
+/*
+ * Addresses styling for `hidden` attribute not present in IE 7/8/9, Firefox 3, Safari 4.
+ * Known issue: no IE 6 support.
+ */
+[hidden],
+template {
+ display: none;
+}
+
+/* ==========================================================================
+Base
+========================================================================== */
+
+/*
+ * 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using
+ * `em` units.
+ * 2. Prevents iOS text size adjust after orientation change, without disabling
+ * user zoom.
+ */
+html {
+ font-size: percentage( $base-font-size / $browser-default-font-size ); /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+ -ms-text-size-adjust: 100%; /* 2 */
+ font-family: sans-serif;
+ color: $text-color;
+ background-color: $background-color;
+}
+
+/*
+ * Addresses `font-family` inconsistency between `textarea` and other form
+ * elements.
+ */
+button,
+input[type=submit],
+select {
+ font-family: sans-serif;
+}
+
+/*
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
+ * All other form control elements do not inherit `text-transform` values.
+ * Correct `button` style inheritance in Firefox, IE 8+, and Opera
+ * Correct `select` style inheritance in Firefox.
+ */
+button,
+select {
+ text-transform: none;
+}
+
+input,
+textarea {
+ font-family: monospace;
+}
+
+/*
+ * Remove default margin.
+ */
+body {
+ margin: 0;
+}
+
+/* ==========================================================================
+Links
+========================================================================== */
+
+/*
+ * Addresses `outline` inconsistency between Chrome and other browsers.
+ */
+a {
+ &:focus {
+ outline: thin dotted;
+ }
+ &:active, &:hover {
+ outline: 0;
+ }
+ /* TODO: introduce more filetype icons, and split off into another file */
+ &[href$=pdf] { /*! SVG from http://jozef89.deviantart.com/art/Free-document-icons-445521778 */
+ position: relative;
+ @include rem( padding-right, 1.06666667rem );
+ &:after {
+ content: "";
+ position: absolute;
+ right: 0;
+ display: inline-block;
+ @include rem( height, 1.06666667rem );
+ @include rem( width, 1.06666667rem );
+ padding: 0;
+ margin: 0;
+ background-image: url('assets/file-icon-pdf.svg');
+ background-position: 0 0;
+ background-repeat: no-repeat;
+ background-size: 100%;
+ }
+ }
+}
+
+/*
+ * Improves readability when focused and also mouse hovered in all browsers.
+ */
+
+/* ==========================================================================
+Typography
+========================================================================== */
+
+/*
+ * Addresses font sizes and margins set differently in IE 6/7.
+ * Addresses font sizes within `section` and `article` in Firefox 4+, Chrome, Safari 5.
+ */
+
+h1 {
+ @include rem( font-size, 1.5*$lh );
+ @include rem( line-height, 1.5*$lh );
+ @include rem( margin, 1*$lh 0px 0.5*$lh );
+}
+
+h2 {
+ @include rem( font-size, 5/4*$lh );
+ @include rem( line-height, 1.5*$lh );
+ @include rem( margin, 1*$lh 0px 0.5*$lh );
+}
+
+h3 {
+ @include rem( font-size, 1.16667rem );
+ @include rem( line-height, 1.5*$lh );
+ @include rem( margin, 1*$lh 0px 1.5*$lh );
+}
+
+h4 {
+ @include rem( font-size, 5/6*$lh );
+ @include rem( line-height, 1.5*$lh );
+ @include rem( margin, 1*$lh 0px 1.5*$lh );
+}
+
+h5 {
+ @include rem( font-size, 25/36*$lh );
+ @include rem( line-height, 1.5*$lh );
+ @include rem( margin, 1*$lh 0px 1.5*$lh );
+}
+
+h6 {
+ @include rem( font-size, 24/15*$lh );
+ @include rem( line-height, 1.5*$lh );
+ @include rem( margin, $lh 0px 1.5*$lh);
+}
+
+/*
+ * Addresses styling not present in IE 7/8/9, Safari 5, Chrome.
+ */
+
+abbr[title] {
+border-bottom: 1px dotted; }
+
+blockquote {
+ @include rem( margin, $lh 0px );
+ @include rem( padding, 0px 0px 0px .5*$lh);
+ border: 0 solid lighten( $text-color, 20% );
+ @include rem( border-left-width, .5*$lh );
+}
+
+/**
+ * Address differences between Firefox and other browsers.
+ */
+
+hr {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0;
+}
+
+/*
+ * Addresses styling not present in IE 6/7/8/9.
+ */
+
+mark {
+ background-color: lighten( $background-color, 20% );
+ color: darken( $text-color, 20% );
+}
+
+/*
+ * Addresses margins set differently in IE 6/7.
+ */
+
+p,
+pre {
+ @include rem( margin, $lh 0px );
+}
+
+p {
+ hyphens: auto;
+ word-break: normal;
+}
+
+/*
+ * 1. Corrects font family set oddly in IE 6, Safari 4/5, Chrome.
+ * 2. Address odd `em`-unit font size rendering in all browsers.
+ */
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ _font-family: 'courier new', monospace; /* 1 */
+ @include rem( font-size, 1rem ); /* 2 */
+ @include rem( margin, $lh 0px );
+}
+
+em {
+ font-style: italic;
+ letter-spacing: .5px; /* my own personal preference */
+}
+
+cite,
+i,
+dfn {
+ font-style: italic;
+}
+
+strong,
+b {
+ font-weight: 700;
+}
+
+/*
+ * Improves readability of pre-formatted text in all browsers.
+ * Contain overflow in all browsers
+ */
+
+pre {
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ overflow: auto;
+}
+
+/*
+ * Addresses CSS quotes not supported in IE 6/7.
+ */
+
+q {
+ quotes: none;
+ &:before, &:after {
+ content: '';
+ content: none;
+ }
+}
+
+/*
+ * Addresses `quotes` property not supported in Safari 4.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/*
+ * Prevents `sub` and `sup` affecting `line-height` in all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+/* ==========================================================================
+Lists
+========================================================================== */
+
+/*
+ * Addresses margins set differently in IE 6/7.
+ */
+
+dl,
+menu,
+ol,
+ul {
+ @include rem( margin, $lh 0px );
+}
+
+dt {
+
+}
+
+dd {
+ @include rem( margin, 0px 0px $lh $lh );
+}
+
+/*
+ * Addresses paddings set differently in IE 6/7.
+ */
+
+menu,
+ol,
+ul {
+ list-style-position: outside;
+
+ @include rem( padding, 0px 0px 0px $lh );
+}
+
+ol {
+ list-style-type: decimal;
+ ol {
+ list-style-type: upper-alpha;
+ ol {
+ list-style-type: lower-alpha;
+ }
+ }
+}
+
+ul {
+ list-style-type: disc;
+ ul {
+ list-style-type: square;
+ ul {
+ list-style-type: circle;
+ }
+ }
+}
+
+li {
+ @include rem( margin, $lh 0px );
+}
+
+nav {
+ li {
+ list-style: none;
+ margin: 0;
+ }
+}
+
+/*
+ * Corrects list images handled incorrectly in IE 7.
+ */
+
+nav {
+ ul,
+ ol {
+ list-style: none;
+ list-style-image: none;
+ }
+}
+
+/* ==========================================================================
+Embedded content
+========================================================================== */
+
+/*
+ * 1. Removes border when inside `a` element in IE 6/7/8/9, Firefox 3.
+ * 2. Improves image quality when scaled in IE 7.
+ */
+
+img {
+ border: 0; /* 1 */
+ -ms-interpolation-mode: bicubic; /* 2 */
+}
+
+/*
+ * Corrects overflow displayed oddly in IE 9.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* ==========================================================================
+Figures & Forms
+========================================================================== */
+
+/*
+ * Addresses margin not present in IE 6/7/8/9, Safari 5, Opera 11.
+ * + Corrects margin displayed oddly in IE 6/7.
+ */
+
+form {
+ margin: 0;
+}
+
+figure {
+ @include rem( margin, $lh 2*$lh )
+}
+
+
+/*
+ * Define consistent border, margin, and padding.
+ */
+fieldset {
+ border: 1px solid lighten( $text-color, 20% );
+ margin: 0px 2px;
+ @include rem( padding, 0.35rem 0.625rem 0.75rem );
+}
+
+/*
+ * 1. Corrects color not being inherited in IE 6/7/8/9.
+ * 2. Corrects text not wrapping in Firefox 3.
+ * 3. Corrects alignment displayed oddly in IE 6/7.
+ * 4. Allows for IE 8 to line-wrap too.
+ * @link http://www.456bereastreet.com/archive/201210/how_to_line_wrap_text_in_legend_elements_even_in_ie/
+ */
+legend {
+ border: 0; /* 1 */
+ padding: 0;
+ white-space: normal; /* 2 */
+ *margin-left: -7px; /* 3 */
+ display: table; /* 4 */
+}
+/*
+ * 1. Corrects font properties not being inherited in all browsers.
+ * 2. Addresses margins set differently in IE 6/7, Firefox 3+, Safari 5, Chrome.
+ * 3. Improves appearance and consistency in all browsers.
+ * 4. Correct color not being inherited.
+ * Known issue: affects color of disabled elements.
+ */
+button,
+input,
+select,
+textarea {
+ font: inherit; /* 1 */
+ margin: 0; /* 2 */
+ vertical-align: baseline; /* 3 */
+ *vertical-align: middle; /* 3 */
+ color: inherit; /* 4 */
+}
+
+/*
+ * Addresses Firefox 3/4 setting `line-height` on `input` using `!important` in the
+ * UA stylesheet.
+ */
+button,
+input {
+ line-height: normal;
+}
+
+/*
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ * and `video` controls.
+ * 2. Corrects inability to style clickable `input` types in iOS.
+ * 3. Improves usability and consistency of cursor style between image-type
+ * `input` and others.
+ * 4. Removes inner spacing in IE 7 without affecting normal text inputs.
+ * Known issue: inner spacing remains in IE 6.
+ */
+.pointy {
+ cursor: pointer;
+}
+
+label {
+ @extend .pointy;
+}
+
+button,
+html input[type="button"] /* 1 */ {
+ -webkit-appearance: button; /* 2 */
+ @extend .pointy; /* 3 */
+ *overflow: visible; /* 4 */
+}
+
+input {
+ &[type="reset"], &[type="submit"] {
+ -webkit-appearance: button; /* 2 */
+ @extend .pointy; /* 3 */
+ *overflow: visible; /* 4 */
+ }
+}
+
+button,
+html input {
+ /*
+ * A. Re-set default cursor for disabled elements.
+ */
+&[disabled] {
+ cursor: default; /* A. */
+}
+}
+
+input {
+ /*
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet.
+ */
+line-height: normal;
+/*
+ * 1. Addresses box sizing set to content-box in IE 8/9.
+ * 2. Removes excess padding in IE 8/9.
+ * 3. Removes excess padding in IE 7.
+ * Known issue: excess padding remains in IE 6.
+ */
+&[type="checkbox"], &[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+ *height: 13px; /* 3 */
+ *width: 13px; /* 3 */
+ }
+ /*
+ * Fix the cursor style for WebKit's increment/decrement buttons. For certain
+ * `font-size` values of the `input`, it causes the cursor style of the
+ * decrement button to change from `default` to `text`.
+ */
+&[type="number"] {
+ &::-webkit-inner-spin-button, &::-webkit-outer-spin-button {
+ height: auto;
+ }
+}
+/*
+ * 1. Addresses `appearance` set to `searchfield` in Safari 5, Chrome.
+ * 2. Addresses `box-sizing` set to `border-box` in Safari 5, Chrome (include `-moz`
+ * to future-proof).
+ */
+&[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box; /* 2 */
+ box-sizing: content-box;
+ /*
+ * Removes inner padding and search cancel button in Safari 5, Chrome on OS X.
+ */
+&::-webkit-search-cancel-button, &::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+ }
+}
+
+/*
+ * Removes inner padding and border in Firefox 3+.
+ */
+button,
+input {
+ &::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+ }
+}
+
+/*
+ * 1. Removes default vertical scrollbar in IE 6/7/8/9.
+ * 2. Improves readability and alignment in all browsers.
+ */
+textarea {
+ overflow: auto; /* 1 */
+ vertical-align: top; /* 2 */
+}
+
+/*
+ * Don't inherit the `font-weight` (applied by a rule above).
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ */
+
+optgroup {
+ font-weight: 700;
+}
+
+/* ==========================================================================
+Tables
+========================================================================== */
+
+/*
+ * Remove most spacing between table cells.
+ */
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+td,
+th {
+ padding: 0;
+}
+
+iframe {
+ border: 0;
+}
diff --git a/assets/_rem.scss b/assets/_rem.scss
new file mode 100644
index 000000000..fdb67417d
--- /dev/null
+++ b/assets/_rem.scss
@@ -0,0 +1,123 @@
+// from https://github.com/ry5n/rem, commit
+// 281dea4f468c531542d41254abf032f039538ef8
+
+// @private Default font-size for all browsers
+$browser-default-font-size: 16px;
+
+// Base font size in pixels, if not already defined.
+// Should be the same as the font-size of the html element.
+$base-font-size: 16px !default;
+
+// Whether to output fallback values in px when outputting rems.
+$rem-with-px-fallback: true !default;
+
+// Convert any CSS or value to any other.
+@function convert-length($length, $to-unit, $from-context: $base-font-size, $to-context: $from-context) {
+ $from-unit: unit($length);
+
+ // Optimize for cases where from and to may accidentally be the same.
+ @if $from-unit == $to-unit { @return $length; }
+ @if unit($from-context) != 'px' { @warn "Paremeter $from-context must resolve to a value in pixel units."; }
+ @if unit($to-context) != 'px' { @warn "Parameter $to-context must resolve to a value in pixel units."; }
+
+ // Fixed ratios
+ // https://developer.mozilla.org/en/CSS/length
+ // http://dev.w3.org/csswg/css3-values/#absolute-lengths
+ $px-per-in: 96px / 1in;
+ $px-per-mm: 96px / 25.4mm;
+ $px-per-cm: 96px / 2.54cm;
+ $px-per-pt: 4px / 3pt;
+ $px-per-pc: 16px / 1pc;
+
+ // Variables to store actual convesion ratios
+ $px-per-from-unit: 1;
+ $px-per-to-unit: 1;
+
+ @if $from-unit != 'px' {
+ @if $from-unit == 'em' { $px-per-from-unit: $from-context / 1em }
+ @else if $from-unit == 'rem' { $px-per-from-unit: $base-font-size / 1rem }
+ @else if $from-unit == '%' { $px-per-from-unit: $from-context / 100% }
+ @else if $from-unit == 'ex' { $px-per-from-unit: $from-context / 2ex }
+ @else if $from-unit == 'in' { $px-per-from-unit: $px-per-in }
+ @else if $from-unit == 'mm' { $px-per-from-unit: $px-per-mm }
+ @else if $from-unit == 'cm' { $px-per-from-unit: $px-per-cm }
+ @else if $from-unit == 'pt' { $px-per-from-unit: $px-per-pt }
+ @else if $from-unit == 'pc' { $px-per-from-unit: $px-per-pc }
+ @else if $to-unit == 'ch' or $to-unit == 'vw' or $to-unit == 'vh' or $to-unit == 'vmin' {
+ @warn "#{$from-unit} units can't be reliably converted; Returning original value.";
+ @return $length;
+ }
+ @else {
+ @warn "#{$from-unit} is an unknown length unit. Returning original value.";
+ @return $length;
+ }
+ }
+
+ @if $to-unit != 'px' {
+ @if $to-unit == 'em' { $px-per-to-unit: $to-context / 1em }
+ @else if $to-unit == 'rem' { $px-per-to-unit: $base-font-size / 1rem }
+ @else if $to-unit == '%' { $px-per-to-unit: $to-context / 100% }
+ @else if $to-unit == 'ex' { $px-per-to-unit: $to-context / 2ex }
+ @else if $to-unit == 'in' { $px-per-to-unit: $px-per-in }
+ @else if $to-unit == 'mm' { $px-per-to-unit: $px-per-mm }
+ @else if $to-unit == 'cm' { $px-per-to-unit: $px-per-cm }
+ @else if $to-unit == 'pt' { $px-per-to-unit: $px-per-pt }
+ @else if $to-unit == 'pc' { $px-per-to-unit: $px-per-px }
+ @else if $to-unit == 'ch' or $to-unit == 'vw' or $to-unit == 'vh' or $to-unit == 'vmin' {
+ @warn "#{$to-unit} units can't be reliably converted; Returning original value.";
+ @return $length;
+ }
+ @else {
+ @warn "#{$to-unit} is an unknown length unit. Returning original value.";
+ @return $length;
+ }
+ }
+ @return $length * $px-per-from-unit / $px-per-to-unit;
+}
+
+// For the given property, use rem units with px as a fallback value for older
+// browsers.
+//
+// $property - The css property name.
+// $values - The value (or space-separated list of values) for the property.
+// $use-px-fallback - Boolean, default: true; whether to use pixel fallback values
+//
+@mixin rem($property, $values, $use-px-fallback: $rem-with-px-fallback) {
+ // Create a couple of empty lists as output buffers.
+ $px-values: ();
+ $rem-values: ();
+
+ // Ensure $values is a list.
+ @if type-of($values) != 'list' {
+ $values: join((), $values);
+ }
+
+ // Loop through the $values list
+ @each $value in $values {
+ // For each property value, if it's in rem or px, derive both rem and
+ // px values for it and add those to the end of the appropriate buffer.
+ // Ensure all pixel values are rounded to the nearest pixel.
+ @if type-of($value) == number and not unitless($value) and (unit($value) == px or unit($value) == rem) {
+ @if unit($value) == px {
+ $px-values: join($px-values, round($value));
+ $rem-values: join($rem-values, convert-length($value, rem));
+ }
+ @else {
+ $px-values: join($px-values, round(convert-length($value, px)));
+ $rem-values: join($rem-values, $value);
+ }
+ }
+ @else {
+ $px-values: join($px-values, $value);
+ $rem-values: join($rem-values, $value);
+ }
+ }
+
+ // Use pixel fallback for browsers that don't understand rem units.
+ @if $use-px-fallback {
+ #{$property}: $px-values;
+ }
+
+ // Use rem values for everyone else (overrides pixel values).
+ #{$property}: $rem-values;
+}
diff --git a/assets/file-icon-pdf.svg b/assets/file-icon-pdf.svg
new file mode 100644
index 000000000..3f974eee0
--- /dev/null
+++ b/assets/file-icon-pdf.svg
@@ -0,0 +1,6 @@
+
diff --git a/normalize.css b/normalize.css
deleted file mode 100644
index f3e29ec47..000000000
--- a/normalize.css
+++ /dev/null
@@ -1,500 +0,0 @@
-/*! normalize.css v1.0.0 | MIT License | git.io/normalize */
-
-/* ==========================================================================
- HTML5 display definitions
- ========================================================================== */
-
-/*
- * Corrects `block` display not defined in IE 6/7/8/9 and Firefox 3.
- */
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-nav,
-section,
-summary {
- display: block;
-}
-
-/*
- * Corrects `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
- */
-
-audio,
-canvas,
-video {
- display: inline-block;
- *display: inline;
- *zoom: 1;
-}
-
-/*
- * Prevents modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
- */
-
-audio:not([controls]) {
- display: none;
- height: 0;
-}
-
-/*
- * Addresses styling for `hidden` attribute not present in IE 7/8/9, Firefox 3,
- * and Safari 4.
- * Known issue: no IE 6 support.
- */
-
-[hidden] {
- display: none;
-}
-
-/* ==========================================================================
- Base
- ========================================================================== */
-
-/*
- * 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using
- * `em` units.
- * 2. Prevents iOS text size adjust after orientation change, without disabling
- * user zoom.
- */
-
-html {
- font-size: 100%; /* 1 */
- -webkit-text-size-adjust: 100%; /* 2 */
- -ms-text-size-adjust: 100%; /* 2 */
-}
-
-/*
- * Addresses `font-family` inconsistency between `textarea` and other form
- * elements.
- */
-
-html,
-button,
-input,
-select,
-textarea {
- font-family: sans-serif;
-}
-
-/*
- * Addresses margins handled incorrectly in IE 6/7.
- */
-
-body {
- margin: 0;
-}
-
-/* ==========================================================================
- Links
- ========================================================================== */
-
-/*
- * Addresses `outline` inconsistency between Chrome and other browsers.
- */
-
-a:focus {
- outline: thin dotted;
-}
-
-/*
- * Improves readability when focused and also mouse hovered in all browsers.
- */
-
-a:active,
-a:hover {
- outline: 0;
-}
-
-/* ==========================================================================
- Typography
- ========================================================================== */
-
-/*
- * Addresses font sizes and margins set differently in IE 6/7.
- * Addresses font sizes within `section` and `article` in Firefox 4+, Safari 5,
- * and Chrome.
- */
-
-h1 {
- font-size: 2em;
- margin: 0.67em 0;
-}
-
-h2 {
- font-size: 1.5em;
- margin: 0.83em 0;
-}
-
-h3 {
- font-size: 1.17em;
- margin: 1em 0;
-}
-
-h4 {
- font-size: 1em;
- margin: 1.33em 0;
-}
-
-h5 {
- font-size: 0.83em;
- margin: 1.67em 0;
-}
-
-h6 {
- font-size: 0.75em;
- margin: 2.33em 0;
-}
-
-/*
- * Addresses styling not present in IE 7/8/9, Safari 5, and Chrome.
- */
-
-abbr[title] {
- border-bottom: 1px dotted;
-}
-
-/*
- * Addresses style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
- */
-
-b,
-strong {
- font-weight: bold;
-}
-
-blockquote {
- margin: 1em 40px;
-}
-
-/*
- * Addresses styling not present in Safari 5 and Chrome.
- */
-
-dfn {
- font-style: italic;
-}
-
-/*
- * Addresses styling not present in IE 6/7/8/9.
- */
-
-mark {
- background: #ff0;
- color: #000;
-}
-
-/*
- * Addresses margins set differently in IE 6/7.
- */
-
-p,
-pre {
- margin: 1em 0;
-}
-
-/*
- * Corrects font family set oddly in IE 6, Safari 4/5, and Chrome.
- */
-
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, serif;
- _font-family: 'courier new', monospace;
- font-size: 1em;
-}
-
-/*
- * Improves readability of pre-formatted text in all browsers.
- */
-
-pre {
- white-space: pre;
- white-space: pre-wrap;
- word-wrap: break-word;
-}
-
-/*
- * Addresses CSS quotes not supported in IE 6/7.
- */
-
-q {
- quotes: none;
-}
-
-/*
- * Addresses `quotes` property not supported in Safari 4.
- */
-
-q:before,
-q:after {
- content: '';
- content: none;
-}
-
-small {
- font-size: 75%;
-}
-
-/*
- * Prevents `sub` and `sup` affecting `line-height` in all browsers.
- */
-
-sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
-}
-
-sup {
- top: -0.5em;
-}
-
-sub {
- bottom: -0.25em;
-}
-
-/* ==========================================================================
- Lists
- ========================================================================== */
-
-/*
- * Addresses margins set differently in IE 6/7.
- */
-
-dl,
-menu,
-ol,
-ul {
- margin: 1em 0;
-}
-
-dd {
- margin: 0 0 0 40px;
-}
-
-/*
- * Addresses paddings set differently in IE 6/7.
- */
-
-menu,
-ol,
-ul {
- padding: 0 0 0 40px;
-}
-
-/*
- * Corrects list images handled incorrectly in IE 7.
- */
-
-nav ul,
-nav ol {
- list-style: none;
- list-style-image: none;
-}
-
-/* ==========================================================================
- Embedded content
- ========================================================================== */
-
-/*
- * 1. Removes border when inside `a` element in IE 6/7/8/9 and Firefox 3.
- * 2. Improves image quality when scaled in IE 7.
- */
-
-img {
- border: 0; /* 1 */
- -ms-interpolation-mode: bicubic; /* 2 */
-}
-
-/*
- * Corrects overflow displayed oddly in IE 9.
- */
-
-svg:not(:root) {
- overflow: hidden;
-}
-
-/* ==========================================================================
- Figures
- ========================================================================== */
-
-/*
- * Addresses margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
- */
-
-figure {
- margin: 0;
-}
-
-/* ==========================================================================
- Forms
- ========================================================================== */
-
-/*
- * Corrects margin displayed oddly in IE 6/7.
- */
-
-form {
- margin: 0;
-}
-
-/*
- * Define consistent border, margin, and padding.
- */
-
-fieldset {
- border: 1px solid #c0c0c0;
- margin: 0 2px;
- padding: 0.35em 0.625em 0.75em;
-}
-
-/*
- * 1. Corrects color not being inherited in IE 6/7/8/9.
- * 2. Corrects text not wrapping in Firefox 3.
- * 3. Corrects alignment displayed oddly in IE 6/7.
- */
-
-legend {
- border: 0; /* 1 */
- padding: 0;
- white-space: normal; /* 2 */
- *margin-left: -7px; /* 3 */
-}
-
-/*
- * 1. Corrects font size not being inherited in all browsers.
- * 2. Addresses margins set differently in IE 6/7, Firefox 3+, Safari 5,
- * and Chrome.
- * 3. Improves appearance and consistency in all browsers.
- */
-
-button,
-input,
-select,
-textarea {
- font-size: 100%; /* 1 */
- margin: 0; /* 2 */
- vertical-align: baseline; /* 3 */
- *vertical-align: middle; /* 3 */
-}
-
-/*
- * Addresses Firefox 3+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
- */
-
-button,
-input {
- line-height: normal;
-}
-
-/*
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- * and `video` controls.
- * 2. Corrects inability to style clickable `input` types in iOS.
- * 3. Improves usability and consistency of cursor style between image-type
- * `input` and others.
- * 4. Removes inner spacing in IE 7 without affecting normal text inputs.
- * Known issue: inner spacing remains in IE 6.
- */
-
-button,
-html input[type="button"], /* 1 */
-input[type="reset"],
-input[type="submit"] {
- -webkit-appearance: button; /* 2 */
- cursor: pointer; /* 3 */
- *overflow: visible; /* 4 */
-}
-
-/*
- * Re-set default cursor for disabled elements.
- */
-
-button[disabled],
-input[disabled] {
- cursor: default;
-}
-
-/*
- * 1. Addresses box sizing set to content-box in IE 8/9.
- * 2. Removes excess padding in IE 8/9.
- * 3. Removes excess padding in IE 7.
- * Known issue: excess padding remains in IE 6.
- */
-
-input[type="checkbox"],
-input[type="radio"] {
- box-sizing: border-box; /* 1 */
- padding: 0; /* 2 */
- *height: 13px; /* 3 */
- *width: 13px; /* 3 */
-}
-
-/*
- * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
- * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
- * (include `-moz` to future-proof).
- */
-
-input[type="search"] {
- -webkit-appearance: textfield; /* 1 */
- -moz-box-sizing: content-box;
- -webkit-box-sizing: content-box; /* 2 */
- box-sizing: content-box;
-}
-
-/*
- * Removes inner padding and search cancel button in Safari 5 and Chrome
- * on OS X.
- */
-
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
-}
-
-/*
- * Removes inner padding and border in Firefox 3+.
- */
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
- padding: 0;
-}
-
-/*
- * 1. Removes default vertical scrollbar in IE 6/7/8/9.
- * 2. Improves readability and alignment in all browsers.
- */
-
-textarea {
- overflow: auto; /* 1 */
- vertical-align: top; /* 2 */
-}
-
-/* ==========================================================================
- Tables
- ========================================================================== */
-
-/*
- * Remove most spacing between table cells.
- */
-
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
diff --git a/package.json b/package.json
new file mode 100644
index 000000000..30afb7fa1
--- /dev/null
+++ b/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "darcmattr-normalize-scss",
+ "version": "2.2.0",
+ "description": "Sass version of normalize.css, with typographic vertical rhythm",
+ "style": "normalize.css",
+ "files": [
+ "_normalize.scss",
+ "normalize.css",
+ "normalize.css.map",
+ "README.md",
+ "LICENSE.md",
+ "assets/",
+ "test.html"
+ ],
+ "nodemonConfig": {
+ "watch": ".",
+ "ext": "scss",
+ "exec": "npm run build"
+ },
+ "devDependencies": {
+ "css-b64-images": "^0.2.5",
+ "node-sass": "^4.14.1",
+ "nodemon": "^2.0.4"
+ },
+ "scripts": {
+ "build": "npm run inline-images && node-sass --output-style=compressed --source-map=true _normalize-inlined.scss.tmp normalize.css && npm run clean",
+ "inline-images": "css-b64-images _normalize.scss > _normalize-inlined.scss.tmp",
+ "clean": "rm _normalize-inlined.scss.tmp",
+ "install": "npm run build",
+ "watch": "nodemon",
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/DArcMattr/_normalize.scss.git"
+ },
+ "keywords": [
+ "Sass",
+ "normalize"
+ ],
+ "author": "Necolas",
+ "main": "_normalize.scss",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/DArcMattr/_normalize.scss/issues"
+ },
+ "homepage": "http://darcmattr.github.io/_normalize.scss/",
+ "dependencies": {}
+}
diff --git a/test.html b/test.html
index 016f9af25..3ff73e209 100644
--- a/test.html
+++ b/test.html
@@ -1,350 +1,508 @@
-
-
-
- Normalize CSS
-
-
-
-
-
-
Heading 1
-
Heading 2
-
Heading 3
-
Heading 4
-
Heading 5
-
Heading 6
-
-
-
Heading 1 (in section)
-
Heading 2 (in section)
-
Heading 3 (in section)
-
Heading 4 (in section)
-
Heading 5 (in section)
-
Heading 6 (in section)
-
-
-
-
Heading 1 (in article)
-
Heading 2 (in article)
-
Heading 3 (in article)
-
Heading 4 (in article)
-
Heading 5 (in article)
-
Heading 6 (in article)
-
-
-
-
-
Heading 1 (in hgroup)
-
Heading 2 (in hgroup)
-
-
-
-
-
Text-level semantics
-
-
This should be hidden in all browsers, apart from IE6
-
-
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.
-
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.
-
- Address: somewhere, world
-
-
- The a element example
- The abbr element and abbr element with title examples
- The b element example
- The cite element example
- The code element example
- The del element example
- The dfn element and dfn element with title examples
- The em element example
- The i element example
- The img element example
- The ins element example
- The kbd element example
- The mark element example
- The q element inside a q element example
- The s element example
- The samp element example
- The small element example
- The span element example
- The strong element example
- The sub element example
- The sup element example
- The var element example
- The u element example
-
-
-
Embedded content
-
-
audio
-
-
-
-
-
img
-
-
-
-
-
svg
-
-
-
-
video
-
-
-
-
-
Interactive content
-
-
details / summary
-
- More info
-
Additional information
-
-
Point 1
-
Point 2
-
-
-
-
Grouping content
-
-
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.
-
-
pre
-
-
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et me.