Re: [css-d] Quickly Removing Formatting from an Element
On 05/03/2008 02:26, Felix Miata wrote: According to Philippe's response it looks like FF3 will provide some sorely need defensive power for the inane presumption that color: #333 is preferable to #000 on background-color: #FFF. I know I'm OT here, but I find that easier than black on white. Actually, my default is set as #333 on #ccc, but I sit close to the screen and sometimes have to change that depending on ambient light. Are there any readability studies out there on this topic? I know, for example that it's harder for dyslexics to read black on white than a lower contrast combination. -- http://antanova.blogspot.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/
Re: [css-d] Quickly Removing Formatting from an Element
Jason Crosse wrote: I know I'm OT here, but I find that easier than black on white. Actually, my default is set as #333 on #ccc, but I sit close to the screen and sometimes have to change that depending on ambient light. I don't think you're all that much OT here, because you bring in factors that CSS is often (or more or less all the time) used to adjust our designs for. The potential problem with this and many such design-adjustments, is that users may have already adjusted their own hardware and software to suit their preferences or needs, and it will work well on most web sites too - except on sites where the designers impose too many corrections for what they experience on their own equipment, onto visitors. CSS provides us with the means to make numerous adjustments to a web document, whether it is to improve things for the user, getting a certain design-balance, or because the designers' equipment and settings are less than optimal and CSS is used to adjust for that. Equipment and settings are literally all over the place, so factors like light and contrast are pretty wide-ranged at all ends. Thus, it is good that users can defend themselves against author styles, and it is even better if designers have a fairly good idea what may happen when users use such defensive powers and make reasonably sure their creations survive in a usable way despite such defenses. Are there any readability studies out there on this topic? I know, for example that it's harder for dyslexics to read black on white than a lower contrast combination. Try asking that question on http://www.webaim.org/discussion/, or maybe on http://www.accessifyforum.com/. You'll probably end up with a wide range of answers, even if you find a somewhat reliable study on the subject. regards Georg -- http://www.gunlaug.no __ 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/
[css-d] Quickly Removing Formatting from an Element
Hey all, While I'm sure this isn't possible, for the sake of harmony in the workplace I'm posing this problem: Because of the way this site I work with and the CSS was coded, we have a statement like: input {background: none;borders: none;} A coworker wishes to have a submit button that removes any of the previous formatting done. I can't think of a method to do so (namely because I use selective formatting and should never need to undo formatting like that). If any of you have an example, line etc I'd appreciate it. Maybe I'll learn something new! -Jack Timmons __ 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/
Re: [css-d] Quickly Removing Formatting from an Element
The C in CSS stands for Cascade. It's inherently designed to, uh, cascade. Though it makes your life more difficult, I think your best bet may be to declare all your rules with explicit selectors: e.g. for every other thing on the page, do... #path .to .item input { } ...not just a blanket... input { } otherwise the main rule overrides. __ 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/
Re: [css-d] Quickly Removing Formatting from an Element
Jukka, I had a spelling error in borders; it is incorrect, but is just an example. And simply put, she wanted an easy method for saying I don't want this button to have any of the previous global formatting applied to it. I truly understand that global formatting like that is erroneous, but because I try to be a good guy, I offered to ask you all, since to my knowledge there was no way. -Jack Timmons On Tue, Mar 4, 2008 at 11:04 AM, Jukka K. Korpela [EMAIL PROTECTED] wrote: That sounds odd and may cause rather unpredictable results (especilly if you actually have border, not borders, which does not exist in CSS), unless you have rules that set backgrounds and borders for input elements that need them. I beg your pardon? That would involve something external to CSS, either client-side or server-side scripting. Or do you mean that he or she wants to have a submit button _for which_ some previously formatting is not applied? There is no way to undo things in CSS in general. You can override a setting for a property by setting it to a specific value, but you cannot tell browsers to apply their defaults, against any settings that might exist elsewhere in stylesheets. Jukka K. Korpela (Yucca) http://www.cs.tut.fi/~jkorpela/ http://www.cs.tut.fi/%7Ejkorpela/ __ 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/
Re: [css-d] Quickly Removing Formatting from an Element
Jukka K. Korpela wrote: There is no way to undo things in CSS in general. You can override a setting for a property by setting it to a specific value, but you cannot tell browsers to apply their defaults, against any settings that might exist elsewhere in stylesheets. We could try to reset every property to its defaults, but I wouldn't recommend it. There are also Javascript techniques for this, such as http://labs.gandrew.com/drupal/files/forcestyle.js.txt But I think other posters are correct that you really need to apply your formatting more selectively rather than try to remove it later. Good luck, -- Scott __ 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/
Re: [css-d] Quickly Removing Formatting from an Element
Scott Sauyet wrote: We could try to reset every property to its defaults, but I wouldn't recommend it. Neither would I, especially since it would _not_ undo the formatting. If by defaults you mean initial values as specified in CSS specs, then the idea fails, even in principle, because a) not all initial values are fixed (e.g., font-family is browser-dependent) b) initial values need not be the same as browser defaults, and they very often aren't for form fields. If you mean browser defaults, then the idea fails because we don't know them, in a reliable way. Jukka K. Korpela (Yucca) http://www.cs.tut.fi/~jkorpela/ __ 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/
Re: [css-d] Quickly Removing Formatting from an Element
Jack Timmons wrote: Because of the way this site I work with and the CSS was coded, we have a statement like: input {background: none;borders: none;} That sounds odd and may cause rather unpredictable results (especilly if you actually have border, not borders, which does not exist in CSS), unless you have rules that set backgrounds and borders for input elements that need them. A coworker wishes to have a submit button that removes any of the previous formatting done. I beg your pardon? That would involve something external to CSS, either client-side or server-side scripting. Or do you mean that he or she wants to have a submit button _for which_ some previously formatting is not applied? There is no way to undo things in CSS in general. You can override a setting for a property by setting it to a specific value, but you cannot tell browsers to apply their defaults, against any settings that might exist elsewhere in stylesheets. Jukka K. Korpela (Yucca) http://www.cs.tut.fi/~jkorpela/ __ 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/
Re: [css-d] Quickly Removing Formatting from an Element
On 2008/03/04 19:04 (GMT+0200) Jukka K. Korpela apparently typed: There is no way to undo things in CSS in general. You can override a setting for a property by setting it to a specific value, but you cannot tell browsers to apply their defaults, against any settings that might exist elsewhere in stylesheets. Anyone have any insight on why the specs don't provide such a capability? -- Let us not love with words or in talk only. Let us love by what we do. 1 John 3:18 NLV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://mrmazda.no-ip.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/
Re: [css-d] Quickly Removing Formatting from an Element
On Tue, 04 Mar 2008 11:10:57 -0600 Jack Timmons wrote: Jukka, I had a spelling error in borders; it is incorrect, but is just an example. And simply put, she wanted an easy method for saying I don't want this button to have any of the previous global formatting applied to it. Using an ID on an element such as a button lets you compose CSS for that element independant from the rest of the website. http://www.google.com/search?hl=enq=css+specificity+tutorial It could also be that i have totally misread your needs. -- Michael All shall be well, and all shall be well, and all manner of things shall be well - Julian of Norwich 1342 - 1416 __ 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/
Re: [css-d] Quickly Removing Formatting from an Element
On Mar 5, 2008, at 2:04 AM, Jukka K. Korpela wrote: There is no way to undo things in CSS in general. You can override a setting for a property by setting it to a specific value, but you cannot tell browsers to apply their defaults, against any settings that might exist elsewhere in stylesheets. CSS 3, the 'initial' keyword as value for (any) property: uses the UA defaults. That is implement for nearly all properties in FX 3b (with the the - moz- prefix). http://www.w3.org/TR/css3-values/#keywords http://developer.mozilla.org/en/docs/CSS:initial (won't help the OP...) 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/
[css-d] Quickly Removing Formatting from an Element
Anyone have any insight on why the specs don't provide such a capability? Insight? No. But, to me common sense dictates that if you don't want an item styled, then you don't style it to begin with. Now in this case someone is asking for a default style, however my gut reaction is that they don't truly comprehend that default varies based on browser and user settings (as Jukka pointed out). My guess is that if you styled a button based on the default style OF THEIR BROWSER they would be satisfied. I find it hard to believe that one user/manager/whomever would actually test the button on multiple browsers and platforms in a side-to-side comparison with an input type=button / that is in a bare XHTML page. ...Rob Rob Emenecker @ Hairy Dog Digital www.hairydogdigital.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/
Re: [css-d] Quickly Removing Formatting from an Element
On 2008/03/04 20:11 (GMT-0500) Rob Emenecker apparently typed: Felix Miata wrote: Anyone have any insight on why the specs don't provide such a capability? Insight? No. But, to me common sense dictates that if you don't want an item styled, then you don't style it to begin with. Those who have replied to my question so far have failed to take into account that the page author's CSS is not the ultimate authority on styles applicable to any given page, element, class or id. According to Philippe's response it looks like FF3 will provide some sorely need defensive power for the inane presumption that color: #333 is preferable to #000 on background-color: #FFF. -- Let us not love with words or in talk only. Let us love by what we do. 1 John 3:18 NLV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://mrmazda.no-ip.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/