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.

Text components do not inherit boderStyle on iOS

See original GitHub issue

Environment

 React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
      Memory: 523.12 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.11.0 - /usr/local/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.4 => 0.57.4
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

On iOS,Text components do not inherit the boderStyle despite inheriting View’s style props.

Here’s what it looks like in iOS and Android: iosandroidborderstyle

Reproducible Demo

Expo Snack: https://snack.expo.io/SkE6cNfT7 Repo: https://github.com/irasantiago/rn-android-border-style

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kelsetcommented, Mar 19, 2019

Hello there 👋

I’ve tested your code locally on 0.59 and I am having a hard time actually understanding what precise issue you are facing: it would be easier for me to understand if you could write a bit more so that we can realise if this is a bug.

In that sense, I dig a bit in the codebase and found this comment on the limitation of borders:

// Currently, the dashed / dotted implementation only supports a single colour +
// single width, as that's currently required and supported on Android.
//
// Supporting individual widths + colours on each side is possible by modifying
// the current implementation. The idea is that we will draw four different lines
// and clip appropriately for each side (might require adjustment of phase so that
// they line up but even browsers don't do a good job at that).

here:

https://github.com/facebook/react-native/blob/7a6fe0cda0a1089c1c82fdd5f7f2db940f70feae/React/Views/RCTBorderDrawing.m

which seems to be related to the issue you are describing. Let me know 🤗

0reactions
stale[bot]commented, Nov 7, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

border-style - CSS: Cascading Style Sheets - MDN Web Docs
The border-style shorthand CSS property sets the line style for all four sides of an element's border.
Read more >
How do I prevent CSS inheritance? - Stack Overflow
Short answer is: No, it's not possible to prevent CSS inheritance. ... The border style has been applied only to the direct children...
Read more >
Understanding CSS Inheritance (Inherit, Initial, Unset, and ...
However, this is not the case with the border styles. So which other properties are inherited? A Complete List of Inherited Properties.
Read more >
border-radius - CSS-Tricks
Initial value: 0; Applies to: all elements; Inherited: no ... you want the border-radius to be directly correlated with the element's width.
Read more >
Reboot - Bootstrap
For example, we reboot some <table> styles for a simpler baseline and ... This is inherited later by some form elements to prevent...
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