Skip to content

Add support for CSS Units Value 4 ('svh', 'lvh', 'dvh', 'svw', 'lvw', 'dvw', ...) #52441

Description

What problem does this address?

Hey. I added this in theme.json:

"spacing": {
	"units": [
		"px",
		"%",
		"em",
		"rem",
		"vh",
		"vw",
		"dvh",
		"dvw",
		"vb",
		"vw"
	]
},

When editing a block, only these are available:

SCREENSHOT-1

As you can see, in this example, "dvh", "dvw", "vb" and "vw" are missing.

What is your proposed solution?

I pleasantly ask you to: Recognize the missing CSS Relative Units.
List: https://www.w3.org/TR/css-values-4/#viewport-relative-units
More info: https://www.terluinwebdesign.nl/en/css/incoming-20-new-css-viewport-units-svh-lvh-dvh-svw-lvw-dvw/
More info: https://caniuse.com/viewport-unit-variants

Please consider a backport to WP 6.3.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions