T
Travis Newbury
Cough, splutter, ... there goes the coffee...
et-tu dorayme?
Cough, splutter, ... there goes the coffee...
In said:More for you to think about: CSS class names of .grey, .white, .yellow
are poor choices of names. What if you want to change the color from
grey to, say, light blue?
.grey {
color: #add8e6; ...
So: <p class="grey"> means "light blue" ...
David said:My background is computer programming and it is accepted practice to
define constants.
programming." said:I might define Pi or Monday, not because I may decide to change the
ratio of a circle's circumference to its diameter or Monday's
position in the week, but because the name makes my code easier to
read than the corresponding number.
By convention, some computer languages demand a different
capitalisation for named constants so, for example, the constant
"grey" should be "GREY". Is there a similar convention for CSS/HTML or
are you arguing that named constants should not be used?
For the purpose of this discussion please ignore the fact that "white"
is already a named constant in HTML so, for that reason alone, it was
a bad choice for the name of my constant.
David Segall said:....
By convention, some computer languages demand a different
capitalisation for named constants so, for example, the constant
"grey" should be "GREY". Is there a similar convention for CSS/HTML or
are you arguing that named constants should not be used?
For the purpose of this discussion please ignore the fact that "white"
is already a named constant in HTML so, for that reason alone, it was
a bad choice for the name of my constant.
My reply to rf was "I wanted to fix a problem that _I_ have with theI get the feeling that you have missed or under noticed rf's points
contained in:
"I only saw the "effect" because you pointed it out and then I had to
look carefully at the actors to determine where they are looking."
and
"Didn't pick that at all, except as per the comment above. Just a bunch
of people I have seen in movies.
"Are you sure you are not trying to inject something into your viewers
experience that you personally experience because that is what you were
thinking when you produced the collage?"
I mention this because I was thinking rather the same thing.
Thanks dorayme. I believe your view of Happy-Go-Lucky was a temporary(btw David, I saw Grand Torino and Revolution Road" recently, both good,
the latter quite simply brilliant (an absolute credit to the director
and cast))
Your every wish is my command!(btw2. Never mind the reviewers you mention, I think it is time to have
dorayme listed on your site for each film. You only have to ask. And
please start by giving Poppy an extra star.)
Beauregard T. Shagnasty said:I'll certainly agree with that, except that HTML and CSS aren't
"programming."
div.pi { width: 3.14in; |
<div class="pi"><img ...></div>
and then next week the client says "make this part wider"...
(Yeah, I know that's just an example.)
For defining color classes, I use names like:
/* Specific colors */
.ccool {background-color: transparent; color: #0000ff; }
.cverycool { background-color: transparent; color: #191970; }
.chot { background-color: transparent; color: #8b0000; }
.cveryhot { background-color: transparent; color: #ff0000; }
.cfunny { background-color: #dcdcdc; color: #9932cc; }
.chighlight { background-color: #fdf5ca; color: #000; }
.creturn { background-color: transparent; color: #006400; }
then if the client says he wants the 'cool' of blue to be purple
instead, I only need to change that one color code, and don't have to
search dozens/hundreds of pages changing <span class="blue"> to <span
class="purple">.
(I also never use real English words for classes/variables, etc.)
Not sure what you mean about "white" being an HTML constant. I didn't
know that HTML even had constants.
David said:All that is perfectly valid for naming things that may change. It
would be foolish, and very confusing, to name something pi simply
because it had a value close to pi on the day you wrote the HTML.
On the other hand, I think meaningful names make the markup more
readable
and warn someone who has to maintain my site that changing the
properties is likely to break the site.
For example, I have three classes called leftImage, centeredImage and
rightImage. They have the properties, and only the properties, that
achieve the desired alignment and that I believe should not be
changed without reviewing the entire site.
It has the consequence that if you decide to change my site so that
the posters on the film page are aligned to the left you will have to
change the class name. I think the advantages of meaningful names
associated with site-wide property definitions far outweigh that
disadvantage.
I wonder if anyone apart from you and a few other contributors to thisdorayme said:Ideally, yes, the HTML should be as pure as the driven snow. But
realities dictate the use of divs with presentation firmly in mind.
David said:Of course you should make some educated guesses about which attributes
might change. By specifying the style properties of every element
in-line you can change almost anything instantly.
to be placing a style= said:.. Why stop at defining the colours in .cfunkey? The client might want
to change only some of the funkey coloured elements.
Beauregard T. Shagnasty said:True. I just extended the example using the word you supplied.
That is exactly what I meant. We see a lot of samples in these groups
where authors use class or id names such as: left, middle, right. Those
may work .. until the client says, "I'd like the menu on the other
side."
It is much more meaningful to use: menu, content, ads
as the section names, don't you think?
If that someone knows that "menu" is, well, the menu, there should be no
problem.
"leftImage" etc is fine. If you are going to move an image to the other
side of the page, you'd change the class name to "rightImage".
Well, yes. I believe that is what I am saying. ;-)
Well, maybe not total agreement. If "#FFFFFF", "white" and "Helvetica"Oh. I don't see "#FFFFFF" or "white" as a constant, no more than I
would see "Helvetica" as a constant.
David said:We now seem to be in total agreement. I only disagreed when you said
"(I also never use real English words for classes/variables, etc.)".
there is an actual element said:If you can produce a class .menu that can be horizontal, vertical,
left, right, top or bottom by changing some properties I regard that
as an ideal class name.
I also regard it as a significant achievement and urge you to publish
it here. I name mine .leftMenu to caution the maintainer that it is
likely to fall apart if they change its position or orientation.
I would avoid the name .mfunny mainly because it does not give any
useful information about the menu but, deep down, because I hate any
prefix notation.
Well, maybe not total agreement. If "#FFFFFF", "white" and
"Helvetica" as the understood value of the appropriate properties are
not constants how would you describe them?
No, but both programmers and HTML authors aim to produce material that
can be easily understood and maintained by their successor.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.