feat(skeleton-text): add recipe and tokens#31210
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| } | ||
|
|
||
| ::slotted(ion-skeleton-text) { | ||
| @include border-radius(var(--border-radius, revert-layer)); |
There was a problem hiding this comment.
This will eventually look like @include border-radius(var(--ion-avatar-border-radius, revert-layer)); when avatar is migrated.
There was a problem hiding this comment.
Deleted snapshots because they didn't differ in behavior when it came to modes or direction.
There was a problem hiding this comment.
Now using setContent and simplified it to show one of each use case that the basic test page is showing.
There was a problem hiding this comment.
Now using setContent and simplified it to show one of each use case that the custom test page is showing.
There was a problem hiding this comment.
Since animations are turned off on e2e, it was easier to test out in a spec.
There was a problem hiding this comment.
I decided to split the background into two states and also introduced alpha. This would allow further flexibility for devs to customize their skeletons.
Issue number: resolves internal
What is the current behavior?
ion-skeleton-textis not integrated with the Modular Ionic token system.What is the new behavior?
ion-skeleton-textto Modular Ionic, consolidating its styles into a single token-driven stylesheet.IonSkeletonTextRecipeplus per-theme token defaults in the ios, md, and ionic theme files.--backgroundand--background-rgbwith per-state background tokens. Each state (resting and animated) exposes an RGB channel and an alpha, so the resting fill and the animated shimmer can be recolored and have their opacity set independently (--ion-skeleton-text-default-background-rgb/-alphaand--ion-skeleton-text-animated-background-rgb/-alpha).--border-radiusto--ion-skeleton-text-border-radius, and adds--ion-skeleton-text-line-heightand--ion-skeleton-text-margin-top/--ion-skeleton-text-margin-bottomtokens.getIonThemeand thethemevirtual prop); visual differences now come entirely from tokens.ion-thumbnailsets the radius on::slotted(ion-skeleton-text), andion-avatardoes the same through its existing--border-radius.Does this introduce a breaking change?
This PR introduces breaking changes to how
ion-skeleton-textis styled.Migration Path:
--backgroundand--background-rgbare replaced with per-state RGB and alpha variables. The single--background-rgbpreviously tinted both the resting fill and the shimmer, so set both state variables to recolor both.--background(the resolved resting color) has no one-to-one replacement; set the resting RGB and alpha instead.--background-rgbIonSkeletonText.default.background.rgb--ion-skeleton-text-default-background-rgb--background-rgbIonSkeletonText.animated.background.rgb--ion-skeleton-text-animated-background-rgb--border-radiusIonSkeletonText.border.radius--ion-skeleton-text-border-radiusOther information
Previews