Subject: Re: bug#22923: [PATCH] Support completion of attribute values in CSS mode

From: Dmitry Gutov <[email-masked]>
Date: Sun, 6 Mar 2016 21:10:35 +0200

Hi Simen,

On 03/06/2016 03:53 PM, Simen Heggestøyl wrote:

> I've finally gotten around to implement property value completion in
> CSS mode. I've been using the attached patch privately for some weeks
> now, and it seems to me that it works well.

I haven't tried it, but it looks good overall.

> - The new `css--property-values' function is very similar to
>   `company-css-property-values', but it has been updated to support
>   following completion candidates further from the value class
>   completion lists.

Doesn't the latter allow for several indirections? It seems to me the 
two functions are equivalent.

One question: is there a reason to do the (symbol-name value) conversion 
before doing the css--property-values lookup?

Maybe the css-value-class-alist should have symbol keys, not strings.

> - Completion a function name will no longer put commas between the
>   parenthesis. My reason for this is that many CSS functions take a
>   variable number of arguments. For instance, the `translate' function
>   is completed by company-css to `translate(,)', but `translate' can
>   take only one argument too, so the completion is misleading. Also,
>   there are functions that support an arbitrary number of
>   arguments. Instead of trying to support this, I've made every
>   function name complete to just `function()'. I think having ElDoc
>   support for CSS functions would be good for making it easier to
>   remember which arguments functions take.

Sounds good.