3

I am using BootsFaces for my responsive UI rendering in JSF project. Everything looks cool that comes up with BootsFaces. UI design is much easier with this. But at the same time I find there might be not enough flexibility to customize the UI for very specific situations.

Like in my navbar I am using dropMenu tag for a dropdown menu.

<b:navBar brand="Brand" brandHref="#" fluid="true">
  <b:navbarLinks pull="right" styleClass="hidden-xs">

    <b:dropMenu value="Dropdown">
      <b:navLink value="Action" href="#"></b:navLink>
      <b:navLink value="Another action" href="#"></b:navLink>
    </b:dropMenu>

  </b:navbarLinks>
</b:navBar>

And this renders alomost like This

But I dont want the down (or up caret) right to the Dropdown text.

I have checked BootsFaces documentation about DropMenu. Only thing I finds there is down option that actually doesn't help about this. Does anyone have any idea how can I remove this from dropMenu? Any CSS or anything I have missed from BootsFaces ?

Shafin Mahmud
  • 3,831
  • 1
  • 23
  • 35

2 Answers2

2

I went through the BootsFaces Documentation and found that the dropdown icon has caret class to it.

Hence the following worked in this case :)

.caret{
    display: none;
}
Dhaval Jardosh
  • 7,151
  • 5
  • 27
  • 69
2

After pondering this question for a week, I've decided not to implement a dedicated BootsFaces feature. The CSS rule does the trick. It even works if you want to show or hide the caret depending on a breakpoint. Just add a media query to it.

For the reference: there's also a ticket in the BootsFaces bug tracker.

Stephan Rauh
  • 3,069
  • 2
  • 18
  • 37
  • @Rauh I got your point. Actually, I reported the bug. But what was my concern is as you already added the `drop` option there and the options are `down` and `up`, isn't it more intuitive to have another option `none` to this. when I was first using it, I was so sure about it there must be some option like that, but later I find, no there is not. Maybe you could rename the `drop` option to `drop-icon`. That will make more sense then. – Shafin Mahmud Apr 25 '18 at 08:47
  • And think about it, why are we using bootsfaces? Its because we don't bother about layout and styling in front-end. Its a great library that helps us lifting that burden work. So there should be enough support to customize the styling natively. – Shafin Mahmud Apr 25 '18 at 08:55
  • 1
    Recently I saw a similar feature request to show or hide the caret depending on the screen size. IMHO, that makes a lot of sense. But: that amounts to adding four new attributes (or five, with BS4). That's why I'm reluctant. – Stephan Rauh Apr 26 '18 at 10:32