goodeggs / teacup

Teacup is templates in CoffeeScript
MIT License
122 stars 18 forks source link

framework #29

Closed isglazunov closed 11 years ago

isglazunov commented 11 years ago

I want to make a framework StylCup, or something like that, on the basis of TeaCup. Difficult to use css template engine. At the moment I tend to Stylus.

To expect that it will contain the following parts:

{renderable} = require "teacup"
{modal} = require "stylcup"

module.exports = renderable ->
   modal ".entry", speed: 500, delay: 100, ->
      modal.head "authorization"
      modal.body ->
...

I would be grateful to hear here adjustments and tips for better integration and comments on the functional.

isglazunov commented 11 years ago

What do you think about https://github.com/aeosynth/ccss?

hurrymaplelad commented 11 years ago

Seems cool. I haven't felt enough pain with Stylus to push me to use something like ccss. The reuse and code sharing gains don't outweigh the extra syntax.

I do create custom tag functions for reusable bits of template. When I want to package up some style and behavior along with the template I start looking at conventions like Backbone Views, Angular Directives, and Components. I try to keep the templates just about the markup.

Hope that helps.

isglazunov commented 11 years ago

Yes. Thanks for the experience.

hurrymaplelad commented 11 years ago

@demands pointed me at https://github.com/krasimir/absurd, another option for CSS in JS or Coffee.