I avoid using !important at all costs but have to use it as a last resort sometimes (jqxWidgets for example puts many of its styles directly on the element using inline styles so it is very hard to avoid customizing without !important).
The preferred approach is to specify css selectors that have higher specificity than what the library is using.
So #1 is to ensure that your styles are loaded after the library styles: last one in wins. But specificity counts too. If the library has a css selector that is more specific than yours then it'll win even if yours is loaded second.
So what are examples of specific selectors?
if your DOM looks like this
<div class="foo">
<ul>
<li>
<span class="bar">something</span>
</li>
</ul>
</div>
Then this type of selector will be very specific b/c it takes this specific type of DOM structure into account.
.foo > ul li .bar { /* style goes here */ }
Customizing a 3rd party library is a game of who can make the most specific css selectors.