question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[terra-demographics-banner] Background image does not fully extend to container

See original GitHub issue

Bug 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. screen shot 2018-11-30 at 3 16 01 pm

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:closed
  • Created 5 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
yuderekyucommented, May 3, 2019

Gah weird. In these instances,background-color is set to transparent, while background-image is set to a gradient. If we set background-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 to padding-box 😦 If this doesn’t have any unwanted side effects, I’ll issue a PR

0reactions
supreethmrcommented, Apr 19, 2019

Could 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 :

Screen Shot 2019-04-19 at 12 13 51 PM

and removing box shadow removes white line from bottom of demographics banner too :

Screen Shot 2019-04-19 at 12 14 48 PM
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found