question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

computeStyle dependant on current placement

See original GitHub issue

Is it possible somehow to have computeStyle.x to be top when popper is going to be placed on top, and bottom, when actual placement is bottom?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
FezVrastacommented, Jan 17, 2020

Maybe it’s just me, but I don’t think I’d ever need this to be a configurable property, just something that’s automatically set depending on the current placement.

Yeah the plan for v2 is to support it in an automatic manner.

2reactions
FezVrastacommented, Jan 17, 2020

Hey, it looks like this was actually already implemented in v1 😂

https://popper.js.org/docs/v1/#computestylex https://popper.js.org/docs/v1/#computestyley

We lost support for it on v2 though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

computeStyle dependant on current placement #571 - GitHub
Say popper is placed at top , you decrease popper element height, and poper's top will stay at is the current position, but...
Read more >
how to compute style based on property or attribute values ...
I want to style the element's background and text colour depending on whether dardmode attribute is set or not. In my LitElement class, ......
Read more >
Window.getComputedStyle() - Web APIs | MDN
The Window.getComputedStyle() method returns an object containing the values of all CSS properties of an element, after applying active ...
Read more >
Computed Values: More Than Meets the Eye | CSS-Tricks
A button (1) is the current selected element in DevTools (2). ... values shown are the same as returned by the getComputedStyle() function....
Read more >
ResizeObserver: it's like document.onresize for elements
If you needed the new dimensions of an element after a resize, you had to call getBoundingClientRect() or getComputedStyle() , which can ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found