Closed someth2say closed 8 months ago
the stylesheet can control the looks btn_before and btn_after
I think these classes are too fine-grained. I think the uniform class name "enclosure" (or "envelope") would be sufficient.
Otherwise, :+1:
Hmm, now that I think about it, if the user wanted to use different opening and closing delimiters, then it might be convenient to have two classes (though it still could be achieved with CSS selectors using a single class).
I'm actually thinking that "before" and "after" are sufficient in that case. Underscores are problematic in HTML output because they could end up getting matched as formatting, so we want to avoid them.
<b class="button"><span class="before">[</span><span class="label">button text</span><span class="after">]</span></b>
Then CSS can use b.button > .before
and b.button > .after
to control these styles. I prefer this proposal over my previous one.
Right now, in order to "style" buttons, we are adding brackets around them:
IMHO, brackets are a style decision, and hence those should be injected by the default CSS. I was about to propose removing the brackets, and using CSS's
::before
and::after
classes to inject the brackets, but @mojavelinux made a fair comment that CSS support in many ePub viewers is less than ideal.Another approach, proposed by Dan, is applying a span directly to the brackets. IIUC, something like:
By using this structure, the stylesheet can control the looks
btn_before
andbtn_after
(or even make it hidden or change their content).