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] Disable default styles

See original GitHub issue

There is no easy way to disable all default styles to use CSS styling. I need to pass:

styles={clearIndicator: () => ({}), container: () => ({}), control: () => ({}), ...}

Which is (needless to say) very ugly. Please, provide a prop (i.e. noDefaultStyles) to be able to disable default styles.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:35
  • Comments:15

github_iconTop GitHub Comments

10reactions
Rall3ncommented, Jul 6, 2020

If you don’t want to use an object with all the styles set to an empty function, why not use a Proxy:


const styleProxy = new Proxy({}, {
    get: (target, propKey) => () => {}
});

<Select styles={styleProxy} {...} />

It’s much cleaner than a complete object.

2reactions
Zacariacommented, Jul 6, 2020

Hello guys, don’t stay stucked here. Patch yourself the lib and use https://www.npmjs.com/package/patch-package.

This will be much faster 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove default block styles - Full Site Editing
To learn how to remove default block styles, we have to do a bit of reverse engineering on how block styles are registered...
Read more >
Disabling default styling for button:disabled - Stack Overflow
Is there any way to revert the default styling of button:disabled WIHTOUT using all: unset? I don't know what is being changed because...
Read more >
Disable the default stylesheet - WooCommerce
Disable all stylesheets ... This is the recommended process if you're building a custom theme. Removing the default WooCommerce stylesheet and enqueuing your...
Read more >
Remove Default.css - WordPress.org
How do I set the genesis_portfolio_load_default_styles to false in the theme functions.php file? I would like to disable the default.css file and write...
Read more >
Learning CSS 3 : #3 Remove Default Browser Stylings
Learn how to remove all default browser CSS styles to your webpages. Removing these styles allows you to code CSS without worrying about...
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