Closed eboileau closed 7 months ago
By the way, we could simplify the color definition as follows:
crmb: {
DEFAULT: 'rgb(2 176 237 / <alpha-value>)', // #02b0edff
1: 'rgb(114 191 132 / <alpha-value>)', // #72bf84ff
...
}
We could use the important modifier in the config or prefix classes with !
, but I don't think this is the right solution...
Classes are sometimes applied in an order that I don't understand, e.g. checkbox with text-white ... text-crmg
with higher priority for text-white
, despite text-crmg
coming after (being specified in pt
global or local). There is also probably some interaction with the Section slots...?
This is definitely the case that classes are added one on top of the other, and get mixed-up somehow, as some definitions systematically get overridden, though I cannot see it. So I use !
wherever this doesn't work.
Anyway, I tried to move the app logic/style into a global pt
, and use local pt
for local variations.
I do NOT use unstyled: true
???
And I still don't understand why I have to re-declare ptOptions
For now, that's the best I can do, with my current understanding.
A clear and concise description of what the bug is.
Adding custom colors to
pt
property has unexpected/inconsistent behavior.When I implement the change, it works. But if I stop the app and restart it, then
customcolor0
is not working anymore, and the default PrimeVue Tailwind theme is used. Same thing actually if I replace e.g. withhover:bg-[#00b051]
. Then if I change something, e.g.hover:bg-[#00b052]
, it works, but reverting back tohover:bg-[#00b051]
doesn't. In some cases, i.e for some colors, the color doesn't work at all...?! I don't understand, and I have no clue what is causing this.Output or error messages.
No response
Additional context
I don't know if this is only due to Tailwind configuration, or some interaction with PrimeVue. I'm currently using unstyled mode, with the following Tailwind setup
@layer
configuration in style filept
and global configurationIn theory, a particular component can override a global configuration since the
pt
props of a component and the global setting is merged with component having higher precedence. In practice, I've experienced a different situation... but since I have been changing a lot of things, I cannot really reproduce everything, and I still need to go through each and every component.One thing is sure, though, is that colors are not working as expected, or there is something wrong with my understanding of the setup?
Tailwind is installed as a PostCSS plugin.
What browser were you using?
Firefox
What version of Sci-ModoM were you using?
dev