Repository navigation
Skeleton Mammoth 4.0.0
A smaller library (13.8 KB instead of 32 KB, 1.9 KB gzipped) with new features, a simpler configuration and the support of the high contrast mode.
Breaking changes
- Minimum browser versions are raised: Chrome 123, Edge 123, Firefox 120, Safari 17.5. The theme now uses
color-schemeandlight-dark(). In older browsers the skeleton is not displayed. borderRadiusis now a fallback. The ownborder-radiusof an element always takes precedence, and the prop is used only for the elements that do not have their own. Before, the prop overrode the own radius.
If you relied on that, set the radius in your own CSS for the loading state, for example.sm-loading .card__image { border-radius: 12px; }.
New
- Text lines: the
sm-item-lines-Nclasses (Nis from 1 to 10) draw the skeleton of a text asNlines, even if the element is still empty. Thesm-item-linesclass takes the number of the lines from the text. The--sm-linesand--sm-lines-gapvariables. reveal: "fade": the content appears smoothly when the loading is finished (the--sm-reveal-durationand--sm-reveal-timing-functionvariables).theme: "inherit": the skeleton takes thecolor-schemeof your page.borderRadius: "full": a circle or a pill.- High contrast mode (
forced-colors): the skeleton is visible and the hidden text stays hidden (the--sm-color-forcedand--sm-color-forced-animationvariables). - The README is rewritten: the configuration format, the notes and limitations, the troubleshooting, the examples for HTML, React, Vue, Angular and Svelte.
Upgrade
- Check the minimum browser versions of your project.
- If you used the
borderRadiusprop on elements that have their ownborder-radius, see above. - Nothing else changes: the classes, the
data-sm-configformat, the default values and the--sm-*variables work as before.