Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/JohnAlbin/normalize-scss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnAlbin <virtually.johnalbin@gmail.com>2017-05-07 15:20:04 +0300
committerJohnAlbin <virtually.johnalbin@gmail.com>2017-05-10 16:44:44 +0300
commit38f8b3fc29ff97cd3dd78d79a8f7f92f2fb9817e (patch)
treef0d42a254b27102d979545f17ad0915619671666
parent52fdb1a1d882b7bc462c81151ab70077d47421a3 (diff)
Remove opinionated font-family rule on html element.
-rw-r--r--fork-versions/default/_normalize.scss20
-rw-r--r--fork-versions/default/_variables.scss2
-rw-r--r--sass/normalize/_normalize-mixin.scss20
-rw-r--r--sass/normalize/_variables.scss2
-rw-r--r--test/fixtures/fork-versions/default/output.css13
-rw-r--r--test/fixtures/import-now/output.css13
-rw-r--r--test/fixtures/normalize/exclude-multiple/output.css13
-rw-r--r--test/fixtures/normalize/exclude-single/output.css13
-rw-r--r--test/fixtures/normalize/exclude-string/output.css13
-rw-r--r--test/fixtures/normalize/include-multiple/output.css13
-rw-r--r--test/fixtures/variables/default/output.css13
-rw-r--r--test/fixtures/variables/font/output.css13
-rw-r--r--test/fixtures/variables/indent-amount-and-vertical-rhythm/output.css13
-rw-r--r--test/fixtures/variables/indent-amount/output.css13
14 files changed, 75 insertions, 99 deletions
diff --git a/fork-versions/default/_normalize.scss b/fork-versions/default/_normalize.scss
index aafaa74..98896d6 100644
--- a/fork-versions/default/_normalize.scss
+++ b/fork-versions/default/_normalize.scss
@@ -19,14 +19,16 @@
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: $base-font-family; /* 1 */
+ @if $base-font-family {
+ /* Change the default font family in all browsers (opinionated). */
+ font-family: $base-font-family;
+ }
@if $base-font-size != 16px or $normalize-vertical-rhythm {
// Correct old browser bug that prevented accessible resizing of text
// when root font-size is set with px or em.
@@ -35,13 +37,13 @@ html {
@if $normalize-vertical-rhythm {
// Establish a vertical rhythm unit using $base-font-size and
// $base-line-height variables.
- line-height: ($base-line-height / $base-font-size) * 1em; /* 2 */
+ line-height: ($base-line-height / $base-font-size) * 1em; /* 1 */
}
@else {
- line-height: 1.15; /* 2 */
+ line-height: 1.15; /* 1 */
}
- -ms-text-size-adjust: 100%; /* 3 */
- -webkit-text-size-adjust: 100%; /* 3 */
+ -ms-text-size-adjust: 100%; /* 2 */
+ -webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
@@ -418,7 +420,7 @@ textarea {
@else {
line-height: 1.15; /* 1 */
}
- font-family: $base-font-family; /* 1 */
+ font-family: if($base-font-family, $base-font-family, sans-serif); /* 1 */
font-size: 100%; /* 1 */
margin: 0; /* 2 */
}
diff --git a/fork-versions/default/_variables.scss b/fork-versions/default/_variables.scss
index a3c28a3..f5bd845 100644
--- a/fork-versions/default/_variables.scss
+++ b/fork-versions/default/_variables.scss
@@ -15,7 +15,7 @@ $base-line-height: 24px !default;
$base-unit: 'em' !default;
// The default font family.
-$base-font-family: sans-serif !default;
+$base-font-family: null !default;
// The font sizes for h1-h6.
$h1-font-size: 2 * $base-font-size !default;
diff --git a/sass/normalize/_normalize-mixin.scss b/sass/normalize/_normalize-mixin.scss
index f0aaef2..e8f4e9b 100644
--- a/sass/normalize/_normalize-mixin.scss
+++ b/sass/normalize/_normalize-mixin.scss
@@ -48,27 +48,29 @@
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: $base-font-family; /* 1 */
+ @if $base-font-family {
+ /* Change the default font family in all browsers (opinionated). */
+ font-family: $base-font-family;
+ }
@if $base-font-size != 16px or $normalize-vertical-rhythm {
// Correct old browser bug that prevented accessible resizing of text
// when root font-size is set with px or em.
font-size: ($base-font-size / 16px) * 100%;
}
@if $normalize-vertical-rhythm {
- line-height: ($base-line-height / $base-font-size) * 1em; /* 2 */
+ line-height: ($base-line-height / $base-font-size) * 1em; /* 1 */
}
@else {
- line-height: 1.15; /* 2 */
+ line-height: 1.15; /* 1 */
}
- -ms-text-size-adjust: 100%; /* 3 */
- -webkit-text-size-adjust: 100%; /* 3 */
+ -ms-text-size-adjust: 100%; /* 2 */
+ -webkit-text-size-adjust: 100%; /* 2 */
}
}
@@ -424,7 +426,7 @@
optgroup,
select,
textarea {
- font-family: $base-font-family; /* 1 */
+ font-family: if($base-font-family, $base-font-family, sans-serif); /* 1 */
font-size: 100%; /* 1 */
@if $normalize-vertical-rhythm {
line-height: ($base-line-height / $base-font-size) * 1em; /* 1 */
diff --git a/sass/normalize/_variables.scss b/sass/normalize/_variables.scss
index 2f06b25..10d05ed 100644
--- a/sass/normalize/_variables.scss
+++ b/sass/normalize/_variables.scss
@@ -15,7 +15,7 @@ $base-line-height: 24px !default;
$base-unit: 'em' !default;
// The default font family.
-$base-font-family: sans-serif !default;
+$base-font-family: null !default;
// The font sizes for h1-h6.
$h1-font-size: 2 * $base-font-size !default;
diff --git a/test/fixtures/fork-versions/default/output.css b/test/fixtures/fork-versions/default/output.css
index 5c89210..e2ca5e7 100644
--- a/test/fixtures/fork-versions/default/output.css
+++ b/test/fixtures/fork-versions/default/output.css
@@ -2,20 +2,17 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: sans-serif;
- /* 1 */
line-height: 1.15;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */
diff --git a/test/fixtures/import-now/output.css b/test/fixtures/import-now/output.css
index 429af58..ba81625 100644
--- a/test/fixtures/import-now/output.css
+++ b/test/fixtures/import-now/output.css
@@ -2,20 +2,17 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: sans-serif;
- /* 1 */
line-height: 1.15;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */
diff --git a/test/fixtures/normalize/exclude-multiple/output.css b/test/fixtures/normalize/exclude-multiple/output.css
index bb64a34..9ac09ce 100644
--- a/test/fixtures/normalize/exclude-multiple/output.css
+++ b/test/fixtures/normalize/exclude-multiple/output.css
@@ -2,20 +2,17 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: sans-serif;
- /* 1 */
line-height: 1.15;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */
diff --git a/test/fixtures/normalize/exclude-single/output.css b/test/fixtures/normalize/exclude-single/output.css
index 0034bcb..febdf69 100644
--- a/test/fixtures/normalize/exclude-single/output.css
+++ b/test/fixtures/normalize/exclude-single/output.css
@@ -2,20 +2,17 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: sans-serif;
- /* 1 */
line-height: 1.15;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */
diff --git a/test/fixtures/normalize/exclude-string/output.css b/test/fixtures/normalize/exclude-string/output.css
index 4c677fc..db6ca3f 100644
--- a/test/fixtures/normalize/exclude-string/output.css
+++ b/test/fixtures/normalize/exclude-string/output.css
@@ -2,20 +2,17 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: sans-serif;
- /* 1 */
line-height: 1.15;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */
diff --git a/test/fixtures/normalize/include-multiple/output.css b/test/fixtures/normalize/include-multiple/output.css
index b4008de..f6e4916 100644
--- a/test/fixtures/normalize/include-multiple/output.css
+++ b/test/fixtures/normalize/include-multiple/output.css
@@ -2,20 +2,17 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: sans-serif;
- /* 1 */
line-height: 1.15;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */
diff --git a/test/fixtures/variables/default/output.css b/test/fixtures/variables/default/output.css
index 429af58..ba81625 100644
--- a/test/fixtures/variables/default/output.css
+++ b/test/fixtures/variables/default/output.css
@@ -2,20 +2,17 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: sans-serif;
- /* 1 */
line-height: 1.15;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */
diff --git a/test/fixtures/variables/font/output.css b/test/fixtures/variables/font/output.css
index 9f42c91..2171a34 100644
--- a/test/fixtures/variables/font/output.css
+++ b/test/fixtures/variables/font/output.css
@@ -2,21 +2,20 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
+ /* Change the default font family in all browsers (opinionated). */
font-family: Arial, sans-serif;
- /* 1 */
font-size: 150%;
line-height: 1.5em;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */
diff --git a/test/fixtures/variables/indent-amount-and-vertical-rhythm/output.css b/test/fixtures/variables/indent-amount-and-vertical-rhythm/output.css
index 013be00..937c9d7 100644
--- a/test/fixtures/variables/indent-amount-and-vertical-rhythm/output.css
+++ b/test/fixtures/variables/indent-amount-and-vertical-rhythm/output.css
@@ -2,21 +2,18 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: sans-serif;
- /* 1 */
font-size: 100%;
line-height: 1.5em;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */
diff --git a/test/fixtures/variables/indent-amount/output.css b/test/fixtures/variables/indent-amount/output.css
index be92ac7..d9a95c1 100644
--- a/test/fixtures/variables/indent-amount/output.css
+++ b/test/fixtures/variables/indent-amount/output.css
@@ -2,20 +2,17 @@
/* Document
========================================================================== */
/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
- font-family: sans-serif;
- /* 1 */
line-height: 1.15;
- /* 2 */
+ /* 1 */
-ms-text-size-adjust: 100%;
- /* 3 */
+ /* 2 */
-webkit-text-size-adjust: 100%;
- /* 3 */ }
+ /* 2 */ }
/* Sections
========================================================================== */