Reputation: 12103
Is there a way to set the background colour of a div in blueprint?
I noticed that class=error will set the colour to pink (notify/success are similar):
<div class="error">
<p>whatever</p>
</div>
But I want to know if there is a way to set the div to some arbitrary color?
EDIT: I don't actually care about error/notify/success. I just want to be able to set the color of a div in a similar way that they do, but using a color of my choice.
Upvotes: 0
Views: 860
Reputation: 526923
Just... define your own CSS class and set the background
and/or (for font color) color
properties to color values; then set a div to have that as one of its classes?
Upvotes: 2
Reputation: 67859
You can set any color on this particular div
by adding an id
attribute:
<div class="error" id="myblueprint">
<p>whatever</p>
</div>
Then add in your CSS file:
#myblueprint { background:blue; }
Upvotes: 0
Reputation: 7163
Yes, you can easily over-ride the CSS by specifying a rule for error
in your main CSS file.
That should ideally over-ride the default colors. Else, just ensure that you use a higher specificity in your rule, something like: div.container div.error { color: red; }
Upvotes: 1
Reputation: 186632
Time to state the obvious - why can't you just override the div.error
rule with your own?
div.error { background:black; color:#fff; }
.. or are you not trying to break some sort of weird convention? If so you can use a different classname.
Upvotes: 2