vjcmacrury / prj-rev-bwfs-tea-cozy

0 stars 0 forks source link

DRY CSS #5

Open jordanwillis opened 6 years ago

jordanwillis commented 6 years ago

Your CSS overall looks really good as well. One way that you can further improve your CSS is to begin practicing applying the DRY (don't repeat yourself) principle. The DRY principle aims at eliminating duplicate code that could otherwise be removed through some sort of re-organization or re-factoring. In the case of CSS, applying the DRY principle would mean getting rid of duplicated properties/styles throughout your stylesheet.

There are many techniques to removing the duplication such as applying a property in a broader selector, and creating a single class that can be repeated throughout your HTML. An example of applying this DRY technique would be to create a generic flex container class that you can then use for the header, teas of month, and locations section...

.flex-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

This would eliminate all the duplicated flex container related properties that you are applying for each individual classes section.