[wp-hackers] Re: The fixed with of the admin area
Alex Hempton-Smith
hempsworth at googlemail.com
Wed Mar 5 18:49:14 GMT 2008
> The alternate stylesheet is the most elegant solution, as it is
> invisible to people who don't need it. (Which is most.)
I completely agree. However, instead of an alternate stylesheet, what I
would do is the following:
1. Check to see if the user has a large screen size using the jQuery
Dimensions plugin (when minimized 'only about 2k') [1]. So for example, if
screensize is 'X' big, we print "widescreen"
2. If the dimensions count as wide, small, medium, or whatever we choose
according to the jQuery Dimensions results, we give the <body> tag a
specific classname, eg. <body class="widescreen">
3. The main wp-admin.css stylesheet will have different styles according to
that body.widescreen class. This is good because we aren't making another
HTTP request for a different stylesheet entirely, just exceptions for
widescreen sizes.
This is completely transparent for users, means that it changes according to
whatever screen your using (I take back my comment on making it a saved
option, as people access their admin panels from varying sizes of screen).
The overall effect of this is a better experience for varying sizes of
screen, and only 'around 2k' of extra load.
Alex
More information about the wp-hackers
mailing list