-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle precedingseparator with CSS #30
Comments
To do:
|
I've chosen an easier solution which does not require any new CSS features: p.precedingseparator {
$separator-width: 6;
text-indent: 0;
&::before {
content: "\A" /* empty line */
repeat("\A0", ($page-width - $separator-width)/2) /* centering */
repeat("⠒", $separator-width) "\A" /* separator */
"\A" /* empty line */
"\A0 "; /* text indent */
white-space: pre-line;
text-transform: none;
hyphens: initial;
}
} Note that this only works for positive text-indents. The "::outside pseudo-element" path can be explored later but for now I don't really see a good reason to go there. Maybe when some more use cases appear. |
Moved upstream: daisy/pipeline-mod-braille@cb448df |
It appears that I can't combine: class="precedingseparator noindent" Is it possible to add a rule for the combination? p.precedingseparator.noindent {
$separator-width: 6;
text-indent: 0;
&::before {
content: "\A" /* empty line */
repeat(" ", ($page-width - $separator-width)/2) /* centering */
repeat("⠒", $separator-width) "\A" /* separator */
"\A"; /* empty line */
white-space: pre-line;
text-transform: none;
hyphens: initial;
}
} does not work though. |
Whether or not this is implemented in css or xslt doesn't really matter. What is important is that the user
|
OK. The current solution is really the worst. It's a ugly workaround, it's not simpler than the XSLT solution and it can't make the corner cases work. So let's go back to the XSLT solution and make everything work, and then we can see if a real CSS is needed to make it configurable enough. |
Defining the separator could be done in CSS if we handle it like in EPUB, namely by converting a $separator-width: 6;
hr.separator {
display: block;
text-align: center;
margin: 1 0;
&::before {
content: repeat("⠒", $separator-width);
text-transform: none;
hyphens: initial;
}
} I don't think an |
Currently it is handled with XSLT: see
handle-precedingseparator.xsl
. In order to handle this in CSS a new CSS feature would be needed, e.g. an::outside
pseudo-element.The text was updated successfully, but these errors were encountered: