Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<style>
div::first-line {
color: yellow:
}
.foo span {
display: none;
}
.foo::first-line {
color: red;
}
</style>
<div><span>Yo, I'm a first-line<span> really</span></span>
<script>
document.body.offsetTop;
document.querySelector('div').classList.add('foo');
</script>