Named Constants [was Re: A problem for "fluid design" experts.}
- From: David Segall <david@xxxxxxxxxxxxxxx>
- Date: Fri, 06 Feb 2009 15:55:27 GMT
In a separate thread Beauregard T. Shagnasty wrote:
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" ...
My background is computer programming and it is accepted practice to
define constants. 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.
.
- Follow-Ups:
- Re: Named Constants [was Re: A problem for "fluid design" experts.}
- From: dorayme
- Re: Named Constants [was Re: A problem for "fluid design" experts.}
- From: Sherm Pendley
- Re: Named Constants [was Re: A problem for "fluid design" experts.}
- From: Beauregard T. Shagnasty
- Re: Named Constants [was Re: A problem for "fluid design" experts.}
- Prev by Date: Re: Want to use url to post the data in form.
- Next by Date: Re: Named Constants [was Re: A problem for "fluid design" experts.}
- Previous by thread: Want to use url to post the data in form.
- Next by thread: Re: Named Constants [was Re: A problem for "fluid design" experts.}
- Index(es):
Relevant Pages
|