if one writes
.ms-webpart-titleText.ms-webpart-titleText {
color:white ! important;
}
One clearly has no clue how CSS Selectors work
The double class Selector was copied from Corev15.css,
it shows that some Microsoft developer ran into trouble styling .ms-webpart-titleText
elements and increased its Specificity by repeating the class Selector so that its style definition would be applied over any later defined CSS rule with a single class .ms-webpart-titleText
Selector.
That Developer did not use !important
to solve the problem because he/she understood what CSS Specificity does.
Applying !important
is the most brutal way of overloading CSS and destroys any capability of re-styling the element.
If you use this in a real WebDevelopment team you will get some serious flack from real designers.
In this case !important
is preventing the .ms-webpart-titleText > a
color from being applied.
That is the rule coloring the Title
So use the proper CSS selector:
.ms-webpart-titleText > a {
color:white;
}
when your CSS loads after Corev15.css
Or use
H2.ms-webpart-titleText > a {
color:white;
}
when you want your CSS to trump Microsofts Specificity
(and be applied no matter when your CSS loads)