modnaut / primary

0 stars 0 forks source link

Border Attribute on Item Element #45

Closed modnaut closed 11 years ago

modnaut commented 11 years ago

What is the border attribute for? When looking at sencha it looks like it is a 'true/false' value... but I see it is a string for us. What value should I be using?

dannycohn commented 11 years ago

http://docs.sencha.com/ext-js/4-2/#!/api/Ext.AbstractComponent-cfg-border

The border is a config that allows you to define the border of the component. In actuality a border can be set on any item, not just a container or subclass of container, but I only allowed it on containers because I didn't think we should be setting borders on buttons, etc, they have default behaviors that should be left alone.

I have it set as a string because there are so many possible ways to set it. If you set it to false it'll disable the border even if there is a default one, if you set it to 0 it'll also disable it, but if you set it to "1 2 3 4" it'll set the top border to 1px width, right to 2px wide, bottom to 3px wide, and left to 4px wide (this is the standard CSS way of using the border attribute).