Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Rows/columns as directives? #308

Closed
wmertens opened this issue Apr 8, 2013 · 4 comments
Closed

Rows/columns as directives? #308

wmertens opened this issue Apr 8, 2013 · 4 comments

Comments

@wmertens
Copy link

wmertens commented Apr 8, 2013

Maybe I'm making a rookie mistake here, but I'm surprised not to see directives for the rows and columns.

e.g. instead of

<div class="container-fluid">
  <div class="row-fluid">
    <div class="span4 offset2">
    </div>
  </div>
</div>

something like

<container fluid>
  <row>
    <column width=4 skip=2>
    </column>
  </row>
</container fluid>

which could be converted to divs with bootstrap or foundation classes by Angular. Containers could default to be cloaked to prevent FUC. Rows inherit the fluidity of their container.

Plus of course, using the directives is entirely optional.

@wmertens
Copy link
Author

wmertens commented Apr 8, 2013

In fact, Angular could detect if the browser supports the CSS grid spec and use that instead... or attributes like ui:column=4 could be used to automatically wrap elements in the supporting div if necessary. Just dreaming out loud here :)

@joshdmiller
Copy link
Contributor

My perspective is that UI Bootstrap directives should do something - that is, they should bring something to the table. Using a directive just to replace a template, while handy for the developer to be sure, doesn't to me seem like it's worth the DOM manipulation necessary to make it work.

As for the CSS grid spec, we're looking to make UI Bootstrap support essentially any markup and style the developer wants, defaulting of course to Twitter Bootstrap, so this would be a hard option to implement generically.

In terms of overall character counts, the two examples provided don't differ very much. So, would it really be worth the DOM manipulation to save a few keystrokes? Instead, snippets work well for me... :-)

@pkozlowski-opensource
Copy link
Member

I tend to agree with @joshdmiller here (bizarre, I tend to agree with him quite often :-)).

So we had this interesting discussion about directives that introduce custom tags in #216

There are many reasons to re-define HTML vocabulary but this re-definition needs to bring something: additional behavior, shorter syntax, easier to remember names etc. In the case described here I've got the feeling that we are just replacing one vocabulary with another one - at the moment I can't see added value of it.

Given my current understanding of the World it would be -1 from me but hey, I'm open to be convinced :-)

@pkozlowski-opensource
Copy link
Member

Closing for now, we can re-open if good arguments surface.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants