Project

General

Profile

Actions

Bug #10288

open

Bootstrap5: widget manually stylized with only "btn" is being appended "btn btn-secondary"

Added by Emeric Poupon almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
05/03/2022
Due date:
% Done:

0%

Estimated time:

Description

Here is a WTemplate I have:

<span class="dropdown">
    <button class="btn btn-outline-primary" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">...</button>
    <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
        <li>${play-shuffled class="btn dropdown-item"}</li>
    </ul>
</span>

(As showed in https://getbootstrap.com/docs/5.0/components/dropdowns/#menu-items)

The problem in that we check for a list that includes all "btn-XXX" variants in btnClasses in src/Wt/WBootstrap5Theme.C
In order for this to work I had:

  • patch wt to add "btn" in this list (it is likely to kill the purpose of the list, maybe "btn" alone would be ok instead of all the "btn-XXX" variants?)
  • call setDefault(false) on the binded WPushButton

No data to display

Actions

Also available in: Atom PDF