Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions backstop.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "Deprecated font size pref",
"url": "http://localhost:8000/tests/font-size-deprecated.html",
"delay": 0,
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "Font size normalize pref",
"url": "http://localhost:8000/tests/font-size-normalize.html",
"delay": 0,
"selectors": ["document"],
"misMatchThreshold" : 0.1
},
{
"label": "Type scale pref",
"url": "http://localhost:8000/tests/type-scale.html",
Expand Down
3 changes: 3 additions & 0 deletions css/ReadiumCSS-config.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/* Font-family override */
@custom-selector :--font-override [style*="readium-font-on"];

/* Disabling the new implementation for font-size */
@custom-selector :--deprecated-font-size [style*="readium-deprecatedFontSize-on"];

/* Font-size normalization for engines that don’t support zoom */
@custom-selector :--fs-normalize [style*="readium-normalize-on"];

Expand Down
95 changes: 48 additions & 47 deletions css/dist/ReadiumCSS-after.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Readium CSS (v. 2.0.0-beta.11)
* Readium CSS (v. 2.0.0-beta.12)
* Developers: Jiminy Panoz
* Copyright (c) 2017. Readium Foundation. All rights reserved.
* Use of this source code is governed by a BSD-style license which is detailed in the
Expand Down Expand Up @@ -398,7 +398,7 @@ body{
vertical-align:baseline !important;
}

:root[style*="--USER__fontSize"] body{
:root:not([style*="readium-deprecatedFontSize-on"])[style*="--USER__fontSize"] body{
zoom:var(--USER__fontSize) !important;
}

Expand All @@ -409,6 +409,10 @@ body{
}
}

:root[style*="readium-deprecatedFontSize-on"][style*="--USER__fontSize"]{
font-size:var(--USER__fontSize) !important;
}

:root[style*="--USER__lineHeight"]{
line-height:var(--USER__lineHeight) !important;
}
Expand Down Expand Up @@ -536,61 +540,58 @@ body{
filter:invert(100%) !important;
}

@supports not (zoom: 1){

:root[style*="readium-normalize-on"]{
--USER__typeScale:1.2;
}
:root[style*="readium-normalize-on"]{
--USER__typeScale:1.2;
}

:root[style*="readium-normalize-on"] p,
:root[style*="readium-normalize-on"] li,
:root[style*="readium-normalize-on"] div,
:root[style*="readium-normalize-on"] pre,
:root[style*="readium-normalize-on"] dd{
font-size:1rem !important;
}
:root[style*="readium-normalize-on"] p,
:root[style*="readium-normalize-on"] li,
:root[style*="readium-normalize-on"] div,
:root[style*="readium-normalize-on"] pre,
:root[style*="readium-normalize-on"] dd{
font-size:1rem !important;
}

:root[style*="readium-normalize-on"] h1{
font-size:1.75rem !important;
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"] h1{
font-size:1.75rem !important;
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"] h2{
font-size:1.5rem !important;
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"] h2{
font-size:1.5rem !important;
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"] h3{
font-size:1.25rem !important;
font-size:calc(1rem * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"] h3{
font-size:1.25rem !important;
font-size:calc(1rem * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"] h4,
:root[style*="readium-normalize-on"] h5,
:root[style*="readium-normalize-on"] h6{
font-size:1rem !important;
}
:root[style*="readium-normalize-on"] h4,
:root[style*="readium-normalize-on"] h5,
:root[style*="readium-normalize-on"] h6{
font-size:1rem !important;
}

:root[style*="readium-normalize-on"] small{
font-size:smaller !important;
}
:root[style*="readium-normalize-on"] small{
font-size:smaller !important;
}

:root[style*="readium-normalize-on"] sub,
:root[style*="readium-normalize-on"] sup{
font-size:67.5% !important;
}
:root[style*="readium-normalize-on"] sub,
:root[style*="readium-normalize-on"] sup{
font-size:67.5% !important;
}

:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h1{
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h1{
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h2{
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h2{
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h3{
font-size:calc(1rem * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h3{
font-size:calc(1rem * var(--USER__typeScale)) !important;
}

:root[style*="readium-iPadOSPatch-on"] body{
Expand Down
2 changes: 1 addition & 1 deletion css/dist/ReadiumCSS-before.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Readium CSS (v. 2.0.0-beta.11)
* Readium CSS (v. 2.0.0-beta.12)
* Developers: Jiminy Panoz
* Copyright (c) 2017. Readium Foundation. All rights reserved.
* Use of this source code is governed by a BSD-style license which is detailed in the
Expand Down
2 changes: 1 addition & 1 deletion css/dist/ReadiumCSS-default.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Readium CSS (v. 2.0.0-beta.11)
* Readium CSS (v. 2.0.0-beta.12)
* Developers: Jiminy Panoz
* Copyright (c) 2017. Readium Foundation. All rights reserved.
* Use of this source code is governed by a BSD-style license which is detailed in the
Expand Down
95 changes: 48 additions & 47 deletions css/dist/cjk-horizontal/ReadiumCSS-after.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Readium CSS (v. 2.0.0-beta.11)
* Readium CSS (v. 2.0.0-beta.12)
* Developers: Jiminy Panoz
* Copyright (c) 2017. Readium Foundation. All rights reserved.
* Use of this source code is governed by a BSD-style license which is detailed in the
Expand Down Expand Up @@ -326,7 +326,7 @@ body{
font-family:revert !important;
}

:root[style*="--USER__fontSize"] body{
:root:not([style*="readium-deprecatedFontSize-on"])[style*="--USER__fontSize"] body{
zoom:var(--USER__fontSize) !important;
}

Expand All @@ -337,6 +337,10 @@ body{
}
}

:root[style*="readium-deprecatedFontSize-on"][style*="--USER__fontSize"]{
font-size:var(--USER__fontSize) !important;
}

:root[style*="--USER__lineHeight"]{
line-height:var(--USER__lineHeight) !important;
}
Expand Down Expand Up @@ -446,61 +450,58 @@ body{
filter:invert(100%) !important;
}

@supports not (zoom: 1){

:root[style*="readium-normalize-on"]{
--USER__typeScale:1.2;
}
:root[style*="readium-normalize-on"]{
--USER__typeScale:1.2;
}

:root[style*="readium-normalize-on"] p,
:root[style*="readium-normalize-on"] li,
:root[style*="readium-normalize-on"] div,
:root[style*="readium-normalize-on"] pre,
:root[style*="readium-normalize-on"] dd{
font-size:1rem !important;
}
:root[style*="readium-normalize-on"] p,
:root[style*="readium-normalize-on"] li,
:root[style*="readium-normalize-on"] div,
:root[style*="readium-normalize-on"] pre,
:root[style*="readium-normalize-on"] dd{
font-size:1rem !important;
}

:root[style*="readium-normalize-on"] h1{
font-size:1.75rem !important;
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"] h1{
font-size:1.75rem !important;
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"] h2{
font-size:1.5rem !important;
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"] h2{
font-size:1.5rem !important;
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"] h3{
font-size:1.25rem !important;
font-size:calc(1rem * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"] h3{
font-size:1.25rem !important;
font-size:calc(1rem * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"] h4,
:root[style*="readium-normalize-on"] h5,
:root[style*="readium-normalize-on"] h6{
font-size:1rem !important;
}
:root[style*="readium-normalize-on"] h4,
:root[style*="readium-normalize-on"] h5,
:root[style*="readium-normalize-on"] h6{
font-size:1rem !important;
}

:root[style*="readium-normalize-on"] small{
font-size:smaller !important;
}
:root[style*="readium-normalize-on"] small{
font-size:smaller !important;
}

:root[style*="readium-normalize-on"] sub,
:root[style*="readium-normalize-on"] sup{
font-size:67.5% !important;
}
:root[style*="readium-normalize-on"] sub,
:root[style*="readium-normalize-on"] sup{
font-size:67.5% !important;
}

:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h1{
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h1{
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h2{
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h2{
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
}

:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h3{
font-size:calc(1rem * var(--USER__typeScale)) !important;
}
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h3{
font-size:calc(1rem * var(--USER__typeScale)) !important;
}

:root[style*="readium-iPadOSPatch-on"] body{
Expand Down
2 changes: 1 addition & 1 deletion css/dist/cjk-horizontal/ReadiumCSS-before.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Readium CSS (v. 2.0.0-beta.11)
* Readium CSS (v. 2.0.0-beta.12)
* Developers: Jiminy Panoz
* Copyright (c) 2017. Readium Foundation. All rights reserved.
* Use of this source code is governed by a BSD-style license which is detailed in the
Expand Down
2 changes: 1 addition & 1 deletion css/dist/cjk-horizontal/ReadiumCSS-default.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Readium CSS (v. 2.0.0-beta.11)
* Readium CSS (v. 2.0.0-beta.12)
* Developers: Jiminy Panoz
* Copyright (c) 2017. Readium Foundation. All rights reserved.
* Use of this source code is governed by a BSD-style license which is detailed in the
Expand Down
Loading