hiya (aka, howdy)
The CSS language syntax it for full css, with the tags and classes and stuff. CSS embedded into html tags with the style="" business isn't scoped all fancy at all.
You can't just import the normal CSS language into there because it expects all of the tags and curly brackets craziness.
My plan is to split out the part of CSS that could be imported into HTML, the actual rules part. Then, import that into the CSS language and the HTML language.
Is there a better way to do this? I think it'd be silly to not DRY it up properly, and i'm sick of not having all fancy CSS stuff in my style="" attributes.
thomas Aylott—subtleGradient
On Jun 15, 2006, at 10:10 AM, thomas Aylott wrote:
Is there a better way to do this? I think it'd be silly to not DRY it up properly, and i'm sick of not having all fancy CSS stuff in my style="" attributes.
I haven't messed with language definitions enough to offer any guidance, but I'll be very happy if you get this working.
Rob
On 15/6/2006, at 16:10, thomas Aylott wrote:
My plan is to split out the part of CSS that could be imported into HTML, the actual rules part. Then, import that into the CSS language and the HTML language.
Is there a better way to do this?
Currently not -- Mr. Sheets is however rallying users to get support for something like ‘include = "source.css#properties";’ which would include only the ‘properties’ repository rule from the source.css language grammar.
I think it'd be silly to not DRY it up properly, and i'm sick of not having all fancy CSS stuff in my style="" attributes.
I think we could live with an additional ‘CSS (inline)’ language grammar (for only the properties) until the above mentioned feature appears -- though this might make Mr. Sheets bring up another pet request of his (hiding language grammars from the menu(s)) ;)
An alternative would be to rewrite the CSS grammar so that it matches properties also outside brackets -- seeing how we match only known properties, this shouldn’t cause false-matching of ‘looks like properties’ constructs.
I think it'd be silly to not DRY it up properly, and i'm sick of not having all fancy CSS stuff in my style="" attributes.
But then again, you really shouldn't have style attributes, now should you? (however, I agree with you, I use inline style attributes when making mockups)
Andreas
On Jun 16, 2006, at 6:43 AM, Andreas Wahlin wrote:
I think it'd be silly to not DRY it up properly, and i'm sick of not having all fancy CSS stuff in my style="" attributes.
But then again, you really shouldn't have style attributes, now should you? (however, I agree with you, I use inline style attributes when making mockups)
Andreas
Anything possible is occasionally necessary. :(
thomas Aylott—subtleGradient