You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
<!doctype html><html><head><title>Some other page</title><style>
div {
padding-left: 120px;
}
</style></head><body><h2>Stuff</h2><style>
.blah {
color: red;
}
</style><h2>Some other stuff</h2>
etc. etc. etc.
</body></html>
Launch Live Preview
Place the cursor anywhere within the head or within the body's <style> block (also works with script blocks, display:none elements, etc.)
Place the cursor on one of the <h2>s
Result:
2 - a collapsed highlight is visible in the upper left
3 - the page gets a horizontal scrollbar, and the right edge of the highlight is off the side of the screen
Expected:
2 - no highlight shown
3 - no scrollbar appears; right side of highlight's border is visible
The text was updated successfully, but these errors were encountered:
I'd imagine there are many variations of this bug -- basically any style that's not set explicitly on our highlight could interfere with it. For example, using margin-left instead causes a similar bug.
I'm pretty sure this has been around since CSS highlighting was introduced though, so it may not be that urgent.
I still see this for elements narrower than the padding size, e.g. <div style="position:absolute; background:red; width:10px; height:10px; padding:0; margin:0"></div>.
Also still repros for if the CSS is margin-left instead of padding-left -- the highlight is the correct width but it's too far to the right (which can again cause scrollbars to appear in some cases).
Start with this content:
<style>
block (also works with script blocks,display:none
elements, etc.)<h2>
sResult:
2 - a collapsed highlight is visible in the upper left
3 - the page gets a horizontal scrollbar, and the right edge of the highlight is off the side of the screen
Expected:
2 - no highlight shown
3 - no scrollbar appears; right side of highlight's border is visible
The text was updated successfully, but these errors were encountered: