-
I'm curious as to why I have used many frameworks where, even though there are suggested practices/principles in place and deviation from patterns is not advised, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Based on how we use className, if it were removed it wouldn't stop us from applying necessary styles, but it would make the code more complicated and fragile as we would have to add extra divs to apply these classes. |
Beta Was this translation helpful? Give feedback.
-
Custom classes are marked as deprecated for Cloudscape components to discourage CSS overrides. The internal HTML and CSS structure of a Cloudscape component can change with a Cloudscape update. If you have CSS overrides that rely on these internals, Cloudscape updates might inadvertently break your UI without you noticing. If you're using class names to identify components during tests, we recommend using data test ids. |
Beta Was this translation helpful? Give feedback.
Custom classes are marked as deprecated for Cloudscape components to discourage CSS overrides. The internal HTML and CSS structure of a Cloudscape component can change with a Cloudscape update. If you have CSS overrides that rely on these internals, Cloudscape updates might inadvertently break your UI without you noticing.
If you want to use custom CSS styles, it's expected that you apply them to your own
div
s (or other HTML elements under your control).If you're using class names to identify components during tests, we recommend using data test ids.