ariaug / prj-rev-bwfs-dasmoto

0 stars 0 forks source link

Proper css formatting. #1

Open farishkash opened 6 years ago

farishkash commented 6 years ago

https://github.com/anicaug/prj-rev-bwfs-dasmoto/blob/68a44c46cce1cdad3f807d71f7d7e3354179dec6/DasmotosArts/resources/css/style.css#L1-L8

Readability is a big thing with programming. Putting multiple styles on one line makes it harder to find errors such as missing semicolons, spelling mistakes, and incorrect styles.

The concept of a css block is that it starts with the identifier, then the opening bracket. Then each style on its own line, with the closing bracket on its own line at the end.

Your code reformatted below

html {
    font-family: Helvetica;
}
 h1 {
    font-size: 100px;
     font-weight: bold;
     color: khaki;
     text-align: center;
     background-image: url("https://s3.amazonaws.com/codecademy-content/courses/freelance-1/unit-2/pattern.jpeg");
}
 h2 {
    font-size: 32px;
     font-weight: bold;
     color: white;
}
 h4 {
    font-weight: bold;
}
 .price {
    color: blue;
}
 #brushes {
    background-color: mediumspringgreen;
}
 #frames {
    background-color: lightcoral;
}
 #paint {
    background-color: skyblue;
}
ariaug commented 6 years ago

Oh, awesome! That structure makes sense. Thank you for pointing me in the right direction!