@property registers typed custom properties so browsers can animate and validate them more reliably.
Why register property?
- Type safety for custom values.
- Smooth transitions/animations on custom properties.
- Defined initial value and inheritance behavior.
Important interview questions and answers
- Q: Why use @property with variables?
A: Enables typed interpolation and predictable animation behavior. - Q: Key fields in @property?
A:syntax,inherits, andinitial-value. - Q: Fallback strategy?
A: Ensure design works even if typed registration is unsupported.
Practice: Change one property in the playground and observe cascade + layout in DevTools.