While overriding styling of PrimeNG components, should we limit ourselves only to documented structural style classes?

UI Components for Angular
Post Reply
daudiam
Posts: 1
Joined: 11 Aug 2022, 21:11

11 Aug 2022, 21:18

In the documentation for each component in PrimeNG (like, for table, here), we find a list of structural style classes. Our assumption is that we're supposed to override styling of these components using only these documented classes because PrimeNG might change the undocumented classes anytime. Is this assumption right?

In some components, it becomes almost impossible to change styling without touching any class other than those mentioned in the documentation. For example, when you select a row in a table, a class "p-highlight" gets added to the row and the CSS corresponding to this class gets applied (from the chosen theme). If I want to change the styling of selected rows (like the highlight color), I'll have to use "p-highlight" in my CSS rules, but we're not supposed to do that.

What is the right way to approach this issue?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: Seo-Ul-But and 3 guests