Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p-checkbox: Style class not changing when readonly #17628

Open
4 tasks
talha-al opened this issue Feb 10, 2025 · 0 comments
Open
4 tasks

p-checkbox: Style class not changing when readonly #17628

talha-al opened this issue Feb 10, 2025 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@talha-al
Copy link

Describe the bug

When the checkbox is disabled, I make design changes in the style file using the '.p-checkbox .p-checkbox-box:read-only' selector. However, when readonly is false in html, it still takes the ':read-only' class and overrides my checkbox styles.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/github-kewflj8f?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.css

Environment

Not relevant

Angular version

18.1.3

PrimeNG version

v17 (LTS Only)

Node version

23.6.1

Browser(s)

Chrome 133

Steps to reproduce the behavior

When code is written with '.p-checkbox .p-checkbox-box:read-only' in the style, this class is added first and other styles are overridden even if read-only is false.

Expected behavior

When the checkbox is not read-only, it should not take the read-only style

@talha-al talha-al added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant