-
Notifications
You must be signed in to change notification settings - Fork 62
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
Semantically order attributes by default #60
Comments
Right now I see two possible options:
If we decide on the first option I'd suggest the following order: If we decide on the second option I'd follow the order in the SVG 1.1 specification (see for example the path element) with the exception to put id/class at the start. Like before everything else goes at the end in alphabetical order. |
I think both options are actually the same to implement. I would suggest a pseudo algorithm like this:
I think the important part is that the attributes have some order. Your suggested attribute order sounds good to me. |
With "easier to implement" I meant that the list of @oberstet Any thoughts from you side? |
@dirk-thomas - Tobias seems to be busy lately but I think this is something we definitely want (Scour messing up the order of attributes on every run was something that bugged me a lot in the past). Is your offer to provide a PR still valid? If yes, I'd be happy to review it. As you noted implementation for the two cases I suggested should be similar and since I have no clear preference, feel free to work on whatever seems more natural to you. |
I just noticed |
Here we go: #105 |
Follow up to #59:
As already discussed there we should order attributes by default in output.
Furthermore a semantic ordering would be preferable to increase human readability.
The challenge at hand is to find a viable way to achieve a useful attribute order, even with future SVG specifications, namespaced extensions, etc. in mind.
The text was updated successfully, but these errors were encountered: