Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistant Box Sizing on 3d View. #146

Closed
SilentPenguin opened this issue Apr 28, 2023 · 4 comments
Closed

Inconsistant Box Sizing on 3d View. #146

SilentPenguin opened this issue Apr 28, 2023 · 4 comments
Labels
bug Something isn't working tracked This issue is now tracked on our internal backlog

Comments

@SilentPenguin
Copy link

SilentPenguin commented Apr 28, 2023

Recently discovered that some elements will be reported as significantly larger on 3d view than anywhere else in devtools.

For example, on the hertfordshire county council homepage located at https://www.hertfordshire.gov.uk/home.aspx, the 3d view will report elements will extend thousands of pixels across the left margin, while the rest of the devtools does not.

image

However, elsewhere in the devtools, this discrepency is not visible.

image
image

Many thanks.

AB#44485044

@SilentPenguin SilentPenguin added the bug Something isn't working label Apr 28, 2023
@captainbrosset
Copy link
Contributor

Thanks for reporting this bug, and providing so many details! I'll make sure this shows up on our team's radar for investigation.

@captainbrosset captainbrosset added the tracked This issue is now tracked on our internal backlog label May 2, 2023
@captainbrosset
Copy link
Contributor

the 3d view will report elements will extend thousands of pixels across the left margin

Something to keep in mind though: the screenshot you posted shows the Composited Layers tab in the 3D View tool. This tab shows the graphic layers created by the browser's rendering engine, not the DOM elements.

So, it's perfectly normal that these layers don't match the elements on the page. Now, as to why this particular layer extends far to the left, outside the viewport, is probably something worth investigating.

@captainbrosset
Copy link
Contributor

I found what was causing these layers to be so wide. text-indent: -999em; is used in multiple places to visually hide text while showing a corresponding image instead. This is often used for accessibility, so that the text still appears in the source, for screen reader users, but isn't shown visually.
text-indent seems to make the browser engine create wide layers. If you remove all instances of this property, the layers get back to a more logical size.

Does this help?

@SilentPenguin
Copy link
Author

Interesting, I had assumed the reported values were a result of rendering, but the details as to the cause are greatly appreciated. Since it's a government website, text-indent will have certainly been chosen to improve accessability for screen readers.

Thanks for all your help in the matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked This issue is now tracked on our internal backlog
Projects
None yet
Development

No branches or pull requests

2 participants