Skip to content

Commit 6a3d13e

Browse files
committed
Simplified docx.css
1 parent 6594db2 commit 6a3d13e

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

cr3qt/data/docx.css

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
body { text-align: left; margin: 0; text-indent: 0px }
22

3-
p { $def.all }
3+
p { $def.all }
44

55
empty-line { height: 1em }
66

@@ -14,45 +14,45 @@ li image { display: inline }
1414
li { display: list-item; text-indent: 0em; }
1515
ol { display: block; list-style-type: decimal; margin-left: 1em }
1616

17-
title.h1 p, title.h2 p {
17+
.h1, .h2 {
1818
$title.all
1919
}
2020

21-
title.h3 p, title.h4 p, title.h5 p, title.h6 p {
21+
.h3, .h4, .h5, .h6 p {
2222
$subtitle.all
2323
}
2424

25-
title.h1, title.h2, title.h3, title.h4, title.h5, title.h6 {
26-
hyphenate: none;
25+
.h1, .h2, .h3, .h4, .h5, .h6 {
26+
hyphenate: none;
2727
}
2828

29-
title.h1, title.h2, title.h3, title.h4, title.h5, title.h6 {
30-
display: block;
31-
margin-top: 0.5em;
32-
margin-bottom: 0.3em;
33-
padding: 10px ;
34-
margin-top: 0.5em;
35-
margin-bottom: 0.5em;
29+
.h1, .h2, .h3, .h4, .h5, .h6 {
30+
display: block;
31+
margin-top: 0.5em;
32+
margin-bottom: 0.3em;
33+
padding: 10px ;
34+
margin-top: 0.5em;
35+
margin-bottom: 0.5em;
3636
}
37-
title.h1, title.h2 {
38-
page-break-inside: avoid;
39-
page-break-after: avoid;
37+
.h1, .h2 {
38+
page-break-inside: avoid;
39+
page-break-after: avoid;
4040
}
4141

42-
title.h3, title.h4, title.h5, title.h6 {
43-
page-break-inside: avoid;
44-
page-break-after: avoid;
42+
.h3, .h4, .h5, .h6 {
43+
page-break-inside: avoid;
44+
page-break-after: avoid;
4545
}
4646

47-
title.h1 { font-size: 150% }
48-
title.h2 { font-size: 140% }
49-
title.h3 { font-size: 130% }
50-
title.h4 { font-size: 120% }
51-
title.h5 { font-size: 110% }
47+
.h1 { font-size: 150% }
48+
.h2 { font-size: 140% }
49+
.h3 { font-size: 130% }
50+
.h4 { font-size: 120% }
51+
.h5 { font-size: 110% }
5252

5353
table { font-size: 80% }
5454
td, th { text-indent: 0px; padding: 3px }
55-
th { font-weight: bold; text-align: center; background-color: #DDD }
55+
th { font-weight: bold; text-align: center; background-color: #DDD }
5656
/* #808080; */
5757
table caption { text-indent: 0px; padding: 4px; background-color: #EEE }
5858

crengine/src/docxfmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3143,9 +3143,9 @@ void docx_fb2TitleHandler::onTitleStart(int level, bool noSection)
31433143
m_writer->OnTagOpen(L"", L"title");
31443144
lString16 headingName = cs16("h") + lString16::itoa(level);
31453145
if( m_useClassName ) {
3146-
m_writer->OnAttribute(L"", L"class", headingName.c_str());
31473146
m_writer->OnTagBody();
31483147
m_writer->OnTagOpen(L"", L"p");
3148+
m_writer->OnAttribute(L"", L"class", headingName.c_str());
31493149
} else {
31503150
m_writer->OnTagBody();
31513151
m_writer->OnTagOpen(L"", headingName.c_str());

0 commit comments

Comments
 (0)