On 2010-06-08, at 11:38, André Bargull wrote: > On 6/7/2010 4:42 PM, P T Withington wrote: >> I'm pretty sure the 1.08 is me, because I find that the tty font looks too >> small visually otherwise. I wasn't worried about the indenting, since it's >> a fixed-width font. >> >> If that is really of concern, I can only think of two other ways: > > 'of concern' in regard to find a different way to fix the indentation bug or > 'of concern' in regard to fix the bug at all?
The latter. I'm trying to understand why having the spacing be proportional to the font size is bad? Is there something particular I should look at? Do you have a screen shot, perhaps? >> >> 1) adjust the tracking: letter-spacing: -0.08em > > The spacing between characters becomes too narrow when the letter-spacing css > style is set to -0.08em for the complete <code> element. If the style is just > set for the <span> containing the leading white-space, the visual result is > the same as for setting the font-size to 0.926em. I guess you've meant to > propose the latter. Either one. I just suggested it as an experiment. Looks like it failed. >> >> 2) create a nested div for each level of indentation give those divs the >> same padding as the single line code >> >> On 2010-06-05, at 12:07, André Bargull wrote: >> >>> Do you know of a better way to handle this bug? IMO, this patch is a bit >>> clumsy. >>> >>> - André >>> >>> >>> Change 20100605-bargull-iBh by barg...@bargull02 on 2010-06-05 17:37:38 >>> in /home/anba/src/svn/openlaszlo/trunk >>> for http://svn.openlaszlo.org/openlaszlo/trunk >>> >>> Summary: improve appearance of leading white-space in<programlisting> >>> >>> Bugs Fixed: LPP-5990 (xslt for<programlisting> formats code blocks poorly) >>> >>> Technical Reviewer: ptw >>> QA Reviewer: (pending) >>> >>> Details: >>> The programlisting's code font-size is set to 1.08em to improve readability >>> (see styles.css). But there arises one disadvantage: >>> increasing the font-size also increases the width of the leading >>> white-space in each line. This is clearly not intended. So we'd like to >>> tell the css to increase the font-size only after the leading white-space, >>> but unfortunately this isn't possible (at least I don't know how to do >>> this). This is how I worked around this problem: >>> - when the code is processed in lzx-pretty-print.xsl, I annotate all >>> leading white-space with a<leading-space> element >>> - and in common-html.xsl, the<leading-space> element gets transformed to a >>> simple<span> element with the "leading-space" css-class set >>> - the "leading-space" css-class has got a font-size of 0.926em, which is >>> the reciprocal of 1.08, so it effectively reverts the increased font-size >>> of code blocks >>> >>> styles.css also adds padding for code blocks, but this is actually only >>> useful for single-line code. Multi-line code are now marked with a >>> "multiline" attribute, so it's possible to attach a different css-class to >>> those elements (see common-html.xsl). >>> >>> >>> Tests: >>> ant developers >>> open dguide chapters with programlisting >>> >>> Files: >>> M docs/includes/styles.css >>> M docs/src/xsl/common-html.xsl >>> M docs/src/xsl/lzx-pretty-print.xsl >>> >>> Changeset: >>> http://svn.openlaszlo.org/openlaszlo/patches/20100605-bargull-iBh.tar >>> >> >>
