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

Autoprefixer is removing my trailing semicolons (a remaining rework issue?) #348

Closed
AndyBean opened this issue Nov 14, 2014 · 5 comments
Closed
Labels

Comments

@AndyBean
Copy link

Though not technically incorrect, it is a recommended syntax by Google et al to leave the trailing semicolon. I saw on this thread that autoprefixer is built on top of rework, which was was updated over a year ago to return the semicolon; perhaps that update never happened.

It is not a huge deal, both with semicolon and without are considered valid but it is common for application tests to interpret the lack of one as an error, and it annoys my obsessive compulsive self. Should I more appropriately bother the Rework group about this?

-Andrew

@ai
Copy link
Member

ai commented Nov 14, 2014

@AndyBean Autoprefixer has no connection with Rework for a year ;). Autoprefixer is based on PostCSS.

Instead of Rework, PostCSS try to save user code style (indents, trailing semicolon). But maybe there is a regression (we rewrite a lot of parts in PostCSS 3.0 to have the fastest CSS parser).

Can you write some small input with trailing semicolon and output from Autoprefixer without it?

@ai ai added the bug label Nov 14, 2014
@kyaido
Copy link

kyaido commented Nov 19, 2014

Hi.

I'm also troubled by this removing semicolons issue.
For example, as to apply the autoprefixer to normalize.css, the code below

html {
  font-family: sans-serif; /* 1 */
  -ms-text-size-adjust: 100%; /* 2 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

after autoprefixer, the code becomes

html {
  font-family: sans-serif; /* 1 */
  -ms-text-size-adjust: 100%; /* 2 */
  -webkit-text-size-adjust: 100% /* 2 */
}

@ai
Copy link
Member

ai commented Nov 19, 2014

@kyaido thanks for example. Now I know, that this problem is with last comment.

I create issue in PostCSS: postcss/postcss#136

@Taritsyn
Copy link
Contributor

Thanks.

@ai
Copy link
Member

ai commented Dec 7, 2014

Fixed in PostCSS 3.0.6.

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

No branches or pull requests

4 participants