Repository navigation
fix(accordion): use disabled colors for the disabled state in the ionic theme - #31697
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ic theme Co-authored-by: Cursor <cursoragent@cursor.com>
os-davidlourenco
force-pushed
the
ROU-13188
branch
from
November 5, 2026 14:26
3a7fa02 to
65fa328
Compare
ShaneK
requested changes
Nov 5, 2026
ShaneK
left a comment
Member
There was a problem hiding this comment.
Generally looking good, the dark mode background is fixed! Just one thing, the disabled colors don't reach nested accordions or items in the content, so a disabled parent's children look enabled even though they can't be clicked. I left a suggestion that covers it.
ShaneK
approved these changes
Nov 5, 2026
ShaneK
left a comment
Member
There was a problem hiding this comment.
Thanks for the updates! Nested accordions and content items pick up the disabled colors now, and enabled ones are unchanged. Looks good 🚀
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: internal (ROU-13188)
What is the current behavior?
In the
ionictheme, a disabledion-accordionis drawn with a::beforeoverlay that uses the shareddisabled-state()mixin, painting thestate-disabledtoken over the whole component.That token is white at 60% opacity in light mode but black at 60% in dark mode. In light mode the white scrim blends into the white surface and looks like a fade, but in dark mode the black scrim turns the accordion surface (
#1a1d21) into roughly#0a0c0d— darker than the page behind it (#131518) — so the disabled accordion renders as a black slab.What is the new behavior?
::beforeoverlay is removed from the disabled accordion inaccordion.ionic.scss.text-disabledtoken, and the toggle icon switches to theicon-disabledtoken.accordion.ionic.scss; the toggle icon rule lives incore.ionic.scssbecause the icon is injected into the slotted header item (light DOM), like its existing default-state rule.#9fa5adon a white surface, dark#505763on the#1a1d21surface, for title, content and icon.disabled-state()mixin and the other components that use it are untouched.Does this introduce a breaking change?
Other information
pointer-events: nonefor the disabled state lives inaccordion.common.scss, and thedisablede2e tests (clicks and keyboard) pass.ionic-mdlight screenshots for the disabled accordion states will change:accordion/test/states,accordion/test/nested,accordion-group/test/states.statestest page: it setscolor="light"onion-content, which stays white even with dark tokens; the disabled colors themselves are unaffected by this, since they no longer depend on what is behind the accordion.