How can we use the structural style classes

UI Components for React
Post Reply
Sharmilla
Posts: 12
Joined: 01 Aug 2019, 12:09

14 Dec 2021, 07:03

In the primereact documentation some of the css classnames are listed called structural style classes. So why are those specific classnames listed and how should we use that.

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

14 Dec 2021, 15:30

What documentation link are you referring to?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

mcandu
Posts: 107
Joined: 20 Jan 2021, 16:31

14 Dec 2021, 21:21

I guess @Sharmilla is talking about the Styling section that placed on bottom of any showcase demo.
Structural style classes mean classes that used on core level of the component.

Sharmilla
Posts: 12
Joined: 01 Aug 2019, 12:09

27 Dec 2021, 17:26

If I'm overriding a style, can I take dependency on the structural style classes?

For example, If I'm changing the color of "p-paginator-first" class of paginator, is the below approach is a recommended way to that?
.p-paginator .p-paginator-first {
color: black !important
}

And also If I'm using primereact v6.0 and taking dependency of structural style classes and overriding the style, will that affect (meaning should I update the overridden styles when updating versions) when there is MINOR or MAJOR version updating?

mcandu
Posts: 107
Joined: 20 Jan 2021, 16:31

28 Dec 2021, 10:01

It's ok to do that. You can overwrite it. Future releases not affect them.

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests