css - Gutenberg Editor: display error with a combination of transform and background-attachment:fixed

For the output of post content, the main column is constrained to 700px. This allows for images etc. to be aligned left

For the output of post content, the main column is constrained to 700px. This allows for images etc. to be aligned left and right whilst remaining within the content column.

Adding a solution using a combination of left and translateX to “stretch” the width of elements marked with .alignwide or .alignfull outside the containing column works fine. However, when the element - e.g. a Cover Block - is marked with the class name has-parallax to allow a background image with background-attachment: fixed, the background image is also transformed relative to the browser window and hence cropped.

Does anyone understand why this is the case, or have a solution? A very simplified example of this occurrence is in this Pen:

For the output of post content, the main column is constrained to 700px. This allows for images etc. to be aligned left and right whilst remaining within the content column.

Adding a solution using a combination of left and translateX to “stretch” the width of elements marked with .alignwide or .alignfull outside the containing column works fine. However, when the element - e.g. a Cover Block - is marked with the class name has-parallax to allow a background image with background-attachment: fixed, the background image is also transformed relative to the browser window and hence cropped.

Does anyone understand why this is the case, or have a solution? A very simplified example of this occurrence is in this Pen: https://codepen.io/permanenttourist/pen/LYVZOpN?editors=1100

Share Improve this question edited Feb 20, 2020 at 12:50 Tom J Nowell 61.1k7 gold badges79 silver badges148 bronze badges asked Feb 18, 2020 at 15:55 Mark Howells-MeadMark Howells-Mead 3152 silver badges9 bronze badges 2
  • is this a frontend issue or a block editor issue? If this is an issue in stock Gutenberg you can raise a GitHub issue to get it resolved – Tom J Nowell Commented Feb 18, 2020 at 16:13
  • Frontend. I've since found a better solution, which uses negative margins to “stretch” the elements in question. The Codepen at codepen.io/permanenttourist/pen/LYVZOpN?editors=1100 is updated with the improved solution. – Mark Howells-Mead Commented Feb 19, 2020 at 17:23
Add a comment  | 

1 Answer 1

Reset to default 0

I've since found a better solution, which uses negative margins to “stretch” the elements in question. The Codepen at https://codepen.io/permanenttourist/pen/LYVZOpN?editors=1100 is updated with the improved solution.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744730767a4590454.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信