Home › Forums › CSS › Change colour but keeps same styles. › Re: Change colour but keeps same styles.
June 26, 2013 at 1:36 pm
#140588
Member
> is there a way so I only have .flat in once and then it applys to the rest so it is not too much repeating
If you’re just looking at saving a way for you to have to write it out, you’ll want to use Sass/Scss:
.flat {
height: 60px;
width: 150px;
&.red {
background: #bf3f3f;
}
&.pink {
background: #bf3fb4;
}
&.purple {
background: #963fbf;
}
&.blue {
background: #3f3fbf;
}
}