microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.95k stars 29.53k forks source link

Emmet abbreviations for color with opacity values do not work #62855

Closed StickNitro closed 5 years ago

StickNitro commented 6 years ago

Issue Type: Bug

I used to be able to type c:#0.2 which would expand to color: rgba(0,0,0,.2) but this no longer seems to be working

VS Code version: Code - Insiders 1.29.0-insider (5e481940ccf7ed9005dfd810f586c09a49421355, 2018-11-09T14:55:36.370Z) OS version: Darwin x64 18.2.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz (8 x 3100)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|16.00GB (1.04GB free)| |Process Argv|-psn_0_3437383| |Screen Reader|no| |VM|0%|
Extensions (22) Extension|Author (truncated)|Version ---|---|--- vscode-angular2-files|ale|1.6.2 sort-imports|ama|6.0.0 ng-template|Ang|0.1.10 npm-intellisense|chr|1.3.0 path-intellisense|chr|1.4.2 githistory|don|0.4.3 EditorConfig|Edi|0.12.5 tslint|eg2|1.0.40 vscode-npm-script|eg2|0.3.5 auto-close-tag|for|0.5.6 code-runner|for|0.9.5 vscode-pull-request-github|Git|0.2.3 vscode-gist|ken|1.2.1 git-indicators|lam|2.1.1 code-beautifier|mic|2.1.0 vscode-scss|mrm|0.6.2 debugger-for-chrome|msj|4.11.0 color-highlight|nau|2.3.0 vscode-html-scss|P-d|0.0.42 typescript-hero|rbb|3.0.0 vscode-icons|rob|7.28.0 vsfire|tob|1.3.2
vscodebot[bot] commented 6 years ago

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

StickNitro commented 6 years ago

Also bd1:s:#0 used to expand to border: 1px solid #000, there are others I am sure

swashata commented 6 years ago

Yes, I am experiencing the same. Here are a few that worked fine before but not anymore.

snippet expansion (worked, not anymore)
w10p width: 10%;
tac text-align: center;
aic align-items: center;
jcc justify-content: center;

VS Code version: Code - Insiders 1.30.0-insider (5fc60ec67950234cdf82ea455013617adf00e7b6, 2018-11-14T07:58:01.008Z) OS version: Darwin x64 18.2.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz (4 x 3100)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 3, 3| |Memory (System)|8.00GB (0.14GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions (42) Extension|Author (truncated)|Version ---|---|--- vscode-paste-and-indent|Rub|0.0.8 react-pure-to-class-vscode|ang|1.1.7 snapshot-tools|asv|0.2.2 spellright|ban|3.0.6 better-toml|bun|0.3.2 woocommerce|cla|1.0.0 wpcs-whitelist-flags|cla|1.0.0 gitignore|cod|0.5.0 vscode-eslint|dba|1.7.0 vscode-dash|dee|2.0.0 phptools-vscode|DEV|1.0.2946 EditorConfig|Edi|0.12.5 tslint|eg2|1.0.40 prettier-vscode|esb|1.7.2 vs-code-xml-format|fab|0.1.5 vscode-diff|fab|1.3.6 vscode-todo-plus|fab|4.10.0 vscode-pull-request-github|Git|0.2.3 phpcs|ika|1.0.5 path-autocomplete|ion|1.12.0 vscode-styled-components|jpo|0.0.25 graphql-for-vscode|kum|1.12.1 dotenv|mik|1.0.1 ecdc|mit|0.12.0 vscode-scss|mrm|0.6.2 cpptools|ms-|0.20.1 sublime-keybindings|ms-|4.0.0 debugger-for-chrome|msj|4.11.0 php-docblocker|nei|1.6.0 vscode-docker|Pet|0.3.1 material-icon-theme|PKi|3.6.0 polacode|pnp|0.2.2 project-snippets|reb|0.5.0 vscode-icons|rob|7.28.0 code-settings-sync|Sha|3.2.0 whiteviz|spy|0.6.0 wordpress-snippet|tun|1.1.5 sensitive-replace|vil|0.1.1 quokka-vscode|Wal|1.0.165 vscode-import-cost|wix|2.9.0 better-align|wwm|1.1.6 licenser|ymo|1.3.1 (1 theme extensions excluded)
ramya-rao-a commented 6 years ago

@swashata You are on 1.30 Insiders which had an issue due to which none of the Emmet features were working. That bug is fixed in the latest Insiders, please give that a try.

@StickNitro Neither c:#0.2 nor bd1:s:#0 was ever supported in VS Code atleast since the last 2 years as far as I know.

c:#0.2 is a valid abbreviation that is not supported at the moment. This is a bug. But bd1:s:#0 doesnt look like a valid abbreviation. I tried it in https://docs.emmet.io/ and didnt get your expected result.

ramya-rao-a commented 6 years ago

To add support for abbreviations like c:#0.2, the regex used for hex color value in vscode-emmet-helper should be updated at https://github.com/Microsoft/vscode-emmet-helper/blob/master/src/emmetHelper.ts#L967-L968

swashata commented 6 years ago

@ramya-rao-a Thank you and yes you are absolutely correct. It was indeed a bug for that particular version of insider. Now I have it updated and it's gone. Thank you for your great work, you are awesome!!