Simon writes:
I think that we should also consider consistently using em or %, not both.
There are some subtle differences, seeĀ http://kyleschaeffer.com/user- experience/css-font-size-em-vs-px-vs-pt-vs/

The differences are not that subtle. :-)

For "font-size", there are no differences, subtle or other, 1em and 100% are exactly the same, 83% and 0.83em are exactly the same, and are related to the parental "font-size". You can replace one with the other but there is no need to do so, it changes nothing.

For "width" there is a huge, not subtle difference, percents are related to the parental "width", ems are related to the parental "font-size". You cannot replace one with the other.

Petko

Petko
On 5 January 2014 11:33, Petko Yotov <<URL:mailto:5...@5ko.fr>5...@5ko.fr> wrote:
   Simon writes:
     PmWiki.css specifies font-size in a number of ways, e.g.
     font-size:11pt;
     font-size:0.9em;
     font-size:100%;
     font-size:1em;
     font-size:85%;
     font-size:9.4pt;
     font-size:1.6em;

It seems to me we should revisit this with a view to using one way throughout, and supporting responsive design.

Note that always 1em = 100%, 0.9em = 90% etc. that is related to the font size of the parent HTML node.

The "points" are indeed absolute units with a fixed size (1pt = 1/72 of an inch) but modern browsers don't enforce them for text sizes if a visitor resizes the text with Ctrl+Scroll or Ctrl+Plus.

Anyways, as browsers all seem to imply that 12pt=100% for a base page, I changed the 3 occurences I found to percents:

   body: 11pt = 11/12 = 91.667%
   sidebar: 9.4pt = 9.4/11 = 85.45%
   %sidehead%: 11pt = 11/9.4 = 117%

With the browsers I have the page looks exactly the same as before, pixel for pixel.

If there is a better way to do it (without disturbing existing wikis much), please share it.

   Petko


_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to