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.

CSS Label color doesnt work

See original GitHub issue

Hello, Im having an issue with changing label color from blue to anything else ,as well as font size.

---RegisterStyle.js
  label: {
    backgroundColor: '#fff',
    paddingHorizontal: 5,
    marginLeft: 13,
    fontSize: 25,
    color: 'red',
  },
---Register.js
 labelStyles={RegisterStyles.label}

What i get

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Bogzzzcommented, May 6, 2021

Thank you , it worked 😃

1reaction
Cniltoncommented, May 5, 2021

So @Bogzzz, actually you need to use:

customLabelStyles={{
          colorBlurred: 'red',
          colorFocused: 'yellow',
}}

This lib handles focus by itself if you do not use the onFocus, onBlur, and isFocused props.

Try that piece of code with the color you want. If you want the same color whether it is focused or not, just pass the same color…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change label color with html and CSS without js?
You can use the CSS 'starts with' attribute selector ( ^= ) to select all labels with a for attribute that starts with...
Read more >
Change the Color of Text Not Working - HTML-CSS
It says my h2 element should be red. I checked the video provided and followed it. Is it not red in my current...
Read more >
accent-color
It works with preferred color schemes ... The accent-color property respects color schemes. If a user has their preferred color scheme set to,...
Read more >
<input type="color"> - HTML: HyperText Markup Language
<input> elements of type color provide a user interface element that lets a user specify a color, either by using a visual color...
Read more >
HTML label tag
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
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