Bug 56118 - Web Inspector: CSS Autocomplete Should Use More Contextual Information
Summary: Web Inspector: CSS Autocomplete Should Use More Contextual Information
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 10:14 PST by Joseph Pecoraro
Modified: 2011-08-08 22:44 PDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2011-03-10 10:14:42 PST
CSS Autocomplete for properties with multiple values, or complex values should take context into account.

For example:

  background-image: url(|   => should not autocomplete values, but possible URLs if possible
  border: 1px s|            => should not autocomplete colors, but should autocomplete "solid, dashed, dotted, etc."
Comment 1 Alexander Pavlov (apavlov) 2011-03-10 10:19:08 PST
(In reply to comment #0)
> CSS Autocomplete for properties with multiple values, or complex values should take context into account.
> 
> For example:
> 
>   background-image: url(|   => should not autocomplete values, but possible URLs if possible
>   border: 1px s|            => should not autocomplete colors, but should autocomplete "solid, dashed, dotted, etc."

The second example is arguable. Technically, "border: 1px saddlebrown" is as valid as "border: 1px solid black" (in the first case, the style could be set by another rule's "border-style" property, perhaps with a ":hover" pseudo).
Comment 2 Joseph Pecoraro 2011-03-10 10:40:57 PST
(In reply to comment #1)
> (In reply to comment #0)
> > CSS Autocomplete for properties with multiple values, or complex values should take context into account.
> > 
> > For example:
> > 
> >   background-image: url(|   => should not autocomplete values, but possible URLs if possible
> >   border: 1px s|            => should not autocomplete colors, but should autocomplete "solid, dashed, dotted, etc."
> 
> The second example is arguable. Technically, "border: 1px saddlebrown" is as valid as "border: 1px solid black"

Whoops, I didn't realize that. Bad example, and thanks for the correction.

Another case I've run into is -webkit-gradient() and -webkit-transform()
which themselves are functions which may take multiple arguments.
It would be nice to give proper autocompletion. It seems all my examples
so far are functions, but maybe there are examples of properties that
take multiple values of different "types".

Other things that come to mind are Font autocompletion, but that is
possible right now without "context", we just need to generate valid
values.