Skip to content

Commit ced644a

Browse files
committed
Create flag for deprecated font-size setting
1 parent 60db098 commit ced644a

17 files changed

+272
-259
lines changed

css/ReadiumCSS-config.css

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
/* Font-family override */
1919
@custom-selector :--font-override [style*="readium-font-on"];
2020

21+
/* Disabling the new implementation for font-size */
22+
@custom-selector :--deprecated-font-size [style*="readium-deprecatedFontSize-on"];
23+
2124
/* Font-size normalization for engines that don’t support zoom */
2225
@custom-selector :--fs-normalize [style*="readium-normalize-on"];
2326

css/dist/ReadiumCSS-after.css

+48-47
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.11)
2+
* Readium CSS (v. 2.0.0-beta.12)
33
* Developers: Jiminy Panoz
44
* Copyright (c) 2017. Readium Foundation. All rights reserved.
55
* Use of this source code is governed by a BSD-style license which is detailed in the
@@ -398,7 +398,7 @@ body{
398398
vertical-align:baseline !important;
399399
}
400400

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

@@ -409,6 +409,10 @@ body{
409409
}
410410
}
411411

412+
:root[style*="readium-deprecatedFontSize-on"][style*="--USER__fontSize"]{
413+
font-size:var(--USER__fontSize) !important;
414+
}
415+
412416
:root[style*="--USER__lineHeight"]{
413417
line-height:var(--USER__lineHeight) !important;
414418
}
@@ -536,61 +540,58 @@ body{
536540
filter:invert(100%) !important;
537541
}
538542

539-
@supports not (zoom: 1){
540-
541-
:root[style*="readium-normalize-on"]{
542-
--USER__typeScale:1.2;
543-
}
543+
:root[style*="readium-normalize-on"]{
544+
--USER__typeScale:1.2;
545+
}
544546

545-
:root[style*="readium-normalize-on"] p,
546-
:root[style*="readium-normalize-on"] li,
547-
:root[style*="readium-normalize-on"] div,
548-
:root[style*="readium-normalize-on"] pre,
549-
:root[style*="readium-normalize-on"] dd{
550-
font-size:1rem !important;
551-
}
547+
:root[style*="readium-normalize-on"] p,
548+
:root[style*="readium-normalize-on"] li,
549+
:root[style*="readium-normalize-on"] div,
550+
:root[style*="readium-normalize-on"] pre,
551+
:root[style*="readium-normalize-on"] dd{
552+
font-size:1rem !important;
553+
}
552554

553-
:root[style*="readium-normalize-on"] h1{
554-
font-size:1.75rem !important;
555-
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
556-
}
555+
:root[style*="readium-normalize-on"] h1{
556+
font-size:1.75rem !important;
557+
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
558+
}
557559

558-
:root[style*="readium-normalize-on"] h2{
559-
font-size:1.5rem !important;
560-
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
561-
}
560+
:root[style*="readium-normalize-on"] h2{
561+
font-size:1.5rem !important;
562+
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
563+
}
562564

563-
:root[style*="readium-normalize-on"] h3{
564-
font-size:1.25rem !important;
565-
font-size:calc(1rem * var(--USER__typeScale)) !important;
566-
}
565+
:root[style*="readium-normalize-on"] h3{
566+
font-size:1.25rem !important;
567+
font-size:calc(1rem * var(--USER__typeScale)) !important;
568+
}
567569

568-
:root[style*="readium-normalize-on"] h4,
569-
:root[style*="readium-normalize-on"] h5,
570-
:root[style*="readium-normalize-on"] h6{
571-
font-size:1rem !important;
572-
}
570+
:root[style*="readium-normalize-on"] h4,
571+
:root[style*="readium-normalize-on"] h5,
572+
:root[style*="readium-normalize-on"] h6{
573+
font-size:1rem !important;
574+
}
573575

574-
:root[style*="readium-normalize-on"] small{
575-
font-size:smaller !important;
576-
}
576+
:root[style*="readium-normalize-on"] small{
577+
font-size:smaller !important;
578+
}
577579

578-
:root[style*="readium-normalize-on"] sub,
579-
:root[style*="readium-normalize-on"] sup{
580-
font-size:67.5% !important;
581-
}
580+
:root[style*="readium-normalize-on"] sub,
581+
:root[style*="readium-normalize-on"] sup{
582+
font-size:67.5% !important;
583+
}
582584

583-
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h1{
584-
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
585-
}
585+
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h1{
586+
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
587+
}
586588

587-
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h2{
588-
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
589-
}
589+
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h2{
590+
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
591+
}
590592

591-
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h3{
592-
font-size:calc(1rem * var(--USER__typeScale)) !important;
593-
}
593+
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h3{
594+
font-size:calc(1rem * var(--USER__typeScale)) !important;
594595
}
595596

596597
:root[style*="readium-iPadOSPatch-on"] body{

css/dist/ReadiumCSS-before.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.11)
2+
* Readium CSS (v. 2.0.0-beta.12)
33
* Developers: Jiminy Panoz
44
* Copyright (c) 2017. Readium Foundation. All rights reserved.
55
* Use of this source code is governed by a BSD-style license which is detailed in the

css/dist/ReadiumCSS-default.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.11)
2+
* Readium CSS (v. 2.0.0-beta.12)
33
* Developers: Jiminy Panoz
44
* Copyright (c) 2017. Readium Foundation. All rights reserved.
55
* Use of this source code is governed by a BSD-style license which is detailed in the

css/dist/cjk-horizontal/ReadiumCSS-after.css

+48-47
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.11)
2+
* Readium CSS (v. 2.0.0-beta.12)
33
* Developers: Jiminy Panoz
44
* Copyright (c) 2017. Readium Foundation. All rights reserved.
55
* Use of this source code is governed by a BSD-style license which is detailed in the
@@ -326,7 +326,7 @@ body{
326326
font-family:revert !important;
327327
}
328328

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

@@ -337,6 +337,10 @@ body{
337337
}
338338
}
339339

340+
:root[style*="readium-deprecatedFontSize-on"][style*="--USER__fontSize"]{
341+
font-size:var(--USER__fontSize) !important;
342+
}
343+
340344
:root[style*="--USER__lineHeight"]{
341345
line-height:var(--USER__lineHeight) !important;
342346
}
@@ -446,61 +450,58 @@ body{
446450
filter:invert(100%) !important;
447451
}
448452

449-
@supports not (zoom: 1){
450-
451-
:root[style*="readium-normalize-on"]{
452-
--USER__typeScale:1.2;
453-
}
453+
:root[style*="readium-normalize-on"]{
454+
--USER__typeScale:1.2;
455+
}
454456

455-
:root[style*="readium-normalize-on"] p,
456-
:root[style*="readium-normalize-on"] li,
457-
:root[style*="readium-normalize-on"] div,
458-
:root[style*="readium-normalize-on"] pre,
459-
:root[style*="readium-normalize-on"] dd{
460-
font-size:1rem !important;
461-
}
457+
:root[style*="readium-normalize-on"] p,
458+
:root[style*="readium-normalize-on"] li,
459+
:root[style*="readium-normalize-on"] div,
460+
:root[style*="readium-normalize-on"] pre,
461+
:root[style*="readium-normalize-on"] dd{
462+
font-size:1rem !important;
463+
}
462464

463-
:root[style*="readium-normalize-on"] h1{
464-
font-size:1.75rem !important;
465-
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
466-
}
465+
:root[style*="readium-normalize-on"] h1{
466+
font-size:1.75rem !important;
467+
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
468+
}
467469

468-
:root[style*="readium-normalize-on"] h2{
469-
font-size:1.5rem !important;
470-
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
471-
}
470+
:root[style*="readium-normalize-on"] h2{
471+
font-size:1.5rem !important;
472+
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
473+
}
472474

473-
:root[style*="readium-normalize-on"] h3{
474-
font-size:1.25rem !important;
475-
font-size:calc(1rem * var(--USER__typeScale)) !important;
476-
}
475+
:root[style*="readium-normalize-on"] h3{
476+
font-size:1.25rem !important;
477+
font-size:calc(1rem * var(--USER__typeScale)) !important;
478+
}
477479

478-
:root[style*="readium-normalize-on"] h4,
479-
:root[style*="readium-normalize-on"] h5,
480-
:root[style*="readium-normalize-on"] h6{
481-
font-size:1rem !important;
482-
}
480+
:root[style*="readium-normalize-on"] h4,
481+
:root[style*="readium-normalize-on"] h5,
482+
:root[style*="readium-normalize-on"] h6{
483+
font-size:1rem !important;
484+
}
483485

484-
:root[style*="readium-normalize-on"] small{
485-
font-size:smaller !important;
486-
}
486+
:root[style*="readium-normalize-on"] small{
487+
font-size:smaller !important;
488+
}
487489

488-
:root[style*="readium-normalize-on"] sub,
489-
:root[style*="readium-normalize-on"] sup{
490-
font-size:67.5% !important;
491-
}
490+
:root[style*="readium-normalize-on"] sub,
491+
:root[style*="readium-normalize-on"] sup{
492+
font-size:67.5% !important;
493+
}
492494

493-
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h1{
494-
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
495-
}
495+
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h1{
496+
font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
497+
}
496498

497-
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h2{
498-
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
499-
}
499+
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h2{
500+
font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
501+
}
500502

501-
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h3{
502-
font-size:calc(1rem * var(--USER__typeScale)) !important;
503-
}
503+
:root[style*="readium-normalize-on"][style*="--USER__typeScale"] h3{
504+
font-size:calc(1rem * var(--USER__typeScale)) !important;
504505
}
505506

506507
:root[style*="readium-iPadOSPatch-on"] body{

css/dist/cjk-horizontal/ReadiumCSS-before.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.11)
2+
* Readium CSS (v. 2.0.0-beta.12)
33
* Developers: Jiminy Panoz
44
* Copyright (c) 2017. Readium Foundation. All rights reserved.
55
* Use of this source code is governed by a BSD-style license which is detailed in the

css/dist/cjk-horizontal/ReadiumCSS-default.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.11)
2+
* Readium CSS (v. 2.0.0-beta.12)
33
* Developers: Jiminy Panoz
44
* Copyright (c) 2017. Readium Foundation. All rights reserved.
55
* Use of this source code is governed by a BSD-style license which is detailed in the

0 commit comments

Comments
 (0)