User: Password:
|
|
Subscribe / Log in / New account

Opera moves to WebKit and V8

Opera moves to WebKit and V8

Posted Mar 12, 2013 6:12 UTC (Tue) by Duncan (guest, #6647)
In reply to: Opera moves to WebKit and V8 by alankila
Parent article: Opera moves to WebKit and V8

> I do think CSS is meant to be pixel exact positioning tool, at least if you use pixel metrics.

Perhaps it was meant to be at one point...

As someone in another recent discussion pointed out, even pixels are relative, these days. Even if on first visit there's a 1:1 mapping of physical to logical pixels (and for all I know a browser accounts for the window size and possible average zoom on previous sites and does an initial zoom even on first render), the first thing many people do the first time they hit a site is zoom it to a comfortable size. I know firefox (and I presume all modern browsers) remember the zoom-state, so from there on out, every time a user comes back, the browser automatically zooms to whatever the user preferred, and any page-specified pixel sizes are relative to that.

So even pixel metrics are relative, these days...

(Of course, that's not even considering user controlled rewriting proxies such as privoxy, or technologies such as greasemonkey. I long ago taught my instance of privoxy to replace font px with pt, along with a number of related replacements like ms sans serif with just sans serif. From my filter file (JED are my initials, nice convenient way to avoid namespace pollution; many of these were from when I was using konqueror as my default browser; I could probably revisit some of them now, but if they're not causing issues...):

FILTER: JED-Font Kill various font attributes

# Kill MSSansSerif, as the default replacement for it
# here is virtually unreadable

s+ms sans serif(,?)+m\$ sans serif($1)+isg

# Kill clean, as it's single-sized tiny

s+((\{\s*font-family:[^;]*)|(<font[^>]*))clean+$1unclean+isg

# Kill dynamic-loaded font-faces as they're
# crashing konqueror (2011.0426)

s+@font-face+@font-face-jed-font-killed+isg

# Replace Lucida Console

s+lucida\sconsole+luxi mono+isg

# Replace pixels with points (style)

s+({[^}]*font-size:\s*[0-9][0-9]*)px+$1pt+isUg

# Kill sub-100% font sizes

s+({[^}]*font-size)(:\s*[0-9][0-9]%)+$1-JED-Font-pct$2+isUg

)


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds