Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Parse error when using dynamic viewport units (e.g. svh, lvw) #217

Closed
geecko86 opened this issue Aug 10, 2024 · 1 comment · Fixed by #218
Closed

[Bug]: Parse error when using dynamic viewport units (e.g. svh, lvw) #217

geecko86 opened this issue Aug 10, 2024 · 1 comment · Fixed by #218
Labels

Comments

@geecko86
Copy link
Contributor

geecko86 commented Aug 10, 2024

Describe the bug

Parse error on line 1: 
1.9rem + 1.6svh
----------^
Expecting end of input, "RPAREN", "ADD", "SUB", "MUL", "DIV", got unexpected "UNKNOWN_DIMENSION"

Expected behaviour

It should know those units and output no error.

Steps to reproduce

Use any of the following units in your CSS code:

  • svh
  • lvh
  • dvh
  • svw
  • lvw
  • dvw
  • svmin
  • lvmin
  • dvmin
  • svmax
  • lvmax
  • dvmax

A full list of measure units is available on dev.mozilla.org.

Version

8.1.1

Environment

System:
  OS: macOS 14.5
  CPU: (12) arm64 Apple M2 Pro
  Memory: 3.35 GB / 32.00 GB
  Shell: 5.9 - /bin/zsh

Package details

├─┬ css-loader@6.11.0
│ ├─┬ icss-utils@5.1.0
│ │ └── postcss@8.4.39 deduped
│ ├─┬ postcss-modules-extract-imports@3.1.0
│ │ └── postcss@8.4.39 deduped
│ ├─┬ postcss-modules-local-by-default@4.0.5
│ │ └── postcss@8.4.39 deduped
│ ├─┬ postcss-modules-scope@3.2.0
│ │ └── postcss@8.4.39 deduped
│ ├─┬ postcss-modules-values@4.0.0
│ │ └── postcss@8.4.39 deduped
│ └── postcss@8.4.39 overridden
├─┬ css-minimizer-webpack-plugin@7.0.0
│ └── postcss@8.4.41 overridden
├─┬ cssnano@7.0.5
│ ├─┬ cssnano-preset-default@7.0.5
│ │ ├─┬ css-declaration-sorter@7.2.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ cssnano-utils@5.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-calc@10.0.1
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-colormin@7.0.2
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-convert-values@7.0.3
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-discard-comments@7.0.2
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-discard-duplicates@7.0.1
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-discard-empty@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-discard-overridden@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-merge-longhand@7.0.3
│ │ │ ├── postcss@8.4.41 deduped
│ │ │ └─┬ stylehacks@7.0.3
│ │ │   └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-merge-rules@7.0.3
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-minify-font-values@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-minify-gradients@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-minify-params@7.0.2
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-minify-selectors@7.0.3
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-normalize-charset@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-normalize-display-values@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-normalize-positions@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-normalize-repeat-style@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-normalize-string@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-normalize-timing-functions@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-normalize-unicode@7.0.2
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-normalize-url@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-normalize-whitespace@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-ordered-values@7.0.1
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-reduce-initial@7.0.2
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-reduce-transforms@7.0.0
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-svgo@7.0.1
│ │ │ └── postcss@8.4.41 deduped
│ │ ├─┬ postcss-unique-selectors@7.0.2
│ │ │ └── postcss@8.4.41 deduped
│ │ └── postcss@8.4.41 deduped
│ └── postcss@8.4.41 deduped
├─┬ next@14.2.5
│ └── postcss@8.4.31 overridden
├─┬ postcss-loader@8.1.1
│ └── postcss@8.4.41 deduped
└─┬ styled-components@6.1.12
  └── postcss@8.4.38 overridden

Additional context

This is similar to #199. @ludofischer's #214 should provide a solid basis on how to fix this.

@geecko86 geecko86 added the bug label Aug 10, 2024
@ludofischer
Copy link
Collaborator

Would you like to submit a pull request using the same method as in #214 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants