[Mapcss] Strings and Keywords

Komяpa me at komzpa.net
Mon Jul 19 14:12:55 BST 2010


> I think there is an agreement to start from css  (because it is widely
> used and well supported) and only deviate when there is a reason.
>
> In this case the reason could be that it is easier to implement. ;)
>
> In css it is an error to write
>  color: "red";
> because red is a keyword:
>
> http://www.w3.org/TR/CSS21/syndata.html#keywords

could you please provide a case when quotation marks are needed?

>>> Another example would be the yes keyword in conditions. I'd say
>>> [oneway=yes] applies to a oneway tag with value yes, true or 1, but
>>> [oneway="yes"] matches the literal
>>> value "yes", only.
>> My opinion on this is that we shouldn't do any magic, and that "yes" should be
>> the only "yes" but not "1" or "true". For "magic" comparison I'd write
>> something like boolean(oneway)=true, like in eval().
> It is more or less a part of MapCSS 0.1 and 0.2. I don't like it that
> much either, but with quotes it would at least be possible to suppress
> the magic.
I think that we should drop this magic from spec. If user wants to
match all the =yes, =true & =1, it's up to him to write that in
stylesheet.


>>> As keywords (unlike strings) are case insensitive, [oneway=Yes] would
>>> work, but [Oneway=yes] or [oneway="Yes"] would not apply to a onway=yes
>>>  tag.
>>
>> Case insensivity is bad, I think.
>
> Yes, but it is not a matter of opinion:
>
> http://www.w3.org/TR/CSS21/syndata.html#characters
>
> (Unless we agree that it is reasonable to differ from css in this point.)
OSM tags are case-sensetive. Thus, I think we need case-sensetivity here too.

-- 
Komяpa aka Darafei Praliaskouski
xmpp:me at komzpa.net mailto:me at komzpa.net




More information about the Mapcss mailing list