![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| ||||
| ||||
|
|
What do the FAQs say about specifying color whenever you specify background, and vice versa? |
|
It is essential to set color whenever you set background. |
|
As to his dogmatic assertion that <strong> should be used rather than span class="foo" >, then that's just pedantry stretched beyond the boundaries of rationality. HTML's semantics aren't sophisticated enough, let alone rigid enough, to require any absolute dogma like this. Agreed! :-D So you now say that you agree with someone who says that there is no point in using semantically correct markup is better than semantically empty markup? |
|
rather than <span>. My disagreement with your post is twofold: trivally that I'd use <em> "Indicates emphasis." rather than <strong> "Indicates stronger emphasis.". Mainly though I <strong>disagree</strong> (note the "stronger emphasis") that the use of <span> is "essentially wrong". |
#12
| |||
| |||
|
|
Jukka K. Korpela wrote: It is essential to set color whenever you set background. Which is simply wrong. It's far from "essential" to do this. It's good practice to do it, and it's even important to consider doing it. But the real need is to check that the colours are going to be compatible, and you can do that (more slowly) by studying the CSS context of the test of the page. [...] |
|
You will probably retort with some straw-man argument about the need to cope with user stylesheets over-ruling the page's default foreground color. It's a fair point to raise, but an explicit foreground color wouldn't fix it either. [...] |
#13
| |||||||
| |||||||
|
|
Jukka K. Korpela wrote: What do the FAQs say about specifying color whenever you specify background, and vice versa? What you said was this: It is essential to set color whenever you set background. Which is simply wrong. It's far from "essential" to do this. |
|
But the real need is to check that the colours are going to be compatible, |
|
If your page is demonstrably never going to set an incompatible foreground for your chosen highlight background, then setting foreground explicitly is superfluous and certainly not "essential". |
|
You will probably retort with some straw-man argument about the need to cope with user stylesheets |
|
an explicit foreground color wouldn't fix it either. |
|
So you now say that you agree with someone who says that there is no point in using semantically correct markup is better than semantically empty markup? I said nothing of the sort. |
|
Mainly though I strong>disagree</strong> (note the "stronger emphasis") that the use of <span> is "essentially wrong". |
#14
| ||||
| ||||
|
|
Actually if someone uses a user stylesheet then he should know what he's doing. |
|
If he wants to override certain properties then it's _his_ task to do it properly by setting his own background _and_ foreground colors. |
|
I as the author just have to make sure that the site works well in all normal and usual situations. |
|
I don't have to care much about the user's own stylesheets. |
#15
| ||||
| ||||
|
|
Scripsit Michael Fesser: If he wants to override certain properties then it's _his_ task to do it properly by setting his own background _and_ foreground colors. So you require a user to do something that you, as an author, don't bother doing? |
|
There's nothing technically wrong with, say, a user style sheet like * { background: black; color: white; } When a page becomes a mess because an author style sheet sets, for some element, background color but not content color, it is definitely the author's fault. |
|
I as the author just have to make sure that the site works well in all normal and usual situations. For that, you need to understand the "C". |
|
I don't have to care much about the user's own stylesheets. So why do you think they call CSS _cascading_ style sheets? Things would be simpler if user and author style sheets wouldn't need to coexist. But they do. |
#16
| |||
| |||
|
|
Even with a "properly" written stylesheet, which specifies all colors, the site might still look a bit messy, like a patchwork. Something like * {background: black !important; color: white !important} would make more sense, if the user really wants to make sure that the site adheres to his preferences. |
#17
| |||
| |||
|
|
Scripsit shapper: In the results web page I would like to give a grey background to the words which were used as Keywords for the search. Is this a trick question? At least the three answers you've got are essentially the same, and essentially wrong. So maybe it was a genuine question, though it looks _very_ elementary. Use <strong> markup for the words, optionally with a class attribute if you use <strong> for other emphasis as well |
|
, and something like strong { background: #ddd; color: black; font-weight: normal; padding: 0 0.1em; } |
#18
| |||
| |||
|
|
This wasn't about _your_ preferences but about a possible user style sheet that is, unlike _your_ author style sheet, technically correct. |
#19
| |||
| |||
|
|
.oO(Jukka K. Korpela) This wasn't about _your_ preferences but about a possible user style sheet that is, unlike _your_ author style sheet, technically correct. Mine is technically correct as well. |
|
A warning is not an error. |
|
And some people even consider that warning a bug. |
#20
| |||
| |||
|
|
It's not technically correct to use CSS code that does not take the cascade into account. Technical correctness is more than obeying syntax rules. Setting body { color: black; background: black; } does not violate any syntax rules either, but it is not technically correct. |
![]() |
| Thread Tools | |
| Display Modes | |
| |