davglass/yui3 — comment on commit 7320cc1a23bd0ed4fce4bc6eac8be201f09dfbce
File:  line 0
By lsmith:

The edge case I'm thinking about is when `div { /* some unlikely style involving something visual/dimensions/padding */ }` when a css module is *not* on the page. The test would affect the layout of the rest of the page because it is still in the flow of the body (assuming it is tag souped into the body). Having position: absolute !important (etc) declared inline will protect against failed tests triggering more work than needed.

How is offsetHeight not reliable? I'm curious, mostly. I figure the getCS approach is fine, and the overall approach is good. FWIW, the test element would also need `height: 5px !important` as well to protect against similar unlikely styling. There's also the approach to include text in the test element, but that would similarly need `height: auto !important`.

Anyway, academic discussion, but I still press for the test element being positioned and hidden.