Without an example it’s hard to say. But let’s assume you use a custom stylesheet, then make sure you use CSS selectors with at least the same selector as the style you want to override, or make it more specific. I understand you don’t want to use important. I’m not a big fan of using IDs for styling as well.
So you can either use your own added classnames, the same CSS selector, or a more specific CSS selector using the context your element is in.
And then make sure your custom stylesheet is loaded later then the library you use.