#19475·primeng

Passthrough [pt] properties are alphabetically sorted, breaking Tailwind and style overrides

Author: xeurunCreated Mar 12, 2026Updated Sep 13, 2026
LabelsType: BugComponent: ThemeResolution: Stale

Describe the bug

When using the [pt] passthrough, all keys values are automatically sorted alphabetically.

This causes unintended side effects:

  • Tailwind utility classes may not apply in the correct order.
  • Style overrides and custom class ordering are broken.
  • Any dependent logic that relies on key insertion order is affected.

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-mmzsp3pp-paji479z?file=src%2Fapp%2Fapp.component.html

Environment

Win 11, WSL2, node v25.6.1

Angular version

21.2.3

PrimeNG version

v21

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

Define a component with [pt] attributes including multiple classes in a specific order (for example [pt]="{root: 'foo bar 4 a b c'}") Observe that the keys are automatically reordered alphabetically, causing style overrides to fail - 4 a b bar c foo,

Expected behavior

The passthrough [pt] keys should retain the order they were defined in, to ensure Tailwind classes and overrides work as intended.