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

Pseudo-classes formatted incorrectly and inconsistently with @page #661

Closed
dylanmensaert opened this issue Mar 30, 2015 · 8 comments
Closed

Comments

@dylanmensaert
Copy link

Pseudo-classes are being formatted incorrectly and inconsistently with @page:

@page :first -> @page:first -> @page: first

This is a problem since the last format is invalid css.
Is there a temporary fix where I can disable formatting of pseudo-classes?

@bitwiseman
Copy link
Member

What version are you using? What command are your running? What language are your writing?
Please give an full example. Not a one-line snippet, but a valid statement that could be handed to the beautifier and the resulting output and the output you'd expect to see.

@dylanmensaert
Copy link
Author

As I stated in my comment, it's css.

Original issue:
victorporof/Sublime-HTMLPrettify#207

I am using the packages latest version.
Since the package I use is installed as a direct plugin into Sublime, I have limited knowledge of this library and it's uses.
Is there any other kind of information I can provide you with?

@bitwiseman
Copy link
Member

You're using the html-beautifier, so

<!-- Input, expected not to change-->
<style>
  @page :first {}
</style>

<!-- Output on first run -->
<style>
  @page: first {}
</style>

<!-- Output on second run -->
<style>
  @page:first {}
</style>

https://developer.mozilla.org/en-US/docs/Web/CSS/@page

@rherring
Copy link

rherring commented Apr 9, 2015

I'm having the same issue. What did you do to get it fixed?

@dylanmensaert
Copy link
Author

@rherring

If you are using the sublime plugin, you will have to wait until @victorporof releases a version that contains the fix @bitwiseman provided.

Until then, I believe there is no solution for it.
As a workaround, I format all my pseudo classes to @page :first every time before saving.

@bitwiseman
Copy link
Member

I'll release a new version in the next week or so. If you know where the plugin is on your drive you might be able to overwrite the files with the current HEAD of master.

@victorporof
Copy link

@dylanmensaert Let me know as soon as the @bitwiseman's fix reaches stable. I'll update the sublime plugin then.

@dylanmensaert
Copy link
Author

Thanks a lot guys!

@bitwiseman bitwiseman modified the milestones: v1.6.0, v1.5.6 May 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants