If a user defined style sheet imports additional style sheets, the imported style sheets will only be displayed on first load. To reproduce: (Please see the example attached html and css file) 1) Create a style sheet that does nothing but import another style sheet 2) Define a second style sheet imported by the first style sheet with some simple style definitions 3) In Safari, set your user style sheet to be the first style sheet which import the second one 4) Quit and relaunch Safari 4) Create simple html page which will show the style definitions you added to the second style sheet 5) Load the simple html page in Safari - the styles will be show 6) Reload the page - the styles will vanish Though this is not likely to often be a major issue for average users, the real problem is when a non-webbrowser based app is using WebKit and user defined style sheets to display content. In some cases the content will be rendered completely blank after first being displayed. The work around for this has been to override the cache policy to reload ignoring cache when loading content. This was recently broken and still is in the version of WebKit shipping with Safari 4 beta.
Created attachment 28318 [details] test html file
Created attachment 28319 [details] first test css file
Created attachment 28320 [details] second test css file
<rdar://problem/7206000>
Hyatt thinks this is happening because "user stylesheets don't hold up the display of the document or prevent onload from firing, but they need to".
Created attachment 40148 [details] Patch
Comment on attachment 40148 [details] Patch r=me
Fixed in r48773.
Pat says this actually regressed by the time we shipped Safari 5, so it's broken again. :(
Comment on attachment 40148 [details] Patch Clearing Anders' review since this was landed.