Skip to content

Commit 457694f

Browse files
committed
Correct small-caps
Resolves FriendsOfEpub#28
1 parent 1cbf31c commit 457694f

File tree

15 files changed

+46
-13
lines changed

15 files changed

+46
-13
lines changed

Blitz_framework/CSS/AltStylesheets/blitz.uncommented.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,10 @@ svg {
764764
font-style: italic
765765
}
766766
.small-caps {
767+
font-variant: small-caps;
768+
letter-spacing: .0625em
769+
}
770+
.caps-to-small-caps {
767771
text-transform: lowercase;
768772
font-variant: small-caps;
769773
letter-spacing: .0625em

Blitz_framework/CSS/blitz-kindle.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ it is known to create issues with some devices/apps
6767
.small-caps {
6868
font-size: small;
6969
}
70+
.caps-to-small-caps {
71+
font-size: small;
72+
}
7073
sub {
7174
font-size: x-small;
7275
}

Blitz_framework/CSS/blitz.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@charset "UTF-8";
22
/* blitz — CSS framework for reflowable eBooks
3-
Version 1.2.0 by Jiminy Panoz
4-
Codename: Kola Kola
3+
Version 1.2.1 by Jiminy Panoz
4+
Codename: Charlie Don't Surf
55
License: MIT (https://opensource.org/licenses/MIT) */
66
/* NAMESPACES */
77
@namespace h "http://www.w3.org/1999/xhtml/";
@@ -931,6 +931,11 @@ render page on eInk devices) */
931931
font-style: italic;
932932
}
933933
.small-caps {
934+
font-variant: small-caps;
935+
letter-spacing: 0.0625em;
936+
/* The two previous props are not supported in legacy RMSDK */
937+
}
938+
.caps-to-small-caps {
934939
text-transform: lowercase;
935940
/* Don't rely on this property, text should be typed in uppercase (legacy RMSDK) */
936941
font-variant: small-caps;

Blitz_framework/LESS/blitz-lite.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@charset "UTF-8";
22

33
/* blitz — CSS framework for reflowable eBooks
4-
Version 1.2.0 by Jiminy Panoz
5-
Codename: Kola Kola
4+
Version 1.2.1 by Jiminy Panoz
5+
Codename: Charlie Don't Surf
66
License: MIT (https://opensource.org/licenses/MIT) */
77

88

Blitz_framework/LESS/blitz-reset.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* blitz — CSS framework for reflowable eBooks
2-
Version 1.2.0 by Jiminy Panoz
3-
Codename: Kola Kola
2+
Version 1.2.1 by Jiminy Panoz
3+
Codename: Charlie Don't Surf
44
License: MIT (https://opensource.org/licenses/MIT) */
55

66
@import 'base/reset';

Blitz_framework/LESS/blitz.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@charset "UTF-8";
22

33
/* blitz — CSS framework for reflowable eBooks
4-
Version 1.2.0 by Jiminy Panoz
5-
Codename: Kola Kola
4+
Version 1.2.1 by Jiminy Panoz
5+
Codename: Charlie Don't Surf
66
License: MIT (https://opensource.org/licenses/MIT) */
77

88

Blitz_framework/LESS/plugins/blitz-kindle.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ it is known to create issues with some devices/apps
6262
.small-caps {
6363
font-size: small;
6464
}
65+
.caps-to-small-caps {
66+
font-size: small;
67+
}
6568
sub {
6669
font-size: x-small;
6770
}

Blitz_framework/LESS/utils/utilities.less

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,16 @@
269269
}
270270

271271
.small-caps {
272-
text-transform: lowercase; /* Don't rely on this property, text should be typed in uppercase (legacy RMSDK) */
273272
font-variant: small-caps;
274273
letter-spacing: ((1 / @body-font-size) + 0em);
275274
/* The two previous props are not supported in legacy RMSDK */
276275
}
277276

277+
.caps-to-small-caps {
278+
text-transform: lowercase; /* Don't rely on this property, text should be typed in uppercase (legacy RMSDK) */
279+
.small-caps;
280+
}
281+
278282
.underline {
279283
text-decoration: underline;
280284
}

Blitz_framework/blitz-API.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
- `.italic`
117117
- `.bold-italic`
118118
- `.small-caps`
119+
- `.caps-to-small-caps`
119120
- `.underline`
120121
- `.break-before`
121122
- `.break-after`

Blitz_framework/blitz-doc.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ Blitz offers a large amount of mixins which can be used in various places. Since
287287
- `.italic`
288288
- `.bold-italic`
289289
- `.small-caps`
290+
- `.caps-to-small-caps`
290291
- `.underline`
291292
- `.break-before`
292293
- `.break-after`
@@ -569,7 +570,7 @@ Those classes are mixins which are output by default but can eventually be used
569570
- indents: `.indent`, `.no-indent` and `.hanging-indent`
570571
- font-stacks
571572
- font-sizes, which are computed based on the scale specified in variables
572-
- character styles: `.bold`, `.italic`, `.bold-italic` and `small-caps`
573+
- character styles: `.bold`, `.italic`, `.bold-italic`, `.small-caps`, and `.caps-to-small-caps`
573574

574575
### Break
575576

Blitz_template/Blitz_epub3.epub

28 Bytes
Binary file not shown.

Blitz_template/Blitz_epub3/OEBPS/Styles/blitz-kindle.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ it is known to create issues with some devices/apps
6767
.small-caps {
6868
font-size: small;
6969
}
70+
.caps-to-small-caps {
71+
font-size: small;
72+
}
7073
sub {
7174
font-size: x-small;
7275
}

Blitz_template/Blitz_epub3/OEBPS/Styles/blitz.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@charset "UTF-8";
22
/* blitz — CSS framework for reflowable eBooks
3-
Version 1.2.0 by Jiminy Panoz
4-
Codename: Kola Kola
3+
Version 1.2.1 by Jiminy Panoz
4+
Codename: Charlie Don't Surf
55
License: MIT (https://opensource.org/licenses/MIT) */
66
/* NAMESPACES */
77
@namespace h "http://www.w3.org/1999/xhtml/";
@@ -931,6 +931,11 @@ render page on eInk devices) */
931931
font-style: italic;
932932
}
933933
.small-caps {
934+
font-variant: small-caps;
935+
letter-spacing: 0.0625em;
936+
/* The two previous props are not supported in legacy RMSDK */
937+
}
938+
.caps-to-small-caps {
934939
text-transform: lowercase;
935940
/* Don't rely on this property, text should be typed in uppercase (legacy RMSDK) */
936941
font-variant: small-caps;

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ When checking for support, you can simply click “Apply Filters” in order to
177177

178178
## Log
179179

180+
### 1.2.1
181+
182+
- Corrected `.small-caps` and created a new `.caps-to-small-caps` util
183+
180184
### 1.2.0
181185

182186
- Progressive enhancements plugin is now implemented at the core of the LESS framework:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "blitz-ebook",
33
"description": "A CSS Framework for ebooks",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"homepage": "https://github.com/FriendsOfEpub/Blitz",
66
"license": "MIT",
77
"keywords": [

0 commit comments

Comments
 (0)