Last active
January 31, 2022 23:56
-
-
Save david-lafontant/7ef668cf2d9fe57130ce0fedd935e527 to your computer and use it in GitHub Desktop.
DRY evaluation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.cat { | |
font-family: "Times New Roman", Times, serif; | |
font-size: 1rem; | |
color: #FFF; | |
} | |
.dog { | |
font-family: "Times New Roman", Times, serif; | |
font-size: 1rem; | |
color: #000; | |
} | |
.dragon { | |
font-family: "Times New Roman", Times, serif; | |
font-size: 1rem; | |
color: #009933; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.greetings { | |
font-family: Arial, sans-serif; | |
font-size: 1.5rem; | |
} | |
.greetings.english { | |
background-color: #000; | |
color: #FFF; | |
} | |
.greetings.spanish { | |
background-color: #FFF; | |
color: #000; | |
} |
example2.css is DRY
There is no redundancy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example1.css is not DRY
To be DRY it could be :
animal{
font-family: "Times New Roman", Times, serif;
font-size: 1rem;
}
.cat {
color: #FFF;
}
.dog {
color: #000;
}
.dragon {
color: #009933;
}