diff --git a/packages/block-library/src/column/deprecated.js b/packages/block-library/src/column/deprecated.js
index 52d3f675df2997..995927b543a6d7 100644
--- a/packages/block-library/src/column/deprecated.js
+++ b/packages/block-library/src/column/deprecated.js
@@ -20,6 +20,9 @@ const deprecated = [
max: 100,
},
},
+ isEligible( { width } ) {
+ return isFinite( width );
+ },
migrate( attributes ) {
return {
...attributes,
@@ -33,10 +36,7 @@ const deprecated = [
[ `is-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment,
} );
- let style;
- if ( Number.isFinite( width ) ) {
- style = { flexBasis: width + '%' };
- }
+ const style = { flexBasis: width + '%' };
return (
diff --git a/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.html b/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.html
new file mode 100644
index 00000000000000..9a91555220e9d2
--- /dev/null
+++ b/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.html
@@ -0,0 +1,10 @@
+
+
+
+
Column One, Paragraph One
+
+
+
Column One, Paragraph Two
+
+
+
diff --git a/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.json b/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.json
new file mode 100644
index 00000000000000..84b28da2956a08
--- /dev/null
+++ b/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.json
@@ -0,0 +1,35 @@
+[
+ {
+ "clientId": "_clientId_0",
+ "name": "core/column",
+ "isValid": true,
+ "attributes": {
+ "width": "33.33%"
+ },
+ "innerBlocks": [
+ {
+ "clientId": "_clientId_0",
+ "name": "core/paragraph",
+ "isValid": true,
+ "attributes": {
+ "content": "Column One, Paragraph One",
+ "dropCap": false
+ },
+ "innerBlocks": [],
+ "originalContent": "
Column One, Paragraph One
"
+ },
+ {
+ "clientId": "_clientId_1",
+ "name": "core/paragraph",
+ "isValid": true,
+ "attributes": {
+ "content": "Column One, Paragraph Two",
+ "dropCap": false
+ },
+ "innerBlocks": [],
+ "originalContent": "
Column One, Paragraph Two
"
+ }
+ ],
+ "originalContent": "
\n\t\n\t\n
"
+ }
+]
diff --git a/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.parsed.json b/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.parsed.json
new file mode 100644
index 00000000000000..050341fdaedb47
--- /dev/null
+++ b/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.parsed.json
@@ -0,0 +1,45 @@
+[
+ {
+ "blockName": "core/column",
+ "attrs": {
+ "width": 33.33
+ },
+ "innerBlocks": [
+ {
+ "blockName": "core/paragraph",
+ "attrs": {},
+ "innerBlocks": [],
+ "innerHTML": "\n\t
Column One, Paragraph One
\n\t",
+ "innerContent": [
+ "\n\t
Column One, Paragraph One
\n\t"
+ ]
+ },
+ {
+ "blockName": "core/paragraph",
+ "attrs": {},
+ "innerBlocks": [],
+ "innerHTML": "\n\t
Column One, Paragraph Two
\n\t",
+ "innerContent": [
+ "\n\t
Column One, Paragraph Two
\n\t"
+ ]
+ }
+ ],
+ "innerHTML": "\n
\n\t\n\t\n
\n",
+ "innerContent": [
+ "\n
\n\t",
+ null,
+ "\n\t",
+ null,
+ "\n
\n"
+ ]
+ },
+ {
+ "blockName": null,
+ "attrs": {},
+ "innerBlocks": [],
+ "innerHTML": "\n",
+ "innerContent": [
+ "\n"
+ ]
+ }
+]
diff --git a/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.serialized.html b/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.serialized.html
new file mode 100644
index 00000000000000..83dd9fc0dd594d
--- /dev/null
+++ b/packages/e2e-tests/fixtures/blocks/core__column__deprecated-1.serialized.html
@@ -0,0 +1,9 @@
+
+
+
Column One, Paragraph One
+
+
+
+
Column One, Paragraph Two
+
+