carlwoodwiss / prj-rev-bwfs-dasmoto

0 stars 0 forks source link

Great work on abstracting common styles to your classes #3

Open zannain opened 6 years ago

zannain commented 6 years ago

Really great work in abstracting common styles such as font-weight, font-family and color to strong element selector. I would caution against abstracting these common styles to an element selector because as your webpage gets larger you may want the default behavior of <strong> and going back and changing it in your stylesheet will cause unexpected behavior in other parts of your page that had the <strong> element. Instead, I would recommend creating a class .strong and passing the same styles. This is in fact how CSS frameworks like Bootstrap and Tailwind operate. They create classes with certain styles and anybody using the framework just has to call those styles in their HTML markup to style the webpage without ever having to touch the CSS stylesheet.