Skip to content

Commit 6ea0b15

Browse files
authored
Merge pull request #186 from readium/scroll-padding
Module for scroll padding
2 parents cb51601 + 166db35 commit 6ea0b15

32 files changed

Lines changed: 319 additions & 22 deletions

backstop.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@
7171
"selectors": ["viewport"],
7272
"misMatchThreshold" : 0.1
7373
},
74+
{
75+
"label": "Scroll padding pref",
76+
"url": "http://localhost:8000/tests/scroll-padding.html",
77+
"delay": 0,
78+
"selectors": ["document"],
79+
"misMatchThreshold" : 0.1
80+
},
7481
{
7582
"label": "Default colors pref",
7683
"url": "http://localhost:8000/tests/default-colors.html",

css/dist/ReadiumCSS-after.css

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.14)
2+
* Readium CSS (v. 2.0.0-beta.15)
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
@@ -99,6 +99,7 @@ body{
9999

100100
:root[style*="readium-scroll-on"] body{
101101
max-width:var(--RS__defaultLineLength) !important;
102+
box-sizing:border-box !important;
102103
}
103104

104105
:root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]) body{
@@ -116,6 +117,26 @@ body{
116117
}
117118
}
118119

120+
:root[style*="readium-scroll-on"][style*="--RS__scrollPadding"] body{
121+
padding:var(--RS__scrollPadding) !important;
122+
}
123+
124+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingTop"] body{
125+
padding-top:var(--RS__scrollPaddingTop) !important;
126+
}
127+
128+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingBottom"] body{
129+
padding-bottom:var(--RS__scrollPaddingBottom) !important;
130+
}
131+
132+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingLeft"] body{
133+
padding-left:var(--RS__scrollPaddingLeft) !important;
134+
}
135+
136+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingRight"] body{
137+
padding-right:var(--RS__scrollPaddingRight) !important;
138+
}
139+
119140
:root[style*="readium-night-on"]{
120141

121142
--RS__selectionTextColor:inherit;

css/dist/ReadiumCSS-before.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.14)
2+
* Readium CSS (v. 2.0.0-beta.15)
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.14)
2+
* Readium CSS (v. 2.0.0-beta.15)
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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.14)
2+
* Readium CSS (v. 2.0.0-beta.15)
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
@@ -99,6 +99,7 @@ body{
9999

100100
:root[style*="readium-scroll-on"] body{
101101
max-width:var(--RS__defaultLineLength) !important;
102+
box-sizing:border-box !important;
102103
}
103104

104105
:root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]) body{
@@ -116,6 +117,26 @@ body{
116117
}
117118
}
118119

120+
:root[style*="readium-scroll-on"][style*="--RS__scrollPadding"] body{
121+
padding:var(--RS__scrollPadding) !important;
122+
}
123+
124+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingTop"] body{
125+
padding-top:var(--RS__scrollPaddingTop) !important;
126+
}
127+
128+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingBottom"] body{
129+
padding-bottom:var(--RS__scrollPaddingBottom) !important;
130+
}
131+
132+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingLeft"] body{
133+
padding-left:var(--RS__scrollPaddingLeft) !important;
134+
}
135+
136+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingRight"] body{
137+
padding-right:var(--RS__scrollPaddingRight) !important;
138+
}
139+
119140
:root[style*="readium-night-on"]{
120141

121142
--RS__selectionTextColor:inherit;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.14)
2+
* Readium CSS (v. 2.0.0-beta.15)
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.14)
2+
* Readium CSS (v. 2.0.0-beta.15)
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-vertical/ReadiumCSS-after.css

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.14)
2+
* Readium CSS (v. 2.0.0-beta.15)
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
@@ -110,6 +110,7 @@ body{
110110
:root[style*="readium-scroll-on"] body,
111111
:root[style*="readium-noVerticalPagination-on"] body{
112112
max-width:var(--RS__defaultLineLength) !important;
113+
box-sizing:border-box !important;
113114
}
114115

115116
@supports (overflow: clip){
@@ -123,6 +124,26 @@ body{
123124
}
124125
}
125126

127+
:root[style*="readium-scroll-on"][style*="--RS__scrollPadding"] body{
128+
padding:var(--RS__scrollPadding) !important;
129+
}
130+
131+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingTop"] body{
132+
padding-top:var(--RS__scrollPaddingTop) !important;
133+
}
134+
135+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingBottom"] body{
136+
padding-bottom:var(--RS__scrollPaddingBottom) !important;
137+
}
138+
139+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingLeft"] body{
140+
padding-left:var(--RS__scrollPaddingLeft) !important;
141+
}
142+
143+
:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingRight"] body{
144+
padding-right:var(--RS__scrollPaddingRight) !important;
145+
}
146+
126147
:root[style*="readium-night-on"]{
127148

128149
--RS__selectionTextColor:inherit;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.14)
2+
* Readium CSS (v. 2.0.0-beta.15)
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-vertical/ReadiumCSS-default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Readium CSS (v. 2.0.0-beta.14)
2+
* Readium CSS (v. 2.0.0-beta.15)
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)