jquery / jquery/api.jquery.com

Offset does not support "accounting for body margins/borders/padding": unclear what "accounting for" means

Open
#340 4 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

Regarding .offset()

http://api.jquery.com/offset/

"Note: jQuery does not support [...] accounting for borders, margins, or padding set on the body element."

It's not clear what "accounting for" means.
Does it mean that the offset is computed relative to the whole body including the body's margins? Or does it mean the opposite, that it is relative to the inner box of the body?

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

Start with the .offset() documentation at the linked API page and review the quoted note about body borders, margins, and padding. Done means replacing or expanding “accounting for” so the offset’s relationship to the body box is unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
jquery
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.