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

'Hit area' should include suffixes like 'px' #20

Open
peterflynn opened this issue Feb 5, 2014 · 0 comments
Open

'Hit area' should include suffixes like 'px' #20

peterflynn opened this issue Feb 5, 2014 · 0 comments

Comments

@peterflynn
Copy link
Owner

  1. Start with this CSS code: left: 12px;
  2. Put the cursor between ':' and ' ' and try to scrub/nudge
  3. Put the cursor between ' ' and '1' and try to scrub/nudge
  4. Put the cursor between 'x' and ';' and try to scrub/nudge

Result: the first two work but the last one doesn't, which feels inconsistent.

This is because we accept positions up to 1 char off from the number itself (so if you're touching either the ' ' or the 'p'), but not positions any further out (e.g. the 'x'). The problem is that semantically the 'px' feels like it's part of the thing you're scrubbing, so it feels like the sensitivity should extend to include those chars fully.

At first glance it seems like we could just extend the 'hit area' to cover the full token which contains the number. That would work for cases like the '12px' above, but not for any of the trickier token cases that motivated 1f6584c. We may just want some semi-language-agnostic hardcoded rules, e.g. extend to include any contiguous trailing letters or an immediately trailing "%" symbol...

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

No branches or pull requests

1 participant