[TxMt] Splitting CSS and importing into html?!

Allan Odgaard throw-away-1 at macromates.com
Thu Jun 15 16:11:10 UTC 2006


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.




More information about the textmate mailing list