views:

125

answers:

0

Intro: After reading Brad Wilson Metadata series and searching unsuccesfully on google, I was wondering:

Question: Has any OS project / code been created that allows you to tag CSS styles in the Meta information, for example in my (buddy) Model, I want to be able to decorate a property with multiple CSS styles (a single style you can fake with UIHint, I want to set many possible styles - and be able to "cross-utilise")

eg.

public class MyModel
{
    [DisplayCssHint("h5")]
    [DisplayCssHint("color:#777;")]
    [EditorCssHint(".myCoolTextClass")]
    [EditorCssHint(".myOtherCoolTextClass")]
    public string Title{ get;set; } 

    [DisplayCssHint(".normaltext")]
    [EditorCssHint(".myCoolTextClass")]
    [EditorCssHint(".myOtherCoolTextClass")]
    public string Message {get;set;}
}

Thoughts: I know that this does not seem like a logical place to put styling information, however as it is metadata and is discriptive... besides it would be nice to do this while prototyping - (especially being able to apply class styles and extending it further - to generate .Less files would really be cool! more to the point I would hate to write it, if its already been done ;). Any links/pointers/idea's would be appreciated.

Thanks,