primefaces / primereact-sass-theme

PrimeReact Theming with SASS
MIT License
31 stars 40 forks source link

CSS Themes: Override base colours #44

Open CharlRitterDev opened 9 months ago

CharlRitterDev commented 9 months ago

Describe the bug I have imported primereact/resources/themes/bootstrap4-light-blue/theme.css as a base theme for a project. I can override the base primary, secondary, etc. colours in the root, however, that isn't used in the theme itself, rather the colours are hardcoded.

Thus it seems that the only way to replace all the hardcoded colours (in this theme's case all the versions of bootstrap's blue), is to manually find all CSS classes and override them individually to change the colours to our project's colours.

Is there a better way of doing this, because changing these hardcoded instances to use the root-defined vars seems like it would make overriding much more straightforward?

PrimeReact version 10.2.1

React version 18.x

Language TypeScript

Build / Runtime Create React App (CRA)

CharlRitterDev commented 9 months ago

This is possibly the same issue as experienced here