Le 13 nov. 2013 à 22:44, Colin (Sandy) Pittendrigh <sandy.pittendr...@gmail.com> a écrit :
> many such breakpoints (out there in practice) are defined in ems, even when > the author is thinking pixels, where one EM is calculated as 16 pixels. > > /* for 600px .......(16 * 37.5 == 600) */ > @media all and (min-width: 37.5em) { > > ...css goes here > } > > I've been doing this because the examples I copied did this. But I don't > know why. Can anybody explain this issue? By using ‘em’, you base your media queries on the user chosen font-size. That maybe 16px (default on most user-agents) or it may be more. Both iOS and Android have accessibility options in their general settings to enlarge the text used on the device. Remember that em-based MQs use the browser (device) set of font-size, _not_ the font-size you may have set on the root element of the device. That is especially interesting if your pages are text rich (news site, blogs, etc). You have control over the length of the lines, and that remains consistent independently of the user font-size. On the flip side, if your pages are graphics rich, you might be better off working with MQ’s defined in px (range of physical dimensions of the devices / viewport). Philippe -- Philippe Wittenbergh http://l-c-n.com ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/