robbiewolff / prj-rev-bwfs-dasmoto

0 stars 0 forks source link

CSS repetition font family. #6

Open farishkash opened 6 years ago

farishkash commented 6 years ago

https://github.com/robbiewolff/prj-rev-bwfs-dasmoto/blob/938d1d76368cd4febd3df0895e6c1b8a5c68e9c2/Arts%20and%20Crafts/CSS/style.css#L3

The CSS file has a lot of repetition, I am dividing this into two issues.

Whenever styles are being repeated, alternatives should be considered to reduce this. One of the reasons CSS was invented was to reduce the amount of styling was needed on a website.

So for font family, the same one is being used throughout the webpage. A universal selector can be used to write this once.

* {
font-family: "Helvetica"; 
}
robbiewolff commented 6 years ago

Got it. So for universal selector it would be this on my .css file:

h1 { color: khaki; font-size: 100px; font-weight: bold; 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; background-color: mediumspringgreen; } .frames { font-size: 32px; font-weight: bold; color: white; background-color: lightcoral; } .paint { font-size: 32px; font-weight: bold; color: white; background-color: skyblue; } .bluebold { color: blue; font-weight: bold; }