File tree Expand file tree Collapse file tree 10 files changed +67
-4
lines changed
app/code/Magento/PageBuilder
base/web/js/content-type/row/appearance/default
frontend/web/css/source/content-type Expand file tree Collapse file tree 10 files changed +67
-4
lines changed Original file line number Diff line number Diff line change 32353235 <actionGroup ref =" switchToPageBuilderStage" stepKey =" switchToPageBuilderStage" />
32363236 </before >
32373237 <after >
3238+ <resizeWindow width =" 1280" height =" 1024" stepKey =" resizeWindowToDesktop" />
32383239 <actionGroup ref =" navigateToMediaGallery" stepKey =" navigateToMediaGallery" />
32393240 <actionGroup ref =" NavigateToMediaFolderActionGroup" stepKey =" NavigateToFolder" >
32403241 <argument name =" FolderName" value =" {{PageBuilderBackgroundImage_JPG.path}}" />
33113312 <argument name =" backgroundImage" value =" PageBuilderBackgroundImage_JPG" />
33123313 <argument name =" pageNamePrefix" value =" banner" />
33133314 </actionGroup >
3315+ <resizeWindow width =" 767" height =" 1000" stepKey =" resizeWindowToMobile" />
3316+ <!-- Storefront: Check Background Attachment Mobile -->
3317+ <comment userInput =" Storefront: Check Background Attachment Mobile" stepKey =" commentStorefrontCheckMobile" />
3318+ <executeJS function =" return jQuery({{BannerOnFrontend.wrapperJS('1')}}).css('background-attachment')" stepKey =" assignedBackgroundAttachment" />
3319+ <assertEquals stepKey =" assertEqualToEnteredValue" >
3320+ <expectedResult type =" string" >{{PageBuilderBackgroundAttachment_Scroll.value}}</expectedResult >
3321+ <actualResult type =" variable" >$assignedBackgroundAttachment</actualResult >
3322+ </assertEquals >
33143323 </test >
33153324</tests >
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ export default class Preview extends PreviewCollection {
4949 ) {
5050 _ . defer ( ( ) => {
5151 // Build Parallax on elements with the correct class
52+ const parallaxSpeed = Number . parseFloat ( this . parent . dataStore . get ( "parallax_speed" ) as string ) ;
5253 jarallax (
5354 this . element ,
5455 {
@@ -58,7 +59,7 @@ export default class Preview extends PreviewCollection {
5859 ( this . parent . dataStore . get ( "background_repeat" ) as "repeat" | "no-repeat" ) || "no-repeat"
5960 ) ,
6061 imgSize : this . parent . dataStore . get ( "background_size" ) as string || "cover" ,
61- speed : Number . parseFloat ( this . parent . dataStore . get ( "parallax_speed" ) as string ) || 0.5 ,
62+ speed : ! isNaN ( parallaxSpeed ) ? parallaxSpeed : 0.5 ,
6263 } ,
6364 ) ;
6465
Original file line number Diff line number Diff line change 99 'use strict' ;
1010
1111 return function ( config , element ) {
12- var $element = $ ( element ) ;
12+ var $element = $ ( element ) ,
13+ parallaxSpeed = null ;
1314
1415 if ( $element . data ( 'appearance' ) === 'contained' ) {
1516 $element = $ ( element ) . find ( '[data-element="inner"]' ) ;
@@ -22,11 +23,13 @@ define([
2223 $element . addClass ( 'jarallax' ) ;
2324 $element . attr ( 'data-jarallax' , '' ) ;
2425
26+ parallaxSpeed = parseFloat ( $element . data ( 'parallaxSpeed' ) ) ;
27+
2528 window . jarallax ( $element [ 0 ] , {
2629 imgPosition : $element [ 0 ] . style . backgroundPosition || '50% 50%' ,
2730 imgRepeat : $element [ 0 ] . style . backgroundRepeat || 'no-repeat' ,
2831 imgSize : $element [ 0 ] . style . backgroundSize || 'cover' ,
29- speed : parseFloat ( $element . data ( ' parallaxSpeed' ) ) || 0.5
32+ speed : ! isNaN ( parallaxSpeed ) ? parallaxSpeed : 0.5
3033 } ) ;
3134 } ;
3235} ) ;
Original file line number Diff line number Diff line change 6666
6767@media only screen and (max-width : @screen__m ) {
6868 .pagebuilder-banner-wrapper {
69+ background-attachment : scroll !important ;
70+
6971 .pagebuilder-overlay :not (.pagebuilder-poster-overlay ) {
7072 max-width : none ;
7173 }
Original file line number Diff line number Diff line change 1111 box-sizing : border-box ;
1212}
1313
14+ //
15+ // Responsive Classes
16+ // _____________________________________________
17+
1418@media only screen and (max-width : @screen__m ) {
1519 .pagebuilder-column {
20+ background-attachment : scroll !important ;
1621 flex-basis : 100% ;
1722 }
1823}
Original file line number Diff line number Diff line change 1717 box-sizing : border-box ;
1818 }
1919}
20+
21+ //
22+ // Responsive Classes
23+ // _____________________________________________
24+
25+ @media only screen and (max-width : @screen__m ) {
26+ [data- role= ' row' ][data- appearance= ' contained' ] {
27+ [data- element= ' inner' ] {
28+ background-attachment : scroll !important ;
29+ }
30+ }
31+ }
Original file line number Diff line number Diff line change 1010[data- role= ' row' ][data- appearance= ' full-bleed' ] {
1111 box-sizing : border-box ;
1212}
13+
14+ //
15+ // Responsive Classes
16+ // _____________________________________________
17+
18+ @media only screen and (max-width : @screen__m ) {
19+ [data- role= ' row' ][data- appearance= ' full-bleed' ] {
20+ background-attachment : scroll !important ;
21+ }
22+ }
Original file line number Diff line number Diff line change 1818 width : 100% ;
1919 }
2020}
21+
22+ //
23+ // Responsive Classes
24+ // _____________________________________________
25+
26+ @media only screen and (max-width : @screen__m ) {
27+ [data- role= ' row' ][data- appearance= ' full-width' ] {
28+ background-attachment : scroll !important ;
29+ }
30+ }
Original file line number Diff line number Diff line change @@ -102,3 +102,13 @@ div[data-role='tabs'] {
102102 }
103103 }
104104}
105+
106+ //
107+ // Responsive Classes
108+ // _____________________________________________
109+
110+ @media only screen and (max-width : @screen__m ) {
111+ [data- role= ' tab-item' ] {
112+ background-attachment : scroll !important ;
113+ }
114+ }
You can’t perform that action at this time.
0 commit comments