-
Notifications
You must be signed in to change notification settings - Fork 396
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
Ractive reordering CSS class names? #2903
Comments
Marking this as pending. I'm not sure what's the proper behavior or what the specs have to say with regards to this. A few searches led me to this Stack Overflow answer whose comments mention Semantic UI is depending on this behavior. Afaik, the only time order matters would be:
But then from an intuitive point of view, it shouldn't reorder 😄 |
Yeah, in most cases it wouldn't matter, but Semantic UI needs certain things in order. Ractive 0.7.3 didn't reorder class names, did something fundamental change so fixing this would be hacky? If so, please close and forget this issue! (We don't have to use Ractive to set classes, |
0.8 started not completely trampling the class attribute and instead checks for classes that are added and removed by Ractive to insert or remove from the existing list. I would say we could switch to using classList, but we still support IE9, which apparently doesn't do that. I don't think it would be much trouble to see if there's an anchor point in the existing class list for new classes to insert them in template order. I didn't realize there was anything sensitive to class order. TIL |
Attempt to keep class attribute order and duplicates intact - #2903
This should now be fixed in edge and v0.8-dev. it'll go out with 0.8.12 as soon as #2899 is resolved. |
Description:
Ractive seems to be reordering class names in the DOM.
Versions affected:
0.8.11 & 0.9.0-build-108
Platforms affected:
Chrome, Firefox, Safari
Reproduction:
http://codepen.io/jmellicker/pen/mWEXMY?editors=1010
(click one of the buttons "three" or "four")
The text was updated successfully, but these errors were encountered: