diff --git a/inc/renderer.php b/inc/renderer.php index 08f4d439c..34211b786 100644 --- a/inc/renderer.php +++ b/inc/renderer.php @@ -562,7 +562,7 @@ private function start_style_wrapper( $name, $style = array(), $for = false ) { } $style_wrapper = ''; - if ( ! empty( $attributes ) || ! empty( $standard_css ) || ! empty( $mobile_css ) ) { + if ( ! empty( $attributes ) || ! empty( $standard_css ) || ! empty( $tablet_css )|| ! empty( $mobile_css ) ) { if ( empty( $attributes['class'] ) ) { $attributes['class'] = array(); } diff --git a/inc/styles.php b/inc/styles.php index 1b7c37ec3..3eee5138d 100644 --- a/inc/styles.php +++ b/inc/styles.php @@ -684,6 +684,14 @@ static function general_style_tablet_css( $css, $style ){ $css['padding'] = $style[ 'tablet_padding' ]; } + if ( + ! empty( $style['background_display'] ) && + $style['background_display'] == 'fixed' && + ! ( empty( $style['background_image_attachment'] ) && empty( $style['background_image_attachment_fallback'] ) ) + ) { + $css[ 'background-attachment' ] = 'scroll'; + } + return $css; } diff --git a/readme.txt b/readme.txt index 4b19e87ca..65831970c 100644 --- a/readme.txt +++ b/readme.txt @@ -107,6 +107,9 @@ SiteOrigin Premium includes access to our professional email support service, pe == Changelog == += 2.16.3 - 14 February 2022 = +* Fixed Background Images: Change to `scroll` on mobile devices. Resolves iOS bug. + = 2.16.2 - 07 February 2022 = * Added Yoast Video SEO plugin integration. * Restored content analysis functionality for newer Yoast SEO versions.