Skip to content

fix(config): apply app config over theme config - #31635

Open
brandyscarney wants to merge 1 commit into
ionic-modularfrom
FW-7803
Open

brandyscarney wants to merge 1 commit into
ionic-modularfrom
FW-7803

Conversation

@brandyscarney

Copy link
Copy Markdown
Member

Issue number: internal


What is the current behavior?

Config can be set by the app (window.Ionic.config / setupConfig) and by a theme's config block. initialize() applies the app config first and the theme's config on top, so the theme wins:

  • Primitive values from the theme replace the app's value. If the theme sets rippleEffect: true, an app that sets rippleEffect: false still gets ripples.
  • Object values merge with the theme winning on overlapping keys. An app's screenBreakpoints: { md: 500 } is overridden by a theme's md: 700.

Only the custom theme's config block is read. The base theme's config is never applied, whether or not a custom theme is supplied.

What is the new behavior?

  • Theme config only provides defaults. Global config now layers as base theme → custom theme → app, with later layers winning.
  • For object values such as screenBreakpoints, the theme fills in only the keys the app did not set.
  • If the app's value isn't an object but the theme's is, the app's value is kept as is.
  • The base theme's config is now applied, merged with the custom theme when one is supplied.
  • The base theme no longer sets rippleEffect: false. See below.

Why the base theme no longer sets rippleEffect

Applying the base config makes its values real, and for most apps base is the only theme config that applies. A theme's token file is only loaded when the app passes it as customTheme. An app that uses md, either by default off iOS or by setting theme: 'md', gets the base tokens only. md's rippleEffect: true never loads.

Tap-click drives every ripple and reads config.getBoolean('rippleEffect', true). Today rippleEffect is unset for these apps, so it falls back to true and ripples work, matching main. If base kept rippleEffect: false, that value would now be applied and tap-click would stop showing ripples for every md app that doesn't supply a custom theme:

md app, no customTheme rippleEffect Ripples
main unset → true on
base sets false false off
this PR unset → true on

Removing it from base leaves ripple behavior unchanged everywhere. md's token file still sets true. The remaining base value, formHighlight: false, has no runtime reader yet, so applying it changes nothing.

Once choosing a theme loads that theme's tokens, md's true will always layer over base. Base can then set rippleEffect: false, and the tap-click and chip fallbacks can be removed. That work is tracked in FW-7893, along with renaming customTheme to theme.

Does this introduce a breaking change?

  • Yes
  • No

@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Oct 22, 2026 8:15pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — a36544b5 Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant