Le 7 juin 2013 à 17:27, "Jukka K. Korpela" <[email protected]> a écrit :
> But url(#) does not do any good there either, and should be removed. > > If you use background: url(#) with the intent of later replacing # by the > real URL, the style sheet will pass CSS validation even if you forget to do > the replace. > > Using e.g. background: url would not have this problem. But background: ??? > would probably be safer, because then the incompleteness is rather clear even > to the human eye. Hmm, you're missing something: in both your examples the whole rule block will be ignored (being invalid, e.a. Whereas in my example, the other parameters (position/size/color/repeat/...) are applied and remembered. > > And of course, the whole issue should be avoided by arranging things so that > such "placeholders" are not needed. Think of something like this: skins for a forum or a web app. The main stylesheet has all the structure, and most parameters for background(-images). A second stylesheet (loaded based on user preferences, stored in a DB or via cookies) then loads the colours and background images. The background-images are stored in a sprite that only varies in colours (to match or contrast fore- and background-colors) per skin/theme. Philippe -- Philippe Wittenbergh http://l-c-n.com ______________________________________________________________________ css-discuss [[email protected]] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
