BARKINGnoMAD / prj-rev-bwfs-dasmoto

0 stars 0 forks source link

A little repetition in css. #2

Open farishkash opened 7 years ago

farishkash commented 7 years ago

One of the principals of css is to reduce the amount of repetition you use in styling.

So for example your code you only typed font family once

body {
  font-family: Helvetica;
  }

But you typed font-weight: bold; many times.

So just similar to above we know you are using it in your h1, h2, and span so we can condense it down with

h1, h2, span {
font-weight: bold;
}
BARKINGnoMAD commented 7 years ago

This is more correct? `h1, h2, .price { font-weight: bold; }

h1 { font-size: 100px; text-align: center; color: khaki; background-image: url("https://s3.amazonaws.com/codecademy-content/courses/freelance-1/unit-2/pattern.jpeg"); } h2 { font-size: 32px; color: white; } .price{ color: blue; }`

farishkash commented 7 years ago

Yes , I just mention these items because I want to get you into this mind set as a foundation for your upcoming projects and web dev in general.