Problem/Motivation

If I add something like this to my site and run the stylelint, I get an error (unknown unit)

.class {
  height: 100dvh;
}

Steps to reproduce

Described above.

Here's an explainer about these units: https://dev.to/frehner/css-vh-dvh-lvh-svh-and-vw-units-27k4

Proposed resolution

Add the following to the allow units list: dvh, svh, lvh, dvw, svw, lvw since they are all valid CSS units (especially in an era of mobile design).

Remaining tasks

Create MR

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

dvh, svh, lvh, dvw, svw, lvw are now allowed units in our .stylelintrc.json config.

Issue fork drupal-3569022

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

markconroy created an issue. See original summary.

markconroy’s picture

Issue summary: View changes
markconroy’s picture

Version: 11.3.x-dev » main

markconroy’s picture

Status: Active » Needs review
cilefen’s picture

Component: theme system » CSS
Category: Feature request » Task
Status: Needs review » Reviewed & tested by the community
Related issues: +#3447942: Update stylelint rule unit-allowed-list to include container query units

In #3447942: Update stylelint rule unit-allowed-list to include container query units, this was the CSS component, so I'm just moving it there and updating the category to match. I don't see a reason not to do this.

  • catch committed 3ad1f9f4 on 11.x
    task: #3569022 Add dvh, svh, lvh, dvw, svw, lvw as allowed units in ....

  • catch committed 4e56935c on main
    task: #3569022 Add dvh, svh, lvh, dvw, svw, lvw as allowed units in ....
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.