Sent by Jonny Axelsson on 25 February 2005 09:09
On Thu, 24 Feb 2005 21:42:01 +0800, Andrew Gregory [EMAIL-REMOVED]>
wrote:
> On Thu, 24 Feb 2005 07:22:00 -0500, Scott Hamm [EMAIL-REMOVED]>
> wrote:
>> I already worked on a design for Firefox and IE and they both works.
>> Opera didn't get it correctly, so, is there any web page that explains
>> on how to hack codes for Opera?
> Only Opera currently supports media queries, so the following: [...]
> Having said that, it would probably be best to see the actual problem. A
> page working in IE and Firefox, but not Opera is fairly unusual. There
> may be a better solution.
Yes, I am sceptical to use hacks not based on specific browser errors like
parser errors, and would use great caution even then. In particular hacks
based on standard features is risky (for Opera that could be features like
Media Queries or 'content' on elements, for Mozilla that could be some
CSS3 selectors). Other browsers will implement those features and in any
case future versions of Opera will use them.
If Opera has a bug relative to CSS2.1, Opera will fix it. If Firefox has a
bug relative to CSS2.1, Firefox will fix it. This means that the hack will
fail either in Opera or Firefox after that. If the problem isn't related
to CSS2.1 the discrepancy may or may not remain for a while, depending on
whether we consider it to be a problem or not.
WARNING: Media Queries and other media
If you just need a temporal fix Media Queries may be the best one, it
works and it doesn't hurt anyone, but I would like to give a future
warning to avoid this hack from turning destructive.
We also see MQ as an indicator of whether the designer is device-aware or
not. Most designers don't consider other devices like phones or TV or
speech and we change the presentation to work better with the device (e.g.
Small-screen rendering [1]). If there is a handheld stylesheet or a mobile
DTD we assume the designer has considered how it will work with phones.
Similar heuristics are likely to apply for home media (@media tv) and
voice (@media speech), and indeed should already have been applied to
presentations (@media projection).
Media Queries can do all this and more, and though we haven't used MQ for
heuristics in our current products we will in the future. Consider the
rule "@media screen and (min-width: 480px)". This is very similar to a
sign saying "This shop is closed on Saturdays and Sundays". It is
reasonable to assume that that shop is open Mondays to Fridays. The same
way we will assume that you have considered designs with widths smaller
than 480px and not turn on device specific handling. If you have not your
page might work badly in a phone, while other sites will work well.
[1] <http://my.opera.com/dev/device/ssr/>
--
Jonny Axelsson, Documentation, Opera Software ASA
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/