1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    91
    Vote Rating
    1
    Answers
    3
    ZyBeR is on a distinguished road

      0  

    Default Answered: How to work with own css in external files?

    Answered: How to work with own css in external files?


    I have styled a list with some, custom css-classes, those classes are in a separate file (resources/css/mystyles.css), linked that file in index.html as you normally do (<link...>) and it works in testing but as soon as I compile my project those classes are nowhere to be found.

    So the "old school" way I used is not the correct way of handling custom css-classes in Sencha Touch, I've tried to read up on how to do but most stuff touching this subject is targeted to 1.x.

    If someone could point me in the right direction I would be grateful, maybe even shortly explain how and where I should add my classes.

  2. Add the path to your custom css file in your app.json under the 'css' property..

    Code:
    "css": [        {
                "path": "resources/css/app.css",
                "update": "delta"
            },
            {
                "path": "resources/css/mystyles.css",
                "update": "delta"
            }
    ],

  3. #2
    Sencha User
    Join Date
    Nov 2011
    Location
    England
    Posts
    135
    Vote Rating
    7
    Answers
    11
    george.m is on a distinguished road

      0  

    Default


    Add the path to your custom css file in your app.json under the 'css' property..

    Code:
    "css": [        {
                "path": "resources/css/app.css",
                "update": "delta"
            },
            {
                "path": "resources/css/mystyles.css",
                "update": "delta"
            }
    ],

  4. #3
    Sencha User
    Join Date
    May 2010
    Posts
    91
    Vote Rating
    1
    Answers
    3
    ZyBeR is on a distinguished road

      0  

    Default


    Ahh, neet. Thanks!

Thread Participants: 1