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
{{ message }}
Repository navigation
Provide a method for InlineSpan to override the styles of its children #177952
I'd like to be able to override the styles of all children of an InlineSpan tree. Currently each InlineSpan has a local representation of its TextStyle and InlineSpan children, so you cannot simply wrap an InlineSpan with another InlineSpan and expect the parents InlineSpan.style to override it's child's. This is by design, since nested spans can define their own TextStyles.
Proposal
InlineSpan should have some mechanism to override the TextStyles of its InlineSpan children. Currently textScaler is able to penetrate an entire InlineSpan tree because the InlineSpan.build method has a textScaler member. We can take a similar approach and add individual styling members to the build method as needed or we can add a style argument that is passed down to all children.
Use case
For accessibility use cases like updating text spacing settings to match certain standards like WCAG, it is required to be able to change the spacing settings of all text. Currently with InlineSpans this can only be done at the root of the span tree, and if children spans locally define their own styles there is no method to change their styles outside of recreating the span itself. Recreating the span itself is not a robust solution since you can only do this for InlineSpans subclasses you own.
Activity
shivanuj13 commentedon Nov 18, 2025
Since the requested feature has already been merged into master, can we close this issue now?
Renzo-Olivares commentedon Nov 18, 2025
Hi @shivanuj13, this issue should remain open. The PR that landed did not land this feature.