diff --git a/scripts/snapshot/protractor.config.js b/scripts/snapshot/protractor.config.js index 1f205b89cb..3aa3bd2303 100644 --- a/scripts/snapshot/protractor.config.js +++ b/scripts/snapshot/protractor.config.js @@ -9,6 +9,7 @@ exports.config = { // include glob patterns. specs: [ path.resolve(projectRoot, 'dist/e2e/**/*e2e.js'), + //path.resolve(projectRoot, 'dist/e2e/toolbar/**/*e2e.js'), ], // Options to be passed to Jasmine-node. diff --git a/src/components/app/_normalize.scss b/src/components/app/_normalize.scss index d8366cf0d3..c85595a4c3 100644 --- a/src/components/app/_normalize.scss +++ b/src/components/app/_normalize.scss @@ -63,28 +63,6 @@ strong { font-weight: bold; } -// Address inconsistent and variable font size in all browsers. -small { - font-size: 80%; -} - -// Prevent `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; -} - // Embedded content // ========================================================================== diff --git a/src/components/app/_typography.scss b/src/components/app/_typography.scss index 7afac7e956..16046fbced 100644 --- a/src/components/app/_typography.scss +++ b/src/components/app/_typography.scss @@ -1,14 +1,17 @@ // Typography // ------------------------- +// All font sizes use rem units + $font-family-sans-serif: "Helvetica Neue", "Roboto", sans-serif !default; $font-family-light-sans-serif: "HelveticaNeue-Light", "Roboto-Light", sans-serif-light !default; $font-family-base: $font-family-sans-serif !default; -$font-size-base: 14px !default; +$font-size-root: 62.5% !default; +$font-size-base: 1.4rem !default; // 1.4rem == 14px -$line-height-base: 1.428571429 !default; // 20/14 +$line-height-base: 1.4 !default; $line-height-computed: floor($font-size-base * $line-height-base) !default; // ~20px $headings-font-family: $font-family-base !default; @@ -16,40 +19,71 @@ $headings-font-weight: 500 !default; $headings-line-height: 1.2 !default; +html { + font-size: $font-size-root; +} + + [ion-app] { font-size: $font-size-base; font-family: $font-family-base; - line-height: $line-height-computed; h1, h2, h3, h4, h5, h6 { font-weight: $headings-font-weight; font-family: $headings-font-family; line-height: $headings-line-height; - } - - h1, - h2, - h3 { - margin-top: $line-height-computed; - margin-bottom: ($line-height-computed / 2); + margin-top: 1.6rem; + margin-bottom: 1rem; &:first-child { - margin-top: 0; + margin-top: -0.4rem; } } - h4, - h5, - h6 { - margin-top: ($line-height-computed / 2); - margin-bottom: ($line-height-computed / 2); + h1 + h2, + h1 + h3, + h2 + h3 { + margin-top: -0.4rem; } - h1 { font-size: floor($font-size-base * 2.60); } // ~36px - h2 { font-size: floor($font-size-base * 2.15); } // ~30px - h3 { font-size: ceil($font-size-base * 1.70); } // ~24px - h4 { font-size: ceil($font-size-base * 1.25); } // ~18px - h5 { font-size: $font-size-base; } - h6 { font-size: ceil($font-size-base * 0.85); } // ~12px + h1 { + font-size: 3.6rem; + margin-top: 2rem; + } + h2 { + font-size: 3rem; + margin-top: 1.8rem; + } + h3 { + font-size: 2.4rem; + } + h4 { + font-size: 2rem; + } + h5 { + font-size: 1.6rem; + } + h6 { + font-size: 1.4rem; + } + small { + font-size: 75%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sup { + top: -0.5em; + } + + sub { + bottom: -0.25em; + } } diff --git a/src/components/app/test/typography/e2e.js b/src/components/app/test/typography/e2e.js new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/src/components/app/test/typography/e2e.js @@ -0,0 +1 @@ + diff --git a/src/components/app/test/typography/main.html b/src/components/app/test/typography/main.html new file mode 100644 index 0000000000..6c7e8aef50 --- /dev/null +++ b/src/components/app/test/typography/main.html @@ -0,0 +1,25 @@ + +
I'm a paragraph, gjpqy!
+I'm a paragraph, gjpqy!
+ +I'm a paragraph, gjpqy!
+I'm a paragraph, gjpqy!
+ +I'm a paragraph, gjpqy!
+Paragraph with sub and sup.
+ +Paragraph with small
+ +Paragraph with a boring link.
+
- H
- a
+ H
+ E
+ L
+ L
+ O
a
diff --git a/src/components/list/extensions/ios.scss b/src/components/list/extensions/ios.scss
index 3f50ac3d61..ac033d2582 100644
--- a/src/components/list/extensions/ios.scss
+++ b/src/components/list/extensions/ios.scss
@@ -6,12 +6,12 @@ $list-ios-background-color: #fff !default;
$list-ios-border-color: #c8c7cc !default;
$list-ios-header-margin: 35px 15px 10px 15px !default;
-$list-ios-header-font-size: 14px !default;
+$list-ios-header-font-size: 1.4rem !default;
$list-ios-header-color: #6d6d72 !default;
$list-ios-footer-margin: 10px 0 35px 0 !default;
$list-ios-footer-padding: 0 15px !default;
-$list-ios-footer-font-size: 14px !default;
+$list-ios-footer-font-size: 1.4rem !default;
$list-ios-footer-color: #8f8f94 !default;
diff --git a/src/components/toolbar/extensions/android.scss b/src/components/toolbar/extensions/android.scss
index 99ae60c739..eb3772584e 100644
--- a/src/components/toolbar/extensions/android.scss
+++ b/src/components/toolbar/extensions/android.scss
@@ -2,17 +2,38 @@
// Android Toolbar
// --------------------------------------------------
+$toolbar-android-height: 6.4rem !default;
+$toolbar-android-background: #f7f7f8 !default;
+
+$toolbar-android-title-font-size: 1.7rem !default;
+$toolbar-android-button-font-size: 1.7rem !default;
+$toolbar-android-button-color: #007aff !default;
+
.toolbar-android {
+ height: $toolbar-android-height;
+ background: $toolbar-android-background;
- .spacer {
+ .bar-spacer {
@include flex(none);
}
- .title {
+ .bar-title {
position: static;
margin: 0;
text-align: left;
}
+ .button {
+ font-size: $toolbar-android-button-font-size;
+ color: $toolbar-android-button-color;
+ border: none;
+ padding: 0;
+ margin: 0 10px;
+ min-height: $toolbar-android-height;
+ min-width: 0;
+ background: transparent;
+ }
+
}
+
diff --git a/src/components/toolbar/extensions/ios.scss b/src/components/toolbar/extensions/ios.scss
index a0339ebb27..c13bdda19f 100644
--- a/src/components/toolbar/extensions/ios.scss
+++ b/src/components/toolbar/extensions/ios.scss
@@ -2,12 +2,12 @@
// iOS Toolbar
// --------------------------------------------------
-$toolbar-ios-height: 44px !default;
+$toolbar-ios-height: 4.4rem !default;
$toolbar-ios-background: #f7f7f8 !default;
$toolbar-ios-border-color: #c4c4c4 !default;
-$toolbar-ios-title-font-size: 17px !default;
-$toolbar-ios-button-font-size: 17px !default;
+$toolbar-ios-title-font-size: 1.7rem !default;
+$toolbar-ios-button-font-size: 1.7rem !default;
$toolbar-ios-button-color: #007aff !default;
@@ -34,9 +34,10 @@ $toolbar-ios-button-color: #007aff !default;
content: '';
}
- .title {
+ .bar-inner-title {
font-size: $toolbar-ios-title-font-size;
text-align: center;
+ opacity: 0;
}
.button {
diff --git a/src/components/toolbar/test/basic/main.html b/src/components/toolbar/test/basic/main.html
index 106a4506a2..4188e4d186 100644
--- a/src/components/toolbar/test/basic/main.html
+++ b/src/components/toolbar/test/basic/main.html
@@ -9,7 +9,6 @@
-