
css.default.scss Maven / Gradle / Ivy
/***************************************************************************************
* SBS Default CSS *
* http://www.sbs.ch/ *
* *
* Author: Mischa Kuenzle *
* Author: Christian Egli *
* Author: Bert Frees *
* *
* See also Braille CSS: http://snaekobbi.github.io/braille-css-spec/master/index.html *
***************************************************************************************/
/* General rules */
/* Namespaces */
@namespace xml "http://www.w3.org/XML/1998/namespace";
@namespace brl url(http://www.daisy.org/z3986/2009/braille/);
/* Page layout
*
* A page contains 28 columns by 28 rows of braille (configurable with
* options, defaults in script). */
@page {
@footnotes {
border-top: ⠒;
content: flow(footnotes);
}
}
@page frontmatter:right {
margin-bottom: 1;
@bottom-center {
content: string(running-footer-front);
}
}
@page toc:right {
margin-bottom: 1;
@bottom-center {
content: "Inhaltsverzeichnis";
}
@bottom-right {
content: counter(tocpage);
}
}
@if $show-print-page-numbers {
@page bodymatter:right {
margin-bottom: 1;
@bottom-left {
content: string(print-page, spread-start) string(slash-print-page, spread-last-except-start);
text-transform: print-page;
}
@bottom-center {
content: string(running-footer-body);
}
}
}
@else {
@if $levels-in-footer >= 1 {
@page bodymatter:right {
margin-bottom: 1;
@bottom-left {
content: "⠒⠒⠒ " string(running-footer-body);
}
}
}
@else {
/* TODO: insert code for flow-into-footer style (not yet implemented) */
}
}
@if $show-braille-page-numbers {
@page bodymatter:right {
@bottom-right {
content: counter(page);
}
}
}
@for $level from 1 through 6 {
@if $levels-in-footer >= $level {
bodymatter h#{$level} {
string-set: running-footer-body content();
&:has(> brl|running-line) {
string-set: none;
}
> brl|running-line {
string-set: running-footer-body content();
}
}
}
}
/* uncomment once contraction-grade is supported
brl|volume[brl|grade='#{dollar-contraction-grade}'] {
volume-break-before:always;
} */
@volume {
@begin {
content: flow(cover) flow(volume-toc);
}
}
@volume:first {
@begin {
content: flow(cover) flow(frontmatter) flow(document-toc);
}
}
#generated-document-toc,
#generated-volume-toc {
counter-reset: tocpage 1;
}
#generated-document-toc::-obfl-on-toc-start,
#generated-volume-toc::-obfl-on-toc-start {
display: block;
content: 'Inhaltsverzeichnis';
text-align: center;
text-indent:0;
margin-top:1;
margin-left:4;
margin-right:4;
margin-bottom:1;
border-bottom:⠤;
page-break-before: always;
}
#generated-document-toc::-obfl-on-volume-start,
#generated-volume-toc::-obfl-on-volume-start {
display: block;
content: 'Band ' -obfl-evaluate('(round $started-volume-number)');
text-align: center;
text-indent:0;
margin-top:1;
margin-bottom:1;
}
#generated-document-toc::-obfl-on-volume-end,
#generated-volume-toc::-obfl-on-volume-end {
display: block;
text-align: center;
text-indent:0;
margin-top:1;
margin-bottom:1;
}
#generated-document-toc::-obfl-on-toc-end,
#generated-volume-toc::-obfl-on-toc-end {
display: block;
text-align: center;
text-indent:0;
content: '⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒';
margin-top:1;
margin-bottom:1;
}
#generated-volume-toc li,
#generated-document-toc li {
display: block;
}
#generated-volume-toc li a::after,
#generated-document-toc li a::after {
/* TODO: target-string(attr(href), print-page) should be downshifted and preceded by a number sign
target-counter(attr(href), page) should be regular (upshifted) and not preceded by a number sign */
content: " " leader('⠄') " " target-string(attr(href), print-page) target-counter(attr(href), page);
}
dtbook {
hyphens: auto;
counter-reset: footnote 0;
}
/* Hidden elements
*
* These are not directly incldued in the output. */
head {
display: none;
}
doctitle {
display: none;
string-set: doctitle content();
}
docauthor {
display: none;
string-set: docauthor content();
}
noteref {
counter-increment: footnote;
}
noteref::after {
display: inline;
content: counter(footnote);
}
noteref::alternate {
flow: footnotes;
display: block;
content: '⠠⠔' counter(footnote) ' ' target-content(attr(idref));
text-indent: -2;
margin-left: 2
}
note {
display: none;
}
note p {
display: inline;
}
.pageref {
flow: null;
}
.pageref::alternate {
display: inline;
content: target-counter(attr(href), page);
}
brl|select,
brl|when-braille,
brl|literal{
display: inline;
}
brl|otherwise{
display: none;
}
/* Headings */
h1 {
display: block;
text-align: center;
margin-left: 4;
margin-right: 4;
margin-top: 1;
border-bottom: ⠤;
margin-bottom: 1;
page-break-after: avoid;
hyphens: none;
}
h2 {
display: block;
margin-right: 4;
text-align: left;
border-bottom: ⠒;
page-break-after: avoid;
hyphens: none;
}
h3 {
display: block;
margin-right: 4;
text-align: left;
border-bottom: ⠂;
page-break-after: avoid;
hyphens: none;
}
h4, h5, h6 {
display: block;
margin-right: 4;
text-align: left;
page-break-after: avoid;
hyphens: none;
}
hd, bridgehead {
display: block;
margin-right: 4;
text-align: left;
margin-top: 1;
page-break-after: avoid;
hyphens: none;
}
brl|running-line, brl|toc-line, brl|otherwise {
display:none;
}
sidebar > hd {
display: block;
margin-top:0;
page-break-after: avoid;
}
/* Divisions */
frontmatter > level1 {
display: block;
page-break-before:right;
string-set: running-footer-front "Klappentexte";
}
bodymatter > level1:not(:nth-child(1)),
rearmatter > level1:not(:nth-child(1)) {
display: block;
page-break-before:always;
}
level1 {
display: block;
}
level2 {
display:block;
margin-top:2;
orphans:10;
}
level3 {
display:block;
margin-top:1;
orphans:7;
}
level4, level5, level6 {
display:block;
margin-top:1;
orphans:4;
}
frontmatter, bodymatter, rearmatter {
display: block;
}
frontmatter {
page: frontmatter;
flow: frontmatter;
}
frontmatter level2 {
display: block;
margin-top:1;
orphans:4;
}
/* Cover Page */
#cover-recto {
display: block;
flow: cover;
text-align: center;
page-break-inside:avoid;
}
#cover-author {
display: block;
-obfl-vertical-position:5;
}
#cover-title {
display: block;
margin-top: 2;
border-bottom: ⠤;
}
#number-of-volumes {
content: -obfl-evaluate('(round $volumes)');
text-transform: volumes;
}
#number-of-volumes-label {
content: -obfl-evaluate('(if (> $volumes 1) "Braillebänden" "Brailleband")');
}
#current-volume {
content: -obfl-evaluate('(round $volume)');
text-transform: volume;
}
frontmatter > level1 > .how-many-volumes {
display: block;
margin-top: 4;
}
frontmatter > level1 > .which-volume {
display: block;
}
frontmatter > level1 > .publisher {
display: block;
-obfl-vertical-position:23;
}
#cover-verso {
display: block;
flow: cover;
}
#copyright-blurb {
display: block;
text-indent: 0;
-obfl-vertical-position:1;
}
#sjw-blurb {
display: block;
text-indent: 0;
-obfl-vertical-position:1;
}
#publisher-blurb {
display: block;
text-indent: 0;
-obfl-vertical-position:21;
}
#cover-year {
display: block;
text-indent: 0;
margin-top: 2;
}
frontmatter > .titlepage {
display: block;
/*string-set: running-footer-front "";*/
flow: cover;
}
frontmatter > .titlepage > level2:nth-child(1) > p {
display: block;
text-align:center;
}
frontmatter > .titlepage > level2:nth-child(2) > p {
display: block;
margin-left:2;
text-indent:-2;
}
.sourcePublisher {
display: block;
text-align:center;
-obfl-vertical-position:26;
page-break-after:always;
}
frontmatter > .titlepage > level2:nth-child(1)::before {
display: block;
text-align:center;
white-space: pre-line;
margin-top:5;
margin-bottom:1;
margin-left:4;
margin-right:4;
border-bottom: ⠤;
content: string(docauthor) "\A\A\A" string(doctitle);
}
bodymatter {
page: bodymatter;
counter-set: page 1;
}
/* Paragraphs
*
* A paragraph is a block element with no special features. */
p {
display: block;
text-indent: 2;
}
.precedingemptyline{
margin-top:1;
}
.noindent {
display: block;
text-indent: 0;
}
pagenum {
display: none;
string-set: print-page content(), slash-print-page '/' content();
}
blockquote {
margin-top:1;
margin-bottom:1;
margin-left:2;
}
poem {
display: block;
margin-top:1;
margin-bottom:1;
margin-left:2;
}
linegroup {
display: block;
}
linegroup + linegroup {
margin-top:1;
display: block;
}
line {
display: block;
margin-left:2;
text-indent:-2;
page-break-inside: avoid;
}
author, byline {
display: block;
text-align: right;
}
table {
display:block;
margin-top:1;
margin-bottom:1;
}
tr {
display:block;
text-indent:-2;
margin-left:2;
}
tbody, tfoot {
display:block;
border-top: ⠒;
}
td + td::before, th + th::before {
content:" ⠒⠒ ";
}
caption{
display:block;
margin-bottom:1;
}
imggroup > caption, imggroup > img {
display:block;
text-indent:-2;
margin-left:2;
}
imggroup > prodnote {
display:block;
}
prodnote {
display:inline;
}
epigraph {
margin-top:1;
margin-bottom:1;
margin-left:4;
orphans:2;
}
imggroup {
display:block;
margin-top:1;
margin-bottom:1;
orphans:2;
}
/* Lists */
/* dl, dt, dd not working with css, according to BF we need a pre-processing step to implement that */
dl {
display:block;
}
dt {
display:inline;
}
dd {
display:inline;
}
dt + dd {
padding-left:1;
}
dd::after {
display:block;
white-space: pre-line;
content: '\A';
}
list {
margin-left: 2;
text-indent: -2;
margin-bottom: 1;
counter-reset: list-item;
}
list list {
margin-bottom: 0;
}
li {
display:list-item;
}
list[type=ul], list list list[type=ul] {
list-style-type: '⠠⠤';
}
list list[type=ul] {
list-style-type: '⠐⠤';
}
list[type=ol] > li {
display: block;
counter-increment: list-item;
&::before {
display: inline;
content: "⠼" counter(list-item, symbols(numeric "⠴" "⠂" "⠆" "⠒" "⠲" "⠢" "⠖" "⠶" "⠦" "⠔")) " ";
}
}
list[type=ol][enum="1"] {
list-style-type: decimal;
}
list[type=ol][enum=A] {
list-style-type: upper-latin;
}
list[type=ol][enum=I] {
list-style-type: upper-roman;
}
list[type=ol][enum=a] {
list-style-type: lower-latin;
}
list[type=ol][enum=i] {
list-style-type: lower-roman;
}
br::before {
white-space: pre-line;
content: '\A';
}
sidebar {
display:block;
margin-left:1;
orphans:2;
}
sidebar::before {
display:block;
margin-top:1;
margin-left:-1;
content:"⠏⠉⠉⠉";
}
sidebar::after {
display:block;
margin-bottom:1;
margin-left:-1;
content:"⠧⠤⠤⠤";
}
div {
display: block;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy