=== Shapes Smart Scroll Animations === Contributors: lkdsgnr Tags: animation, scroll, lightweight, performance, accessibility Requires at least: 5.2 Tested up to: 6.9 Stable tag: 1.0.7 Requires PHP: 7.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Add high-performance entrance animations with Smart Grid Delay logic. Zero dependencies, GPU accelerated, and Accessibility ready. == Description == Shapes Smart Scroll Animations is a micro-tool designed for developers and designers who need clean entrance animations without external libraries. This plugin uses a Smart Grid Delay logic to detect your layout structure and animate elements naturally, whether they are in a multi-column desktop grid or a single-column mobile view. ### How does it work? Here is a deep dive into the technical advantages of Shapes Smart Scroll Animations plugin: #### 1. Smart Grid Delay logic The core of this plugin is the `calculateColumnsInGroup` algorithm. Instead of forcing you to write complex media queries for animation delays, the plugin: * Dynamically checks the physical position (`offsetTop`) of elements. * Detects when a new row begins. * Resets the delay counter for every new row. * Result: Animations look professional and perfectly staggered on any screen size automatically. #### 2. Performance (Vanilla JS) * **Zero Dependencies:** No jQuery, no GSAP, no heavy frameworks. The script is ultra-lightweight. * **IntersectionObserver API:** I use the modern browser API to detect scrolling, which is much more efficient than listening to the `scroll` event. * **GPU Acceleration:** CSS properties use `will-change` to inform the browser ahead of time, offloading rendering to the GPU for smooth animations. #### 3. Accessibility first This plugin automatically respects the user's operating system preferences. * **Reduced Motion Support:** If a visitor has "Reduce Motion" enabled in their system (Windows, macOS, iOS, Android), the plugin automatically disables all entrance animations to prevent motion sickness. * **Inclusive Design:** Your site remains compliant with modern web standards without extra work. #### 4. Developer friendly * **No-JS Fallback:** If JavaScript fails or is disabled, elements remain fully visible (opacity: 1). Your content is safe. * **CSS Variables:** I moved hardcoded values to CSS Custom Properties (`:root`). You can globally change animation duration, easing, or distance directly in your theme's CSS without editing plugin files. * **Simple Class System:** Just add `.shps-animated` and an effect class. ### Available effects * **Slide Up:** `.shps-slide-up` (Classic elegant entrance) * **Zoom Out:** `.shps-zoom-out` (Modern scaling effect) * **Slide Right:** `.shps-slide-right` * **Slide Left:** `.shps-slide-left` ### How to use? 1. **Single Element:** Add `shps-animated shps-slide-up` to any HTML element or Block. 2. **Grid/Group:** Wrap elements in a container with class `shps-group` to enable the Smart Grid Delay. **Example HTML:** `