Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5c9164b. Configure here.
…m property handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Contexte et objectif
Cette PR ajoute un mixin SCSS réutilisable pour des listes ou rangées d’éléments défilables horizontalement, avec scroll snap natif (sans Swiper ni JavaScript). Le cas d’usage visé est typiquement le mobile / petit écran : une carte (ou slide) occupe presque toute la largeur, avec un aperçu de la suivante à droite pour inciter au scroll, tout en respectant le full-bleed par rapport aux gouttières du layout WordPress (
--responsive--gutter-*).Fichier livré :
src/scss/02-tools/_m-horizontal-scroll-snap.scss.Le mixin n’est pas branché sur un composant du thème par défaut : les projets l’appliquent sur le conteneur scrollable (souvent un
<ul>) via@include horizontal-scroll-snap, en général derrière unbreakpoints(sm, max)pour ne pas remplacer un carrousel desktop.Comportement CSS
Conteneur (élément qui reçoit le mixin)
display: flex+flex-wrap: nowrapgap--horizontal-scroll-gap)overflow-x: autooverscroll-behavior-x: containscroll-snap-type: x mandatoryscroll-padding-inline-webkit-overflow-scrolling: touchscrollbar-invisiblem-scrollbar) — à utiliser sur un sous-conteneur, pas surhtml/body(cf. alerte du mixin scrollbar)Items (sélecteur configurable)
Par défaut : enfants directs
> li(listes sémantiques).flex: 0 0 calc(100% - var(--horizontal-scroll-peek))min-width: 0scroll-snap-align: startVariables CSS personnalisables
Définies sur le conteneur ; surcharge optionnelle en CSS :
--horizontal-scroll-gap$settings-spacing-xsgapentre les slides--horizontal-scroll-peekgap + $settings-spacing-xsAPI du mixin
$item-selector: sélecteur des slides (relatif au conteneur). Ex."> .card"si les enfants ne sont pas des<li>.Exemple d’intégration
Markup typique :
Surcharge des espacements :
Accessibilité et choix produit
Slider) du framework.Dépendances internes
theme-json: espacements$settings-spacing-xsm-scrollbar:scrollbar-invisible_variables-css.scss:--responsive--gutter-left,--responsive--gutter-rightSynthèse
Nouveau mixin
horizontal-scroll-snap: piste horizontale full-bleed, snap mandatory, peek de la slide suivante, scrollbar invisible, API simple ($item-selector+ 2 custom properties). À combiner avec les breakpoints du thème pour les patterns « carrousel CSS » mobile, en complément (et non en doublon) de Swiper sur les vues desktop ou les besoins a11y avancés.Note
Low Risk
Adds an unused SCSS mixin only; no runtime or theme behavior changes until a component opts in.
Overview
Adds a new SCSS tool mixin
horizontal-scroll-snapin_m-horizontal-scroll-snap.scssfor opt-in, mobile-style horizontal rows that use nativescroll-snapinstead of Swiper/JS.The mixin turns a container (default slide selector
> li) into a nowrap flex track withoverflow-x: auto, mandatory X snap,overscroll-behavior-x: contain, andscrollbar-invisible. It full-bleeds past content width using--responsive--gutter-left/right(negative margins + padding +scroll-padding-inline). Each item is sized tocalc(100% - peek)so the next slide shows on the right;--horizontal-scroll-gapand--horizontal-scroll-peek(and optional$item-selector) can be overridden on the container before@include.Nothing in the theme includes this mixin by default—consumers import it and apply it (typically behind a small-screen breakpoint).
Reviewed by Cursor Bugbot for commit dd2ed26. Bugbot is set up for automated code reviews on this repo. Configure here.