Jump to content

Developers please read ... css styles


Recommended Posts

Hi,

Using file comparison I have noticed that sometimes the stylesheet has different endings and this makes it hard to keep up with.

Notice the last listing in each style ... in this case it is margin-left: 2px

For instance on svn1845 it shows on this one style:

#center_column div.products_block a.product_description {
   display: block;
   width: 118px;
   height: 50px;
   margin-left: 2px
}


On the svn1854 it shows:

#center_column div.products_block a.product_description {
   display: block;
   width: 118px;
   height: 50px;
   margin-left: 2px;
}


On svn1814 it shows:

#center_column div.products_block a.product_description {
   display: block;
   width: 118px;
   height: 50px;
   margin-left: 2px;
}


My dreamweaver program always puts a semi-colon on the last listing. On some of the other styles there is no space like:

margin-left:2px;


Both ways work but I believe the correct way is:

margin-left: 2px; }


Could the styles have the same format across the board so when using a file comparison program it is much easier to find the changes?

Thank you!

Link to comment
Share on other sites

Hi,

Global.css stylesheet has been improved to suit best W3C recommendations.

The ";" character is not supposed to end a declaration, it only separes multiple declarations, as quoted below :

A declaration is either empty or consists of a property name, followed by a colon (:), followed by a value. Around each of these there may be white space.
Because of the way selectors work, multiple declarations for the same selector may be organized into semicolon (;) separated groups.
Source : W3C.org - Syntax and basic data types
Link to comment
Share on other sites

Ok so this is how they should be listed going forward?

h1 {
font-weight: bold;
font-size: 12px;
line-height: 14px;
font-family: Helvetica;
font-variant: normal;
font-style: normal
}

AND/OR

h2 { font-size: 10px }

Each single declaration for a selector does not have a semi-colon at the end and multiple declarations for a selector have semi-colons at the end of each except for the last one correct?

Thanks!

Link to comment
Share on other sites

×
×
  • Create New...