search

Home  >  Q&A  >  body text

What does it mean for a CSS element edge to be "outside" the scroll box edge?

What is the correct way to interpret the following specification?

"If both element edge A and element edge B are outside the scroll box Edge A and scroll box edge B, do nothing. ”

source:

https://drafts.csswg.org/cssom-view/#dom-scrollologicalposition-nearest:~:text=If element edge A and element edge B are both outside% 20scrolling box edge A and scrolling box edge B

According to this answer, the definition of the above paragraph should remain unchanged if it is already in view . If this is indeed the definition, shouldn't the paragraph be rewritten as "Element edge A is outside scroll box edge A, and element edge B is inside scroll box edge B"? Assume "outer" means below and "inner" means above (using the standard network coordinate system).

The CSS spec has been in this form since 2016, so the spec should be correct. What should be the correct way to interpret the specification?

Thanks!

P粉763748806P粉763748806341 days ago527

reply all(1)I'll reply

  • P粉473363527

    P粉4733635272024-01-17 11:30:39

    "External" means that the element is visible to the user. In contrast, "inside" means that the element is in an area not visible to the user. therefore:

    • "Scroll box edge A outside" = Scroll box edge A below

    • "Scroll box edge B outside" = Scroll box edge B above

    reply
    0
  • Cancelreply