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.

[V2] There's no way to change the seudo class with style object?

See original GitHub issue

When we try to add custom style with style object as below:

const customStyles = {
  menu: (provided, state) => ({
    width: auto
  })
}

This makes sense when you want to change css properties, but we cannot change seudo class this way, for example changing the scrollbar or hover effect.

Is this a bug or a feature? I’m not sure, but it would be really great if someone can help find out.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
spedycommented, May 29, 2019

Example:

multiValueRemove: (provided) => ({
    ...provided,
    "&:hover": {
        backgroundColor: "transparent",
        color: "white"
    }
}),
0reactions
bladeycommented, May 29, 2020

Hello -

In an effort to sustain the react-select project going forward, we’re closing old issues.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version.

If you aren’t using the latest version of react-select please consider upgrading to see if it resolves any issues you’re having.

However, if you feel this issue is still relevant and you’d like us to review it - please leave a comment and we’ll do our best to get back to you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change a Pseudo-class style through JavaScript?
CSS pseudo-classes and pseudo-elements are not part of the DOM, and thus you cannot modify their style properties directly using JavaScript.
Read more >
Pseudo-classes and pseudo-elements - MDN Web Docs
We then use CSS to style it just like any element. You can play around with the CSS and change how it looks...
Read more >
WebD2: Pseudo-class Selectors in CSS
CSS pseudo-classes are used to add styles to selectors, but only when ... on a web page with a mouse, it's helpful if...
Read more >
Meet the Pseudo Class Selectors | CSS-Tricks
::selection – Allows the changing of style of selected text. It was drafted for CSS Selectors Level 3 but removed before it reached...
Read more >
JavaFX CSS Reference Guide - Oracle Help Center
CSS styles are applied to nodes in the JavaFX scene graph in a way similar ... Styles are reapplied when there is 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