Code Monkey home page Code Monkey logo

nutmeg-core's Issues

Add canvas support

Need a way of getting a canvas element, with correct settings for hiDPI, and getting a context.

text() should not be necessary

We should check if an argument to an elified is text.

Current Syntax:

h1(
    text('Hello World')
)

Proposed Syntax:

h1(
    'Hello World'
)

Allow syntax div.style()

I'm not sure that this is worth the complication it will cause in the code.

Effectively, "div" itself needs to be elified, or at least have the same functions as an elified element, i.e. div.style, div.classes, etc. And the start of these functions need to actually construct a new elified div.

div().style(): Easy. A new div is created by div().

div.style(): The new div needs to be created (or retrieved, in the case of body) within style(). I imagine div will have a reference to a constructor of either div elements or elified div elements.

Support pseudo-elements

Support pseudo-elements in style engine.
Should be able to simulate them all with Javascript, onmouseover() and onmouseout() for hover, that sort of thing.

Proposed Syntax:

mystyle: {
    color: '#ddf',
    hover: {
        color: '#fdd'
    }
}

Add all the possible attributes to elified

I think we can loop over all the properties in an element, and create functions in elified that assign to them, before setting our custom ones.

for (var propName in elem) {
   elified.propName = function(val) {elem.propName = val;};
}

I just don't have time to experiment with it right now, so @Zantier if you want something to do today?

It might impact performance a bit, maybe run a profile on example.html before and after?

Closure compiler fails.

We need to add enough JSDoc blocks for closure to know what to do.
When we get it to the stage where it compiles, we can turn on advanced optimizations and es6 -> es5 transpilation. Should make the whole process a lot nicer.

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.