Sublime Text 3 Autoprefix CSS not working

4.2k views Asked by At

I have installed Sublime Text 3 and Autoprefix CSS from package control on my Mac OSX When I try to run Autoprefix CSS on a CSS3 syntax file, it simply does nothing.

As suggested in other posts I have changed user setting to :

{
    "browsers": ["last 2 versions", "> 10%", "ff > 4", "opera > 9"]
}

But still does nothing.

Any suggestions?

4

There are 4 answers

0
Lucas Josué Guerra Pontelli On

This worked for me:

https://superuser.com/questions/932834/autoprefixer-does-not-work-on-sublime?newreg=21a71fb98e5e4c7c971f842ece7937c9

In your Autoprefix settings (In MacOS: Sublime Text/Preferences/Package Settings/Autoprefixer), instead of putting:

{
    "browsers": ["last 2 versions", "> 10%", "ff > 4", "opera > 9"]
}

Put this:

{
    "browsers": ["last 7 versions"],
    "cascade": true,
    "remove": true
}

Have a nice day!

0
Goran Zunic On

It happens when you install css3 package, I had same problem and find solution here: http://www.chriseisenbraun.com/news/autoprefixer-not-working-in-sublime-text-3-try-this-one-weird-trick-

Open a CSS file in Sublime Text

Navigate to View > Syntax > Open all with current extension as… > CSS3

After this step, any file you open in the future will be highlighted using CSS3 syntax

0
mumu On

I find the answer,you can try update the setting of Autoprefixer such as: "browsers": ["last 10 version"].I think the reason is browsers' version is so high that vender prefixer can't be completed.

0
Nafiul Islam On

In your Autoprefix settings Put This:

{
"browsers": ["last 5 versions"]
}

In your Key Bindings settings Put This:

/*for windowns*/
{"keys": ["alt+shift+p"],"command": "autoprefixer"}

/*for mac*/
{"keys": ["alt+super+p"],"command": "autoprefixer"}

And make sure to you have installed node.js