Is !important necessary in the base CSS?

Is !important necessary in the base CSS?

effkayeffkay Posts: 12Questions: 3Answers: 0

The base CSS for DataTables contains several instances of the !important-property. While this is perfectly valid CSS, it is preferrable to avoid using it unless it is absolutely necessary. !important-bloated CSS may cause headaches for maintainers further down the road. I would therefore argue that it would be better if the base CSS does not contain !important-props thus allowing for devs to override base rules (and the framework-specific ones as well) without having to use !important.

So, is the !important-usage necessary to DT's styling?

Thanks.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    Yup - completely take that point. Its there in the Bootstrap integration stylesheet to effectively override the Bootstrap styling. But a more selective selector would indeed be preferable. Noted as a bug.

    Allan

This discussion has been closed.