[terra-demographics-banner] Background image does not fully extend to container
See original GitHub issueBug Report
In some cases if a background image is set on demographics-banner
, it does not extend to all borders. A 1 pixel line is visible on either the bottom or right side, depending on the size of the browser window.
Zoom in on the below screenshot. The demographics-banner
background image is set to a linear gradient. Notice that the white doc template background bleeds through on the bottom of the demographics-banner
.
Could be a browser rounding issue: https://stackoverflow.com/questions/28832046/background-size-leaves-a-one-pixel-line-to-the-right-of-my-browser
Environment
- Browser Name and Version: Chrome
- Operating System and version (desktop or mobile): Mac High Sierra on desktop
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
CSS Image size, how to fill, but not stretch? - Stack Overflow
Another solution is to put the image in a container with the desired width and height. Using this method you would not have...
Read more >Resizing background images with background-size - CSS
The background-size CSS property lets you resize the background image of an element, overriding the default behavior of tiling the image at ...
Read more >How To Solve The Biggest Problems With Bootstrap ...
The Bootstrap background image property sets one or more background images for an element. The background of an element is the total size...
Read more >Use Background Images in Your Views - Tableau Help
Background images are images that you display underneath your data in order to add more context to the marks in the view. A...
Read more >Banners (enemy) - Terraria Wiki - Fandom
Enemy banners are functional furniture items that can be placed on the underside of blocks. They are dropped by most enemies and a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Gah weird. In these instances,
background-color
is set to transparent, whilebackground-image
is set to a gradient. If we setbackground-color
to a non transparent value the white line disappears. I have no idea why.I’m tempted to say inside the clinical theme, we set
--terra-demographics-banner-background-color
and--terra-demographics-banner-deceased-background-color
to solid colors*Edit If we set
background-clip: border-box
, the issue disappears. I don’t remember why I set that topadding-box
😦 If this doesn’t have any unwanted side effects, I’ll issue a PRCould this be a box-shadow render error of browser.
Since white line at Bottom of banner appears only with terra-clinical-theme. Clinical theme adds box shadow to banner which is not being added in terra-core theme so I am assuming this could be a box shadow rendering issue of browser’s.
I am not sure that this issue is caused by having box shadow but I have this below example where box shadow property is applied and 1px white line at the bottom of banner can be seen as shown below :
and removing box shadow removes white line from bottom of demographics banner too :