adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.24k stars 199 forks source link

[Bug]: Overlays break usage of dynamic viewport height #3187

Closed benjamind closed 1 year ago

benjamind commented 1 year ago

Code of conduct

Impacted component(s)

overlay

Expected behavior

Should be able to use dynamic viewport units with overlay system.

Actual behavior

Using the overlay system breaks dynamic viewport units.

Screenshots

No response

What browsers are you seeing the problem in?

No response

How can we reproduce this issue?

  1. Go to '...'
  2. Click on '....'
  3. Scroll to '....'
  4. Check console
  5. See error

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response

jinpae commented 1 year ago

We aren't using dvh and #3188 seems to break our example app because of the missing unit resulting in calc(100% - 0)). Maybe I'm missing something, but is the expectation for apps that don't use dynamic view height to override --swc-body-margins-block to keep the previous behavior? We'd like to fix the issue without updating our example app code if possible.

Westbrook commented 1 year ago

That was originally our intent. There were a couple of reports of the same, and we'll have a reversion of that change in the next release.

Westbrook commented 1 year ago

The code previously in question is no longer leveraged when delivering this functionality. Feel free to open a new issue if you still have trouble in this area.