-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Intelligent and more correct Html addCssClass
#7896
Comments
how realistic is it that this method will receive unclean input? In general improvement is good but it should not add too much overhead. |
The purpose is not just for unclean input... but it currently does not correctly support adding CSS class separated by white spaces. Let's say I want to add 5 different CSS classes to an |
sure, that should be possible. |
Agreed.
Will be resolved by #8458 Closed in favor of #6043 |
I will be submitting a PR for improving and making the
Html::addCssClass
more intelligent and more practical to use for all use cases - similar or better than jquery addClass.Enhancements:
$options['class']
correctly irrespective of whitespaces (tabs, newlines or spaces)$class
param correctly irrespective of whitespaces (tabs, newlines or spaces)$class
property is separated by spaces... it will validate each class separately already added andCurrent Implementation
Example
Output
Proposed Implementation (After PR Change)
Example
Output
The text was updated successfully, but these errors were encountered: