![]() |
Safari is, by and large, a browser with pretty good standards
support. However, it has a few missing features, a few bugs, and a fair
few things that are correct according to the spec but aren’t the same
interpretation as other standards-compliant browsers. This page
discusses this third category of issues: things that Safari is doing
right, but it’s probably not what you expected. For some perspective on
why these aren’t bugs, check out my column “It’s your own damn
default” from July 2002.
Safari supports most HTML 4.0 features, but sometimes in different ways to the defaults of other browsers. There are some variations in default margins of block elements.
fieldset
element, but doesn’t
style it by default. This contrasts with the approach of Mozilla and
IE,
which is to draw a thin grey ridged border around it and add some
padding. Be prepared to specify the styling of these elements fully
if you want consistent presentation in multiple browsers.label
and (as previously mentioned) fieldset
.acronym
and abbr
elements, but its default presentation uses italics rather than adding
a
dotted underline like Mozilla and iCab do.cursive
font-family, while OmniWeb 4.5 users Zapfino. Both use Papyrus for fantasy
.
(This is on a Panther box with all the default fonts installed.)
Bizarrely, Mozilla 1.6 users American Typewriter for both cursive and
fantasy, while Firefox 0.8 users Apple Chancery and what looks like
Trebuchet. Opera 6 for OS X users Apple Chancery and Comic Sans, while
IE 5.2.3 uses Microsoft fonts Brush Script and Comic Sans if they are
installed.
content
with :before
and :after
, at least for text strings and picture
inclusion, but not for attribute extraction using the attr()
syntax, or inclusion of arbitrary text files. However, it should be
noted that Safari renders these in a different way to Mozilla-based
browsers:
text-decoration
on the before and after text turns it off for Safari, but not
for Mozilla, because it is part of the (underlined) link. display
property.text-align
.
As
noted by Safari developer Dave Hyatt, this is probably correct
according to the spec, but it is not consistent with the behaviour
of other browsers.