Changeset 3480346
- Timestamp:
- 03/11/2026 04:08:57 PM (3 weeks ago)
- Location:
- effortless-carousel-with-gallery/trunk
- Files:
-
- 4 edited
-
assets/css/carousel.css (modified) (3 diffs)
-
assets/js/frontend.js (modified) (2 diffs)
-
effortless-carousel-with-gallery.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
effortless-carousel-with-gallery/trunk/assets/css/carousel.css
r3480321 r3480346 4 4 width: 100%; 5 5 margin: 0 auto; 6 overflow: hidden; 7 } 8 9 /* Gallery base styles: respect WordPress width*/6 overflow: hidden; /* clips slides outside viewport horizontally */ 7 } 8 9 /* Gallery base styles: override WordPress flex gallery layout */ 10 10 .wp-block-gallery.elcwg_carousel_active { 11 width: 100%;12 margin: 0;13 padding: 0;14 display: block;11 display: block !important; /* override WordPress has-nested-images flex */ 12 width: 100% !important; 13 margin: 0 !important; 14 padding: 0 !important; 15 15 box-sizing: border-box; 16 gap: 0 !important; /* override WordPress default gallery gap */ 16 gap: 0 !important; 17 position: relative; /* positioning context for nav arrows */ 17 18 } 18 19 … … 28 29 /* Slide styles: dynamic width based on --slides-per-view */ 29 30 .elcwg-carousel-inner .wp-block-image { 30 flex: 0 0 calc(100% / var(--slides-per-view, 1)); 31 width: calc(100% / var(--slides-per-view, 1)); 31 flex: 0 0 calc(100% / var(--slides-per-view, 1)) !important; 32 width: calc(100% / var(--slides-per-view, 1)) !important; 33 max-width: calc(100% / var(--slides-per-view, 1)) !important; 32 34 padding: 0 var(--elcwg-card-gap, 8px); 33 35 box-sizing: border-box; 34 display: flex ;36 display: flex !important; 35 37 align-items: center; 36 38 justify-content: center; 37 39 box-shadow: none !important; 38 position: relative; /* Important pour le positionnement du caption */ 39 container-type: inline-size; /* Active les container queries */ 40 } 41 42 /* Image styles: respect WordPress-defined sizes */ 40 position: relative; 41 container-type: inline-size; 42 margin: 0 !important; /* override WordPress figure margin */ 43 } 44 45 /* Image styles: fill the column slot, maintain aspect ratio */ 43 46 .elcwg-carousel-inner .wp-block-image img { 44 width: 100% ;45 height: auto ;47 width: 100% !important; 48 height: auto !important; 46 49 display: block; 47 50 box-shadow: none !important; … … 163 166 } 164 167 165 /* Responsive adjustments (#13: scoped to gallery, not :root) */ 166 @media (max-width: 768px) { 167 .wp-block-gallery.elcwg_carousel_active { 168 --slides-per-view: 2; 169 } 170 } 171 168 /* Mobile: force 1 column (JS mirrors this via getEffectiveColumns) */ 172 169 @media (max-width: 480px) { 173 170 .wp-block-gallery.elcwg_carousel_active { -
effortless-carousel-with-gallery/trunk/assets/js/frontend.js
r3480298 r3480346 47 47 // Returns the number of visible slides for the current viewport width. 48 48 const getEffectiveColumns = () => { 49 const w = window.innerWidth; 50 if (w < 480) return 1; 51 if (w < 768) return Math.min(2, baseColumns); 52 return Math.min(baseColumns, Math.floor(w / 200)); 49 return window.innerWidth < 480 ? 1 : baseColumns; 53 50 }; 54 51 … … 104 101 nextButton.setAttribute('aria-label', 'Next slide'); 105 102 106 wrapper.appendChild(prevButton);107 wrapper.appendChild(nextButton);103 gallery.appendChild(prevButton); 104 gallery.appendChild(nextButton); 108 105 109 106 // Navigation dots. -
effortless-carousel-with-gallery/trunk/effortless-carousel-with-gallery.php
r3480321 r3480346 3 3 * Plugin Name: Effortless Carousel with Gallery 4 4 * Description: Adds responsive carousel with animation functionality to WordPress galleries. 5 * Version: 1.1. 45 * Version: 1.1.8 6 6 * Requires at least: 5.5 7 7 * Requires PHP: 7.2 … … 21 21 22 22 /** Plugin version constant. */ 23 define( 'ELCWG_VERSION', '1.1. 4' );23 define( 'ELCWG_VERSION', '1.1.8' ); 24 24 25 25 /** -
effortless-carousel-with-gallery/trunk/readme.txt
r3480321 r3480346 4 4 Requires at least: 5.5 5 5 Tested up to: 6.9 6 Stable tag: 1.1. 46 Stable tag: 1.1.8 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 65 65 66 66 == Changelog == 67 68 = 1.1.8 = 69 * Fixed: Added !important overrides to counter WordPress has-nested-images gallery CSS that was fighting plugin layout rules, causing columns and images to appear off-center or wrong size. 70 71 = 1.1.7 = 72 * Fixed: Navigation arrows are now always vertically centered relative to the image area only, not the full wrapper (which included the dots below). 73 74 = 1.1.6 = 75 * Improved: Images now display at their natural size (never stretched), centered within their column slot. Nothing is ever cropped. Previously images were forced to 100% slot width which distorted portrait images. 76 77 = 1.1.5 = 78 * Improved: Carousel now always shows exactly the number of columns selected in the gallery block. On mobile (< 480px) it forces 1 column. Removed intermediate breakpoint that was capping columns at 2 on tablets. 67 79 68 80 = 1.1.4 =
Note: See TracChangeset
for help on using the changeset viewer.