What does it mean for a CSS element edge to be "outside" the scroll box edge?
P粉763748806
P粉763748806 2024-01-16 23:45:09
0
1
524

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粉763748806
P粉763748806

reply all(1)
P粉473363527

"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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template