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.

Weird effect in a <Text> with background color with alpha and padding

See original GitHub issue

Environment

React Native Environment Info: System: OS: macOS 10.14.1 CPU: x64 Intel® Core™ i5-4258U CPU @ 2.40GHz Memory: 39.92 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 9.7.1 - ~/.nvm/versions/node/v9.7.1/bin/node Yarn: 1.2.1 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v9.7.1/bin/npm Watchman: 4.7.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0 Android SDK: Build Tools: 21.1.2, 22.0.1, 23.0.1, 23.0.3, 25.0.0, 25.0.2, 26.0.1, 26.0.2, 27.0.1, 27.0.3, 28.0.2, 28.0.3 API Levels: 17, 18, 19, 22, 23, 25, 26, 27, 28 IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 10.0/10A254a - /usr/bin/xcodebuild npmPackages: react: 16.6.0 => 16.6.0 react-native: ^0.57.3 => 0.57.3 npmGlobalPackages: react-native-cli: 2.0.1

Description

Rendering a <Text /> styled with a background color with alpha and some padding creates a weird effect easily appreciable.

image

Reproducible Demo

https://snack.expo.io/@danielmartin/dGV4dC

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
stale[bot]commented, Jun 6, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

1reaction
Gerhutcommented, Mar 7, 2019

Same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Background color on text, maintain left padding on line wrap
This seems like a fairly simple effect to pull off, but I have been unable to properly match the height of the border...
Read more >
Design Considerations: Text on Images - CSS-Tricks
The trick is using a gradient that doesn't gradient-ize (doesn't fade from color to color, is just solid). .darken { background-image: ...
Read more >
background-color - CSS: Cascading Style Sheets | MDN
The background-color CSS property sets the background color of an element.
Read more >
Learn how to wrap text around objects in InDesign
You can wrap text around the contours of a subject directly in InDesign without having to use Alpha Channels or Photoshop paths. InDesign ......
Read more >
Use CSS ::before and ::after for simple, spicy image overlays
This means we want to introduce an overlay to sit between the image and the text. Sometimes this darkens the background image enough...
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