W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: Complete list of CSS keywords (for values)

From: Peter Linss <peter.linss@hp.com>
Date: Thu, 10 Jul 2014 10:18:43 -0700
Cc: www-style@w3.org
Message-Id: <8E553A99-3844-48C9-A1E2-50BBD4297918@hp.com>
To: Simon Sapin <simon.sapin@exyr.org>

On Jul 10, 2014, at 3:51 AM, Simon Sapin <simon.sapin@exyr.org> wrote:

> On 10/07/14 09:49, Christoph Päper wrote:
>> There a a several sites that list all CSS properties and often also
>> their standardization status, level and module. I can’t find,
>> however, a site that aggregates all keywords and pseudo functions
>> used as values in a similar manner on a single page.
>> 
>> Is there such a thing?
> 
> "Shepherd", the CSS test suite manager, parses all specs. It has a database of all property definitions, their values, etc.
> 
> You can query this data here, though I don’t know if it has the specific entry point you want:
> 
> https://api.csswg.org/shepherd/

To get all the value and function definitions, call:
https://api.csswg.org/shepherd/spec?anchors=1&drafts=1

(you can omit the &drafts=1 if you don't want data from draft specs)

The return will be a list of all the anchors in all the specs, structured by spec and section. Look for anchors with the "type" field set to "value" or "function". If present, the "for" field will specify an array of properties that the value or function is valid for.

Note that since this data is parsed from specs, it relies on proper markup in the specs to get its data. I expect the "type" data to be fairly accurate, but a lot of the "for" data is missing. If you find errors, please let us know (and/or file bugs against the specs).

> 
> 
>> If there’s none, how does the WG keep track of keywords so as not to
>> reintroduce an existing one to a different property with possibly
>> different meaning? Swarm knowledge?
> 
> Having the same keyword have a different meaning in different contexts is not a problem. For example many properties accept an 'auto' keyword and give it very a different meaning.
> 
> 
>> Disclosure: I wanted to quickly check whether there are pre-defined
>> keywords ending in suffixes that could be used as type primitives,
>> e.g. ‘-string’, ‘-name’ / ‘-label’ / ‘-font’, ‘-color’, ‘-size’,
>> ‘-length’ / ‘-width’ / ‘-height’, ‘-angle’, ‘-duration’,
>> ‘-frequency’, ‘-resolution’, ‘-location’ / ‘-address’ / ‘-file’ /
>> ‘-resource’ / ‘-image’, ‘-position’, ‘-lines’ / ‘-count’ / ‘-number’
>> / ‘-layer’ / ‘-depth’.
> 
> I don’t understand this, could you explain a bit more?
> 
> -- 
> Simon Sapin


Received on Thursday, 10 July 2014 17:19:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:23 UTC