[ 4 posts ]

Chris Rohde

  • Username: crohde7707
  • Joined: Thu Jun 28, 2012 7:00 am
  • Posts: 5
  • Offline
  • Profile

Working with CSS in TabView

Post Posted: Mon Jul 09, 2012 4:18 am
+0-
Good Morning, all!

I am currently migrating from YUI 2.x to 3.5 and am having a slight issue. In 2.x, there was a span wrapper around the text inside the tab's label, which had a style class of 'yui-tab-span'. After i upgraded to 3.5, the span class is no longer around that text and i would still like it to be. Could someone direct me to the correct file that had this implementation in the yui2 files?

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: Working with CSS in TabView

Post Posted: Mon Jul 09, 2012 6:20 am
+0-
Hey!

In YUI 3.5 you just need to put the span in the label like this:
Code:
var tabview = new Y.TabView({
  children: [{
    label: '<span class="yui3-tab-span">foo</span>',
    content: '<p>foo content</p>'
  }]
});

Chris Rohde

  • Username: crohde7707
  • Joined: Thu Jun 28, 2012 7:00 am
  • Posts: 5
  • Offline
  • Profile

Re: Working with CSS in TabView

Post Posted: Thu Jul 12, 2012 4:54 am
+0-
Thank you for the reply! Only problem with that is that im working with exsisting markup, so only thing im supplying to the tabview instance is the srcNode. i just need to find a way to add the span tag back like it was in 2.x

EDIT:

I am using wicket along with my site and it looks like tabview is eating the markup once its initalized

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile
Tags:

Re: Working with CSS in TabView

Post Posted: Thu Jul 12, 2012 6:33 am
+0-
Right, I forgot where the issue was, sorry. There has been a constant discussion about whether Widgets should allow their user to put HTML inside them. TabView doesn't allow you to. In order to make it work you need to use this patch:

patch

Click here to see the revision history on this Gist.
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum