Override popover's inline transform: translate() function's x-value
See original GitHub issueI have an issue in positioning of popover. When I click on trigger button, it sets the transform: translate(x, y)
using inline CSS. As displayed in the GIF below, y-value is set as required. But, for x-value, it is unnecessarily going inside the left panel. I want to override x-value with 0 and also want to set the popover arrow relevant to the trigger button and not at center.
Angular: 8.2.14
Bootstrap: 4.3.1
ng-bootstrap: 5.3.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
translate() - CSS: Cascading Style Sheets - MDN Web Docs
The translate() CSS function repositions an element in the horizontal and/or vertical directions. Its result is a data type.
Read more >tailwindcss-stimulus-components - npm package - Snyk
data-popover-translate-x="0" defines the css transform-translate X value used in positioning the popover.It can be anything from a percentage to rem units ...
Read more >translate - CSS-Tricks
The translate property works exactly the same as the translate() function that's used with the transform property,
Read more >tailwindcss-stimulus-components - npm
data-popover-translate-y="-128%" defines the css transform-translate Y value used in positioning the popover. It can be anything from a ...
Read more >Tailwindcss-stimulus-components - npm.io
<div class="inline-block text-sm px-4 py-2 leading-none rounded ... data-popover-translate-x="0" defines the css transform-translate X value used in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
First time I see this kind of bug. We need to figure out what’s going on here.
I know it’s not always doable, but I would strongly suggest not to use this pattern! It’s bad in terms of UX and can lead to a lot of nasty side-effects as you can notice.
Did you also try `[container]=“‘body’” as I suggested ? For the nested situation, I think you would be forced to use it.
Hey @Gourav102
Can you tell me which
placement
are you using ? Playing with it might solve your issue. You can also have a look atcontainer
and specify[container]="'body'"
, hence the popover will be displayed on top of your panels.