Titanium JIRA Archive
Alloy (ALOY)

[ALOY-125] Add style attributes to markup

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusResolved
ResolutionFixed
Resolution Date2012-07-27T12:59:40.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterRussell McMahon
AssigneeUnknown
Created2012-07-25T00:33:20.000+0000
Updated2018-03-07T22:25:55.000+0000

Description

Styles are done in tss files and typically tied to markup elements using class or id. Having support as a style attribute on the element would be. It should act as CSS style attribute when calculating style values.

Comments

  1. Tony Lukasavage 2012-07-25

    I think what is meant to happen, as per the conversations had on the google group is not something like this:
       <View id="myid" style="{backgroundColor:'#a00', customAttribute:123}"/>
       
    but instead like this:
       <View id="myid" backgroundColor="#a00" customAttribute="123"/>
       
    I think the JSON will become extremely messing in a style attribute. Also, individual attributes is how this behavior is already handled for widgets and required views.
  2. Russell McMahon 2012-07-25

    Your right Tony. I did not mean use style="{..}" in xml markup. I was thinking each style would be it's own attribute. I brought CSS for how to apply specificity.

JSON Source