Skip to content
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

allow <string> as 'list-style-type' value: a pull request candidate #67

Open
s-n-ushakov opened this issue Jan 22, 2017 · 2 comments
Open

Comments

@s-n-ushakov
Copy link

Current jStyleParser version still does not support arbitrary strings as 'list-style-type' values...

I have added some code to implement this, and it is available in the https://github.com/s-n-ushakov/-forked--radkovo--jStyleParser/tree/jstyleparser-2.1-usn-upstream branch, 2c39c891fc80047e216ab1f2543037547a694ea5 commit.

To be frank, I am not sure whether adding string("") was the the right approach to extending enum ListStyleType in interface CSSProperty, so please feel free to adjust it if necessary.

I am also not sure whether the genericTerm() call that I added to class DeclarationTransformerImpl does anything really meaningful, but that was my best effort at my level of understanding of the API available... :)

And unfortunately I got this amendment combined in one branch with another amendment that addresses the issue of getting the project built under Java 8 in pom.xml , please see commit be85374849fc1cc0eb0e69066a87c96d63789a13.

So please have a look and advise if that makes sense and whether my pull request is necessary.

And in case all these amendments deserve a merge, then there is one more commit to take care of stripping my stray comments off...

Cheers,
Sergey

@radkovo
Copy link
Owner

radkovo commented Jan 30, 2017

Hello, thanks for the commits. Your solution seems reasonable, I can merge it. I have just one request. Could you please create a clean pull request containing just the necessary changes? I mean inserting and removing your internal comments and versions does not have to be part of the commit history. The POM improvement should be preferably a separate commit without changing the project version (which is maintained centrally). Thank you very much.

And just for curiosity: is this motivated by some real application. Just asking because it seems that using the plain string for list-style-type is currently supported by Firefox only so it's probably not much used in real webdesign.

@s-n-ushakov
Copy link
Author

Sure Radek, there's no problem in making a clean pull request :) I hope I'll be able to make it in a couple of days...

And answering your question: yes, all these amendments were motivated by a real application case. I was formatting specifications with deeply nested lists, and going beyond standard list styles helped a lot with readability. To be frank, I did not care much about browser support, as I use Firefox, and the folks around me were expected to use it either... :) Still hope browser support will grow over time... :)

Coming back soon,
Sergey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants