You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bootstrap 3 shipped a neutral-grey button colour called default (.btn-default, .badge-default, etc.). BootstrapComponents was originally built against BS3 and exposed default as a valid value for color on Modal, Popover, Button, and Badge.
Bootstrap 4 dropped the default colour family. The BS4 migration guide recommends replacing btn-default with btn-secondary; the same recommendation applied to alerts and badges.
Bootstrap 5 kept BS4's recommendation and went further on badges, dropping the whole badge-<color> family in favour of text-bg-<color> utilities.
BC 4.x and 5.x effectively shipped color="default" as a no-op at the framework-rule level. The PHP emitters continued to accept the value and emit btn-default / badge-default, but the BS4 framework had no rule for those classes. BC carried two partial fixes on top:
modules/ext.bootstrapComponents.alert.fix.css — full .alert-default { background-color: #f5f5f5; border-color: #ddd; color: #333; } (introduced in BC 1.2, 2018).
modules/ext.bootstrapComponents.button.fix.css — link-colour rules for a.btn-default and a.btn-outline-default (anchor-only; overrides MediaWiki's anchor colour).
Neither fix defined .btn-default for non-anchor buttons or .badge-default for any badge. Net BC 5.x rendering of color="default":
BC 6.0 (Migrate to Bootstrap 5.3 #93) ships the same rendering for color="default" under BS5. The *-default class is a no-op in BS5 too. The two partial fixes (.alert-default and a.btn-default / a.btn-outline-default link colours) are preserved unchanged. Net behaviour is identical to BC 5.x.
We investigated mapping default → secondary (or light) at the PHP layer so existing wikitext using the legacy value would render with proper BS5 styling under 6.0. Decided against it because:
The "back-compat being preserved" was an effectively-unstyled rendering for Modal / Popover / Button-as-button / Badge, and a BC-owned grey box for Alert. Mapping to secondary (or anything) would have been an improvement — a behaviour change layered on top of the framework lift, not a lift change itself.
Mixing "lift to BS5 framework" with "improve previously-broken rendering" muddies the PR's character. Without the translation, Migrate to Bootstrap 5.3 #93 is purely a framework lift: same PHP-level semantics as BC 5.x, just compiled against BS5 instead of BS4.
Options if we decide to act later
Keep as-is.color="default" remains a documented attribute value that renders as effectively-unstyled (with the two pre-existing partial fixes carrying their existing behaviour). Zero work, no behaviour change.
Drop default from the attribute manager's allowed-value list. Documented behaviour change: color="default" becomes invalid and falls back to the per-component default (primary for Button/Badge, info for Popover, no colour class for Modal). The two pre-existing partial fixes (.alert-default styled rule, a.btn-default link colour rule) become unreachable through the BC PHP emitters but stay in the CSS — separate cleanup choice on whether to also delete those rules.
Map to a visually meaningful BS5 class in the PHP layer. Sub-choice on the target: secondary (BS4 upstream recommendation, mid-grey filled) vs light (closer to BS3's actual visual character, light filled) vs outline-secondary (subtle outlined). Apply consistently to Modal / Popover / Button / Badge / Alert. The pre-existing partial fix CSS becomes unreachable (same cleanup choice as option 2).
Historical chain:
default(.btn-default,.badge-default, etc.). BootstrapComponents was originally built against BS3 and exposeddefaultas a valid value forcoloron Modal, Popover, Button, and Badge.defaultcolour family. The BS4 migration guide recommends replacingbtn-defaultwithbtn-secondary; the same recommendation applied to alerts and badges.badge-<color>family in favour oftext-bg-<color>utilities.color="default"as a no-op at the framework-rule level. The PHP emitters continued to accept the value and emitbtn-default/badge-default, but the BS4 framework had no rule for those classes. BC carried two partial fixes on top:modules/ext.bootstrapComponents.alert.fix.css— full.alert-default { background-color: #f5f5f5; border-color: #ddd; color: #333; }(introduced in BC 1.2, 2018).modules/ext.bootstrapComponents.button.fix.css— link-colour rules fora.btn-defaultanda.btn-outline-default(anchor-only; overrides MediaWiki's anchor colour)..btn-defaultfor non-anchor buttons or.badge-defaultfor any badge. Net BC 5.x rendering ofcolor="default":<button class="btn btn-default">): browser-default<button>styling + BS4's.btnbase. Cross-browser-inconsistent.<a class="btn btn-default">): dark-text padded link (the link-colour fix applying here), no background, no border.<span class="badge badge-default">): transparent label with.badgepadding only.<div class="alert alert-default">): the BC-shipped grey-on-grey box (#f5f5f5/#ddd/#333).color="default"under BS5. The*-defaultclass is a no-op in BS5 too. The two partial fixes (.alert-defaultanda.btn-default/a.btn-outline-defaultlink colours) are preserved unchanged. Net behaviour is identical to BC 5.x.Why #93 didn't translate
defaultWe investigated mapping
default→secondary(orlight) at the PHP layer so existing wikitext using the legacy value would render with proper BS5 styling under 6.0. Decided against it because:secondary(or anything) would have been an improvement — a behaviour change layered on top of the framework lift, not a lift change itself.Options if we decide to act later
color="default"remains a documented attribute value that renders as effectively-unstyled (with the two pre-existing partial fixes carrying their existing behaviour). Zero work, no behaviour change.defaultfrom the attribute manager's allowed-value list. Documented behaviour change:color="default"becomes invalid and falls back to the per-component default (primaryfor Button/Badge,infofor Popover, no colour class for Modal). The two pre-existing partial fixes (.alert-defaultstyled rule,a.btn-defaultlink colour rule) become unreachable through the BC PHP emitters but stay in the CSS — separate cleanup choice on whether to also delete those rules.secondary(BS4 upstream recommendation, mid-grey filled) vslight(closer to BS3's actual visual character, light filled) vsoutline-secondary(subtle outlined). Apply consistently to Modal / Popover / Button / Badge / Alert. The pre-existing partial fix CSS becomes unreachable (same cleanup choice as option 2).Originally raised on #93.