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

Emmet bug: fsz12 matches with font-style instead of font-size #59951

Closed
muratdogan17 opened this issue Oct 4, 2018 · 7 comments
Closed

Emmet bug: fsz12 matches with font-style instead of font-size #59951

muratdogan17 opened this issue Oct 4, 2018 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues help wanted Issues identified as good community contribution opportunities upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-fixed The underlying upstream issue has been fixed

Comments

@muratdogan17
Copy link

  • VSCode Version: 1.27.2
  • OS Version: Mac OS High Sierra

Steps to Reproduce:

  1. open an scss file
  2. type fsz18

Does this issue occur when all extensions are disabled?: Yes

I'm using built-in emmet function while writing scss. When I start to type fsz in an scss file the tooltip show it stands for font-size :

image

But If I continue to writing with a value like fsz12 it shows font-style:12px anymore.

image

It makes declaring font size even harder. I think this is an issue and if you think so I'll fix this issue and send a PR

@vscodebot vscodebot bot added the emmet Emmet related issues label Oct 4, 2018
@blunket
Copy link

blunket commented Oct 5, 2018

The emmet abbreviation for font-size is just fz - does that work for you? (that said though, i agree with you that fsz shouldn't expand to font-style)

@muratdogan17
Copy link
Author

hi @blunket it works as you mentioned. But I've been using emmet for a long time and I'm familiar with the fsz

I think I should fix this issue :)

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Oct 5, 2018

The issue that fsz12 should match with font-size and not font-style is a valid one.

Emmet tries fuzzy matching to match whatever you have typed with the closest match. The emmet module we use for this fuzzy matching is https://github.com/emmetio/css-snippets-resolver

@muratdogan17 If you are interested in fixing this issue, then start with https://github.com/emmetio/css-snippets-resolver. Add a test case for the fsz12 in https://github.com/emmetio/css-snippets-resolver/blob/master/test/resolve.js and you can debug the code from there.

@ramya-rao-a ramya-rao-a changed the title Emmet font-size abbreviation Emmet bug: fsz12 matches with font-style instead of font-size Oct 5, 2018
@ramya-rao-a ramya-rao-a added upstream Issue identified as 'upstream' component related (exists outside of VS Code) bug Issue identified by VS Code Team member as probable bug labels Oct 5, 2018
@ramya-rao-a ramya-rao-a added this to the Backlog milestone Oct 5, 2018
@muratdogan17
Copy link
Author

Hi @ramya-rao-a I'll take a look at this and try to fix it. Thanks for your detailed introductions.

@ramya-rao-a ramya-rao-a added the help wanted Issues identified as good community contribution opportunities label Oct 8, 2018
@ramya-rao-a
Copy link
Contributor

@muratdogan17 FYI @irrationalRock has started looking into this as well.
See emmetio/css-snippets-resolver#10

@irrationalRock
Copy link
Contributor

I submitted a PR to fix this issue.

@rzhao271
Copy link
Contributor

rzhao271 commented Oct 5, 2020

Closing since issue fixed now on 1.49.3

@rzhao271 rzhao271 closed this as completed Oct 5, 2020
@rzhao271 rzhao271 added the upstream-issue-fixed The underlying upstream issue has been fixed label Oct 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
@rzhao271 rzhao271 removed this from the Backlog milestone Oct 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues help wanted Issues identified as good community contribution opportunities upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-fixed The underlying upstream issue has been fixed
Projects
None yet
6 participants