Re: [css-d] What is this CSS?
On Thu, 19 Feb 2009 20:27:43 -0500, David Laakso wrote: Sarah Atkinson wrote: Found this in one of the css files a co worker sent me with his design templete. What is it for? Anyone know? Is it legal? And what is with the * * html #facebox_overlay { /* ie6 hack */ position: absolute; height: expression(document.body.scrollHeight document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } Its an IE expession, DHTML being feed to IE/6 and down-- no support for min/max width or height (many such variations available) depending on the specific need. They are usually hid from the w3c Validation Service by enclosing in a Conditional Comment. http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx So-called conditional comments seemed nice, until I wound up with four additional style sheets just for IE. So I do wonder about the utility of hiding CSS from the validator? I mean, I can and do make mistakes in those hidden style sheets that the validator could catch. As for the non-validating code, well, my British English spell checker tells me that color is spelled wrongly, but in the context of an article about CSS I would simply ignore the error. What is so special about CSS that I need to trick the validator just to get a passing grade? Just wondering. Cordially, David -- __ css-discuss [cs...@lists.css-discuss.org] 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/
Re: [css-d] What is this CSS?
David Hucklesby wrote: What is so special about CSS that I need to trick the validator just to get a passing grade? Just wondering. Cordially, David -- Hiding invalid code from the validator doesn't make that code valid. There is no rule, regulation, or mandate stipulating you need get a passing grade for CSS, or anything else for that matter. It's your call to do as you choose. -- A thin red line and a salmon-color ampersand forthcoming. http://chelseacreekstudio.com/ __ css-discuss [cs...@lists.css-discuss.org] 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/
Re: [css-d] What is this CSS?
David Hucklesby wrote: What is so special about CSS that I need to trick the validator just to get a passing grade? Just wondering. Cordially, David -- Hiding invalid code from the validator doesn't make that code valid. There is no rule, regulation, or mandate stipulating you need get a passing grade for CSS, or anything else for that matter. It's your call to do as you choose. -- A thin red line and a salmon-color ampersand forthcoming. http://chelseacreekstudio.com/ __ css-discuss [cs...@lists.css-discuss.org] 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/
Re: [css-d] What is this CSS?
David Hucklesby wrote: So-called conditional comments seemed nice, until I wound up with four additional style sheets just for IE. So I do wonder about the utility of hiding CSS from the validator? If hiding CSS from the validator is what conditional comments are used for - and that's too often the case, then it's a completely nonsensical exercise. It is something about those holy cows and standards... http://www.gunlaug.no/contents/molly_1_08.html OTOH, hiding _is_ an unavoidable side-effect of targeting IE through CCs though, so it may be excusable in some cases. I mean, I can and do make mistakes in those hidden style sheets that the validator could catch. Indeed. We can of course use the validator to our advantage anyway, by linking directly to the hidden stylesheet. In that respect my @import hacks for serving corrections to IE7 and older IE versions are a lot more problematic. I can only validate those stylesheets through direct input, as responses like this... http://jigsaw.w3.org/css-validator/validator?uri=http://www.gunlaug.no/contents/styles/url(ag2c_con.css)%20allwarning=1profile=css21 ...don't tell me much. As for the non-validating code, well, my British English spell checker tells me that color is spelled wrongly, but in the context of an article about CSS I would simply ignore the error. Holy smoke... http://annevankesteren.nl/2009/02/www-style-thursday :-) What is so special about CSS that I need to trick the validator just to get a passing grade? Getting a passing grade matters a lot to some, even if the code isn't up to it. Some just love those valid icons too much. -- My position on the issue is that if/when we have to serve hacks, CSS hacks are to be preferred. The markup should be as meaningful, flawless and valid (in that order) as we can possibly make it, since the markup is the base everything else acts on. If the bar has to be lowered in order to make a browser behave, then let's lower it for CSS. That CSS hacks are visible to the world shouldn't bother anyone. Most can't see the difference between valid and non-valid code, and couldn't care less. Those who do, should know why both valid and non-valid hacks are sometimes the lesser of many evils. The problem with hacks is *not* that many of them are non-valid, but that those who put them in have too little knowledge about browsers and hacks to justify the hacks existence. Hacking is dangerous business - breaks far more browsers than browser bugs ever did, IMO, and hacks should *only* be introduced when the hacker knows perfectly well what s/he is doing. Leaving all hacks open to the public, and to the validator, is immensely useful when in the process of getting rid of totally unwarranted hacks. regards Georg -- http://www.gunlaug.no __ css-discuss [cs...@lists.css-discuss.org] 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/
[css-d] What is this CSS?
Found this in one of the css files a co worker sent me with his design templete. What is it for? Anyone know? Is it legal? And what is with the * * html #facebox_overlay { /* ie6 hack */ position: absolute; height: expression(document.body.scrollHeight document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } __ css-discuss [cs...@lists.css-discuss.org] 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/
Re: [css-d] What is this CSS?
On Thu, Feb 19, 2009 at 4:58 PM, Jack Timmons jorac...@gmail.com wrote: On Thu, Feb 19, 2009 at 4:51 PM, Sarah Atkinson sarah.atkin...@cookmedical.com wrote: Found this in one of the css files a co worker sent me with his design templete. What is it for? Anyone know? Is it legal? And what is with the * * html #facebox_overlay { /* ie6 hack */ position: absolute; height: expression(document.body.scrollHeight document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } That's a proprietary (and invalid, although it's considered ok in some circles if placed in a conditional comment stylesheet) statement. It sets the height equal to scrollHeight if it's larger than offsetHeight, otherwise sets it to offsetHeight. * selectes all elements, and can be used to target IE (since * html isn't valid). http://www.positioniseverything.net/articles/ie7-dehacker.html http://www.webdevout.net/css-hacks To clarify: * is valid (choses all elements) * html isn't. * html targets IE6 and below. I assume since he's using that it isn't in a conditional commented stylesheet (also since it has Facebook, and therefore is satanic, evil, gives bad karma, and causes you to be reborn as a work mule with osteoperosis and psoriasis ;) ). end copy/paste of my idiocy I'm horrible at responding back to the list instead of the OP. -- -Jack Timmons http://www.trotlc.com Twitter: @jorachim __ css-discuss [cs...@lists.css-discuss.org] 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/
Re: [css-d] What is this CSS?
On Thu, Feb 19, 2009 at 5:22 PM, Atkinson, Sarah sarah.atkin...@cookmedical.com wrote: It's facebox not facebook Sent from my iPhone On Feb 19, 2009, at 6:01 PM, Jack Timmons jorac...@gmail.com wrote: On Thu, Feb 19, 2009 at 4:51 PM, Sarah Atkinson sarah.atkin...@cookmedical.com sarah.atkin...@cookmedical.com wrote: Found this in one of the css files a co worker sent me with his design templete. What is it for? Anyone know? Is it legal? And what is with the * * html #facebox_overlay { /* ie6 hack */ position: absolute; height: expression(document.body.scrollHeight document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } To clarify: * is valid (choses all elements) * html isn't. * html targets IE6 and below. I assume since he's using that it isn't in a conditional commented stylesheet (also since it has Facebook, and therefore is satanic, evil, gives bad karma, and causes you to be reborn as a work mule with osteoperosis and psoriasis ;) ). Point still stands ;) In that case, though, you should put that statement in a conditional comment, if you can, and remove that ugly * html. I misspelled osteoporosis. I blame late work nights. -- -Jack Timmons http://www.trotlc.com Twitter: @jorachim __ css-discuss [cs...@lists.css-discuss.org] 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/
Re: [css-d] What is this CSS?
On Feb 19, 2009, at 10:51 PM, Sarah Atkinson wrote: Found this in one of the css files a co worker sent me with his design templete. What is it for? Anyone know? Is it legal? And what is with the * * html #facebox_overlay { /* ie6 hack */ position: absolute; height: expression(document.body.scrollHeight document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } This is a CSS expression from the stylesheet included with the jQuery modal window plugin Facebox [1], which the template presumably employs. Its purpose is to allow the Facebox overlay background to extend to the full height of the page. * html is a CSS hack for IE6 [2]. Jonny [1] http://famspam.com/facebox [2] http://css-discuss.incutio.com/?page=StarHtmlHack __ css-discuss [cs...@lists.css-discuss.org] 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/
Re: [css-d] What is this CSS?
Sarah Atkinson wrote: Found this in one of the css files a co worker sent me with his design templete. What is it for? Anyone know? Is it legal? And what is with the * * html #facebox_overlay { /* ie6 hack */ position: absolute; height: expression(document.body.scrollHeight document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } Its an IE expession, DHTML being feed to IE/6 and down-- no support for min/max width or height (many such variations available) depending on the specific need. They are usually hid from the w3c Validation Service by enclosing in a Conditional Comment. http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx -- A thin red line and a salmon-color ampersand forthcoming. http://chelseacreekstudio.com/ __ css-discuss [cs...@lists.css-discuss.org] 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/