Skip to content Skip to sidebar Skip to footer

Css Adjacent Sibling Selectors, Safari And

In Safari 5.1.3 I have just noticed that, when writing a CSS adjacent sibling selector (er the + one) and when referencing a

Solution 1:

This is definitely a Safari bug and you should report it using Safari > Report Bugs to Apple... on a Mac or Help > Report Bugs to Apple... on a PC (or the toolbar button if it's displayed on your Safari toolbar).

The easiest way out of this is to disable CSS minification if Asset Packager has an option for it.

If it doesn't have such an option, there exists a quick and dirty workaround: if you only have one nav element directly following your h1, you can use the general sibling selector ~ instead as Safari doesn't appear to have any problems with it:

h1 ~ nav { ... } /* works fine */h1~nav { ... } /* works fine */

jsFiddle preview

If you have multiple nav elements following your h1, you'll have to override the styles manually for the successive nav elements using h1 ~ nav ~ nav.

Post a Comment for "Css Adjacent Sibling Selectors, Safari And