Hacker News new | ask | show | jobs
by jiri 601 days ago
It would be nice to have similar feature like this, but to highlight rectangle (instead of text) on the page to focus viewer on some specific area. I send screenshots with highlight quite often.
2 comments

Pretty difficult to specify a rectangular region within reflowable content. It would need to be anchored by element edges, but if the algorithm chooses bad anchor elements or they reflow in weird ways (a layout that goes from horizontal to vertical on small screens, for instance), everything breaks.
you could try and target a div to highlight
or every document on the web may have hierarchical semantic structure, so you can link/refer to a heading in any depth. eg #1 → first chapter; #1.2 → first chapter second heading; #1.2.1 → first chapter second heading first paragraph; #1.2.1.5 → first chapter second heading first paragraph 5th sentence. it won't neccessary be chapter-heading-paragraph-sentence 4-fold structure - just wanted to illustrate in conventional language -, but any level of structure.

…why not put a css-selector in the link?