On 13 April 2016 at 00:04, Ben Fritz <[email protected]> wrote:
> On Tuesday, April 12, 2016 at 8:44:00 AM UTC-5, Yongwei Wu wrote:
>> I noticed something weird recently in the VIM HTML output (CSS on). It
>> is probably there for quite some time now, but I checked the HTML
>> source only recently.
>>
>> * { font-size: 1em; } (in CSS)
>>
>> I do not see the point of this. It does not seem to affect the result
>> in Chrome, but it makes the font larger in IE than without it.
>>
>
> From 2html.vim:
>
>   " fix browser inconsistencies (sometimes within the same browser) of 
> different
>   " default font size for different elements
>   call append('.', '* { font-size: 1em; }')
>
> I'm not sure exactly what that means or when it was introduced, but I can 
> look into it. Perhaps there is a better way to accomplish this.
>
> I can confirm that the font gets bigger in IE with that in (actually it makes 
> it match Firefox and Chrome fairly closely). This is weird; in a monospace 
> font 1em should already be the width of a character. Setting it to 100% or 
> 1rem instead of 1em seems to do the same thing. Ugh...IE.
>
> Why is the larger text a problem? I figured consistency across browsers would 
> be a good thing, not a bad one...

I think this is dependent on the browser configuration. In my case,
the IE font size with 1 em is apparent bigger than other cases. In
other browsers (with or without 1 em) or IE without 1 em, I get the
standard 10 pt (13 px) Courier New as output.

I guess the reason is that the standard CSS in IE has 10 pt Courier
New for <pre>, and 12 pt ... for <body>. "font-size: 1em" makes <pre>
use 12 pt as well. For some reasons Chrome is not affected by
"font-size: 1em": I verified that it thinks the font-size is still 13
px, the default setting.

Best regards,

Yongwei

-- 
Wu Yongwei
URL: http://wyw.dcweb.cn/

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to