These are chat archives for jbroadway/elefant

1st
Oct 2015
Johnny Broadway
@jbroadway
Oct 01 2015 02:37

@xmory, that's an interesting way to create UI elements for multiple CSS frameworks. I've been thinking of how to handle some of the class name differences recently.

Another option I've been thinking about is adding a class parameter to the navigation/* tags themselves, but it wouldn't be able to change the html, only add custom classes. That might be ok for some frameworks but maybe not all.

The include might look like this with classes:

{! navigation/top
    ?classes[ul]=pure-menu-list
    &classes[li]=pure-menu-item
    &classes[active]=pure-menu-selected
    &classes[a]=pure-menu-link !}

Your idea made me also think of having pre-configured sets of classes, so you could just say

{! navigation/top?classes=purecss !}

Or

{! navigation/top?classes=bootstrap !}

And it would know the names of all the classes already.