jquery / jquery/api.jquery.com

Offset/Position of CSS-transformed elements

Open
#401 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
HTML
Stars
325
Forks
260
PR merge metrics
No merged PRs in 30d

Description

The position documentation currently notes:

jQuery does not support getting the position coordinates of hidden elements or accounting for borders, margins, or padding set on the body element.

However, as reported in this 3 year old (!) ticket, there are also several issues in getting .position()/.offset() for elements with CSS transforms. Since it doesn't look like this issue in jQuery will be resolved any time soon, I'd say the documentation should alert users on the problems they may face when using these methods.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the linked position documentation and review the existing note about hidden elements, borders, margins, and padding. Read ticket 8362 for the reported CSS-transform cases, then update the relevant documentation for .position() and .offset() so users are warned about those limitations.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, jquery
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.