Silvergrove
New Member
So, I have a model in backbone representing a Button, and I have some defaults on my model, regarding it's style (background color, border-radius etc). Is there a way to access certain css properties that hold multiple values, all at once? (eg. border: 1px solid black) Or I will have to do something like this:\[code\]setCssStyle: function () { this.$el.css({ 'border-width': myButton.get('borderwidth') + 'px', 'border-style': myButton.get('borderstyle'), 'border-color': myButton.get('bordercolor') });}\[/code\]How would my model defaults change If I could set multiple css values at once? If I am correct, the multiple values would be held in an array like in the following example\[code\]var Button = Backbone.Model.extend({ defaults { border: {width:1, style:'solid', color:'#00000'} }});\[/code\]Instead of:\[code\]var Button = Backbone.Model.extend({ defaults: { borderwidth: 1, borderstyle: 'solid', bordercolor: '#000000' }})\[/code\]what happens to other css properties that don't have this 'workaround' such as box-shadow for example?is there a more convenient way to set the following css properties in my setCssStyles method?\[code\]box-shadow:inset 0px 1px 0px 0px #ffffff;\[/code\]