Coder Social home page Coder Social logo

Comments (3)

jvandijk avatar jvandijk commented on August 29, 2024

Hey @RonaldTreur, this fix only seems to work for one array per selector. The following syntax stops parsing on css2json:

Window {
    orientation-modes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT];
    @media ios {
        extendEdges: [Ti.UI.EXTEND_EDGE_ALL];
    }
}

you'll get the following error:

STSS/lib/renderer/css2json.js:134
            v = special['array'][arrayNr][valueNr][0];
                                ^
TypeError: Cannot read property '2' of undefined
    at STSS/lib/renderer/css2json.js:134:24
    at String.replace (native)
    at parseSpecialValue (STSS/lib/renderer/css2json.js:132:15)
    at parseDeclaration (STSS/lib/renderer/css2json.js:187:11)
    at STSS/lib/renderer/css2json.js:335:14
    at Array.forEach (native)
    at parseNormalRule (STSS/lib/renderer/css2json.js:330:20)
    at STSS/lib/renderer/css2json.js:398:4
    at Array.forEach (native)
    at parseAST (STSS/lib/renderer/css2json.js:396:8)

from stss.

RonaldTreur avatar RonaldTreur commented on August 29, 2024

Thanks! I've re-opened it for now. Will check this asap.

from stss.

RonaldTreur avatar RonaldTreur commented on August 29, 2024

I fixed the problem, will push asap. It turned out the problem was not so much that only one array per selector was parsed, it was that arrays wrapped in a query did not parse at all.

Anyway, patch incoming!

To keep things tidy, I'll create a new issue for this: #14

from stss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.