CSS grouped styles (selectors)

You can create a style which adds a property to multiple styles simultaneously.

For example, say you had some text styles and had not specified the text color so they all defaulted to black ..

h1 {
font-size: 42px;
font-weight: bold;
Line-height: 44px
}

h2 {
font-size: 32px;
font-weight: bold;
Line-height: 34px
}

p {
font-size: 12px
font-weight: normal;
Line-height: 14px
}

Now you want to change them to this color .. #636. You could edit them like this ..

h1 {
font-size: 42px;
font-weight: bold;
Line-height: 44px
font-color: #639;
}

h2 {
font-size: 32px;
font-weight: bold;
Line-height: 34px
font-color: #639;
}

p {
font-size: 12px
font-weight: normal;
Line-height: 14px
font-color: #639;
}

 

But with a grouped selector you can simply do this ..

h1, h2, p {
font-color: #639;
}