>
Why do you need style information for off-screen content in a text editor? It's not like you're going to have JS running that can query the computed style at any point. If it's for scrollbars then you can probably just use an approximation, or compute metrics without actually computing full style information.
To know how high the editor is, for scroll bars, Sublime Text-style minimaps, etc.
Computing metrics basically requires computing full style information. Doing cascading for any property isn't much more expensive than doing cascading for all properties.
> Based on my limited experience, most text editors don't have correct information for off-screen content anyways, as they tend to do lazy syntax highlighting, which you can sometimes see adjusting while you scroll.
Sure. The way to do that in the Web platform is to do what Atom is doing here: adjust styles only when elements come into view. IntersectionObserver can be useful for that.