Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Replace *-child, with *-of-type #154

Closed
wants to merge 1 commit into from
Closed

Replace *-child, with *-of-type #154

wants to merge 1 commit into from

Conversation

josbeir
Copy link

@josbeir josbeir commented Feb 22, 2014

Frameworks like Ember.js use a technique called metamorph ( http://emberjs.com/guides/understanding-ember/keeping-templates-up-to-date/ )
Basically script tags are added on places between items that need to be observed so the engine can find a reference later.

*-child properties include these tags and result in non-desired behavior (mostly omega not working properly, ..)
The *-of-type property behaves most like the -child property but takes the actual element into account hence ignoring the script tags in the case described above.

Frameworks like Ember.js use a technique called metamorph ( http://emberjs.com/guides/understanding-ember/keeping-templates-up-to-date/ )
Basically script tags are added on places between items that need to be observed so the engine can find a reference later.

*-child properties include these tags and result in non-desired behavior (mostly omega not working properly, ..)
The *-of-type property behaves most like the -child property but takes the actual element into account hence ignoring the script tags in the case described above.
@josbeir
Copy link
Author

josbeir commented Feb 22, 2014

More info about this over here foundation/foundation-sites#1455, emberjs/ember.js#1893

Instead of overriding i though it was better i made a PR :)

@kemenaran
Copy link

I use Neat with Ember.js, and I would be glad to have this :)

@kaishin
Copy link

kaishin commented Mar 19, 2014

This came out before. I think just patching Neat like this will result in a lot of undesired behavior.
The power of last-child is that it works regardless of the element type. Consider an aside and an article spanning 6 columns each. With last-of-type, both would be affected by omega, resulting in losing the gutter between them.

Ideally, I'd like to add more flexibility to omega() so that it can achieve that if passed some argument. But right now, merging this would mean breaking backward compatibility and losing a key feature of the framework.

@kaishin kaishin closed this Mar 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants