Emmet: Can I disable autoprefixer ?

Created on 23 Apr 2017  ·  10Comments  ·  Source: emmetio/emmet

for example, when I type 'bxb', it creates

  -webkit-box-sizing: border-box
  -moz-box-sizing: border-box
  -ms-box-sizing: border-box
  box-sizing: border-box

but nowadays we have webpack do such thing. So is there a switch to turn off autoprefixer?

Most helpful comment

To get rid of auto prefixes in Sublime Text click on Preferences > Package Settings > Emmet > Settings-User and add the following snippet:

{
    "preferences": {
        "css.autoInsertVendorPrefixes": false
    },
}

All 10 comments

If you are using a Visual Studio Code, added the setting to the settings.json (user or workspace settings).

{
    "emmet.preferences": {
        "css.autoInsertVendorPrefixes": false
    }
}

2017-06-02_18-05-47

css.autoInsertVendorPrefixes
Automatically generate vendor-prefixed copies of expanded CSS property. By default, Emmet will generate vendor-prefixed properties only when you put dash before abbreviation (e.g. -bxsh). With this option enabled, you don’t need dashes before abbreviations: Emmet will produce vendor-prefixed properties for you.

In other IDEs or Code Editors you can try to create a settings file (preferences.json) in the root directory of the project. More information you can find on the link — https://docs.emmet.io/customization/preferences/

@albrin thx a lot!

@albrin, подскажите, может вы знаете как отключить префиксы но уже в брекетсе?

To get rid of auto prefixes in Sublime Text click on Preferences > Package Settings > Emmet > Settings-User and add the following snippet:

{
    "preferences": {
        "css.autoInsertVendorPrefixes": false
    },
}

Hi there, I have a weird issue related to this with Sublime Text.

I did the change in the User settings

{
  "preferences": {
    "css.autoInsertVendorPrefixes": false
  }
}

And it kinda works. When i type d:f it doesn't add the vendor prefixes but I type df it adds them. I don't know if it's related to the fuzzy search or what but it's bugging I think.
emmetvendorprefixes

I had the same issue in Sublime Text.

It works fine for me

{
    "preferences": {
        "css.autoInsertVendorPrefixes": false,
        "caniuse.enabled": false
    },
}

@KitCarver My hero!
Do you know, by any chance, where does that caniuse option come from?

Yes, I found it here: https://docs.emmet.io/customization/preferences/

caniuse.enabled
Enable support of Can I Use database. When enabled, CSS abbreviation resolver will look at Can I Use database first before detecting CSS properties that should be resolved

Automatic prefixes are removed in Emmet v2

For IntelliJ users just disable Auto insert css vendor prefixes under:

Preferences > Editor > Emmet > CSS

image

Was this page helpful?
0 / 5 - 0 ratings