From 2845005e5d0981c2d1e03ab0fb8498be99579deb Mon Sep 17 00:00:00 2001 From: Greg Sullivan Date: Fri, 12 Jul 2019 14:05:21 -0700 Subject: [PATCH 1/2] Fix aspect ratio typo and recalculate padding --- packages/block-library/src/embed/style.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/embed/style.scss b/packages/block-library/src/embed/style.scss index 6f3478f3bb1089..91ff621f429518 100644 --- a/packages/block-library/src/embed/style.scss +++ b/packages/block-library/src/embed/style.scss @@ -63,8 +63,8 @@ padding-top: 100%; // 1 / 1 * 100 } - &.wp-embed-aspect-9-6 .wp-block-embed__wrapper::before { - padding-top: 66.66%; // 6 / 9 * 100 + &.wp-embed-aspect-9-16 .wp-block-embed__wrapper::before { + padding-top: 177.77%; // 16 / 9 * 100 } &.wp-embed-aspect-1-2 .wp-block-embed__wrapper::before { From 6c830b6f4f961f06a205196342e93f8ec014785f Mon Sep 17 00:00:00 2001 From: Greg Sullivan Date: Tue, 16 Jul 2019 09:31:59 -0700 Subject: [PATCH 2/2] Fix rounding Second decimal place should be rounded up (to match values in ASPECT_RATIOS constant) --- packages/block-library/src/embed/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/embed/style.scss b/packages/block-library/src/embed/style.scss index 91ff621f429518..5409085faf0206 100644 --- a/packages/block-library/src/embed/style.scss +++ b/packages/block-library/src/embed/style.scss @@ -64,7 +64,7 @@ } &.wp-embed-aspect-9-16 .wp-block-embed__wrapper::before { - padding-top: 177.77%; // 16 / 9 * 100 + padding-top: 177.78%; // 16 / 9 * 100 } &.wp-embed-aspect-1-2 .wp-block-embed__wrapper::before {