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
Should flipping flip the offsets too? #106
Comments
👍 |
I agree that tether should handle the flipping of the offset values when the tethered object flips. Current solution is to avoid using tether offset and use CSS instead. // LESSCSS
@element-offset: 10px;
.element {
&.tether-target-attached-top {
&.tether-element-attached-bottom {
margin-top: -@element-offset;
}
}
&.tether-target-attached-bottom {
&.tether-element-attached-top {
margin-top: @element-offset;
}
}
} |
A possible solution without breaking current implementations would be to add |
👍 |
1 similar comment
👍 |
Its also possible to update the Tether offset on the fly and reposition manually. Checking the classes you can now where is positioned, top or bottom, and set the offset as negative or positive accordingly. A more efficient way would be appreacited, though. Wondering why there is no interest in mantaining this project. |
@woble CSS solution: problem is here that tether triggers the flip wrong and the element is cropped before it flips. |
CSS might be good, but I have no idea how to handle case when we have percentage value like this: |
In this configuration, what should happen to the offset if the tether is flipped?
Here's a CodePen demonstrating the issue. I would expect the vertical offset to flip as well, but instead it remains constant:
Flipping the offset would be useful if the offset is used to allow for an arrow - the arrow will be flipped, and it needs the space provided by the offset:
The text was updated successfully, but these errors were encountered: