0

I'd like to detect whether the web page is flowing over the Y axis, aka it is higher than the display and if so, affect styles.

I am looking for a purely CSS solution, or as close to that as possible.

How would I do this?

Lolums
  • 902
  • 3
  • 9
  • 34
  • Possible duplicate of [Determine if an HTML element's content overflows](http://stackoverflow.com/questions/143815/determine-if-an-html-elements-content-overflows) – fnune Jan 28 '16 at 17:25
  • @FaustoNA, I was looking for a purely CSS solution, such as a media query though. As far as I know, this hasn't been asked before. – Lolums Jan 28 '16 at 17:32

1 Answers1

3

I am looking for a purely CSS solution [...] such as a @media query

In standards-based (real-world) web development, @element queries (as opposed to @media queries) are still hypothetical.

If they weren't, your CSS-only solution could be something like:

@element body and (min-height: 101vh) {

[... STYLES HERE...]

}

In the meantime, read:

Element Queries for CSS by Tommy Hodgins (September 30, 2015)

and have a look at

eqCSS on Github


Further Reading: