Description:
After upgrading from ABP 9.1.3 (.NET 9) to ABP 10.3 (.NET 10), we are observing unexpected changes in the LeptonX theme (v5.3.0) affecting both UI appearance and behavior.
Issues observed:
Visual Differences (CSS):
- Same styles now render differently.
- Example:
file: _content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/css/bootstrap-dim.css
```css
.btn-light {
--bs-btn-bg: #bbb; // ABP 9.1.3
}
.btn-light {
--bs-btn-bg: #eeeeee; // ABP 10.3
}
```
- This suggests changes in the underlying LeptonX/Bootstrap styling.
Sidebar Dropdown Not Working (JS Behavior):
- Sidebar menu dropdowns no longer expand/collapse.
- This was working correctly in ABP 9.1.3.
Reference:
- https://abp.io/support/questions/10622/leptonx-530-blazor-server-menu-collapse-bug
Questions:
- Is there any Latest Stable version I can downgrade my project to in ABP v10 to avoid these issues?
Environment:
- ABP 10.3.0
- .NET 10
- Blazor (LeptonX Theme)
3 Answer(s)
-
0
Hi,
Two separate things are happening here, and unfortunately downgrading inside ABP v10 won't avoid either of them. Details below.
1) Sidebar dropdown not expanding
This is a known LeptonX 5.3.0 regression — same root cause as the support question you already linked (#10622):
initSideMenuruns once fromSideMenuLayout.OnAfterRenderAsyncagainst an empty#lpx-sidebarbecauseMainMenuProvider.GetMenuAsyncis still awaiting, and nothing re-binds the click handlers when the menu finally renders or re-renders.Until the patch is out, drop this script block into
Pages/_Host.cshtml, after<abp-script-bundle name="@BlazorLeptonXThemeBundles.Scripts.Global"/>and theapp.jsscript tag:<script> (function () { try { const allBinds = new WeakMap(); let timer = null; const origAdd = EventTarget.prototype.addEventListener; EventTarget.prototype.addEventListener = function (type, fn, opts) { if (this instanceof Element && this.classList && this.classList.contains('lpx-menu-item') && this.closest && this.closest('#lpx-sidebar')) { let arr = allBinds.get(this); if (!arr) { arr = []; allBinds.set(this, arr); } arr.push({ type: type, fn: fn, opts: opts }); } return origAdd.call(this, type, fn, opts); }; function cleanupBinds() { document.querySelectorAll('#lpx-sidebar .lpx-menu-item').forEach(function (el) { const arr = allBinds.get(el); if (arr) { arr.forEach(function (b) { el.removeEventListener(b.type, b.fn, b.opts); }); allBinds.delete(el); } }); } const origInitLeptonX = window.initLeptonX; window.initLeptonX = function () { cleanupBinds(); return origInitLeptonX.apply(this, arguments); }; function reinit() { cleanupBinds(); const fn = window.leptonx && window.leptonx.init && window.leptonx.init.initializers && window.leptonx.init.initializers.get('initSideMenu'); if (fn) fn(); } function check() { const items = document.querySelectorAll('#lpx-sidebar .outer-menu-item > .lpx-menu-item'); if (items.length === 0) return; let needs = false; for (let i = 0; i < items.length; i++) { if (!allBinds.has(items[i])) { needs = true; break; } } if (needs) reinit(); } function debounced() { clearTimeout(timer); timer = setTimeout(check, 300); } new MutationObserver(debounced).observe(document.body, { childList: true, subtree: true }); debounced(); } catch (err) { console.error('[lpx-fix] failed:', err); } })(); </script>The proper upstream fix is already merged into the LeptonX
rel-5.3branch (GitHub PRvolosoft/lepton#3487) and will ship with the next LeptonX 5.3.x patch (alongside the next ABP 10.3.x patch). Once you upgrade to that patch, this whole script block can be removed.Full background (root cause, repro, impersonation trigger) is in the support question you linked: https://abp.io/support/questions/10622/leptonx-530-blazor-server-menu-collapse-bug
Note: downgrading v10 minor versions (10.3 → 10.2 / 10.1 / 10.0) does not reliably avoid this. The relevant TypeScript source in
pro-side-menu.tsandbase-side-menu.tsis identical from 5.0.0 through 5.3.0 — the race exists in earlier versions too, it just may not have been triggered for everyone. Cross-minor downgrades also bring DB / API churn that isn't worth it.2)
.btn-light --bs-btn-bgcolor changeThis one is not a bug, it's an intentional theme change in LeptonX 5.x. I verified it directly from the LeptonX repo by comparing
bootstrap-dim.cssacross versions:LeptonX 4.1.3 (ABP 9.1.3): .btn-light { --bs-btn-bg: #eeeeee; } LeptonX 5.0.0 (ABP 10.0.0): .btn-light { --bs-btn-bg: #bbb; } LeptonX 5.0.1 (ABP 10.0.1): .btn-light { --bs-btn-bg: #bbb; } LeptonX 5.1.x: .btn-light { --bs-btn-bg: #bbb; } LeptonX 5.2.x: .btn-light { --bs-btn-bg: #bbb; } LeptonX 5.3.0 (ABP 10.3.0): .btn-light { --bs-btn-bg: #bbb; }(Just a heads-up: in your post you have the values swapped — 9.1.3 was
#eeeeeeand 10.3 is#bbb, not the other way around.)So the change happened at the LeptonX 4 → 5 major bump as part of the dim-theme palette refresh, and every v10 minor uses the new value. Downgrading inside v10 won't restore the old
#eeeeeelook.If you want the 9.1.x appearance back, override the variable in your own site CSS. LeptonX puts the active style on the
<body>as a class (lpx-theme-dim/lpx-theme-light/lpx-theme-dark— set inSideMenuLayout.OnAfterRenderAsync), andbootstrap-{style}.cssis loaded conditionally per theme byAppearanceStyles.razor. So the simplest, most reliable override is:body.lpx-theme-dim .btn-light { --bs-btn-bg: #eeeeee; --bs-btn-border-color: #eeeeee; }The
body.lpx-theme-dimprefix beats the bare.btn-lightselector in the LeptonX bundle on specificity (0,2,0 vs 0,1,0), so load order doesn't matter. Usebody.lpx-theme-light/body.lpx-theme-darkif you also want to override those themes. The.btn-light.soft,.btn-light.greyetc. variants follow the same pattern.You wrote "Example: ..." in your post — if there are other visual differences besides
.btn-lightthat you want to revert (specific buttons, panels, sidebars, etc.), please share screenshots or the exact selectors and we can give you the matching overrides.On the downgrade question
Practical recommendation: stay on 10.3.0, apply the #10622 workaround for the sidebar, and override the CSS variables you care about. Then upgrade to 10.3.x once the LeptonX 5.3.x patch is out — the workaround can be removed at that point and the CSS override can stay (or not) depending on which look you prefer.
Thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
There are several theme improvements included in this upgrade, across ABP pages. However, some of the updated styles - primarily from
/_content/Volo.Abp.AspNetCore.Components.Web.LeptonXTheme/side-menu/css/bootstrap-dim.cssare rendering inconsistently and appear visually off in certain areas.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Thanks for the screenshots.
The visual drift in the first two screenshot pairs comes from the Bootstrap version that ships with LeptonX:
LeptonX 4.x (ABP 9.x) → bootstrap "~5.2.0" LeptonX 5.x (ABP 10.x) → bootstrap "~5.3.0"Bootstrap 5.3 is a design refresh under a "minor" version (new
.text-bg-*utilities, retuned token defaults, dark-mode nesting). LeptonX itself only changed one token between 4.1.3 and 5.3.0 —--lpx-lightwent from#eeeeeeto#bbb. You can revert that single token to recover the lighter card-header / button look in the first screenshot:body.lpx-theme-dim { --lpx-light-rgb: 238, 238, 238; --lpx-light: #eeeeee; }The second screenshot (
.bg-infobadge) is purely Bootstrap 5.3's new.text-bg-*rendering —--lpx-infois unchanged in LeptonX itself.For the third screenshot the styling is complex enough that we'd rather inspect the actual project than keep reasoning about it from source. Could you put together a minimal reproducible project and email it to liming.ma@volosoft.com?
- Start from the default ABP 10.3.0 Blazor Server template with the LeptonX SideMenu layout.
- Add only what's needed to render the broken page from the third screenshot.
- Strip out unrelated modules, custom auth, business data, etc. — keep dependencies as light as possible.
Thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)





