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.

Styles overwritten on application-owned div elements

See original GitHub issue

demo: https://codesandbox.io/s/7yvq357xz6

for the given markup:

<Slider {...settings}>
  <div style={slideStyle}>
    <img style={imageStyle} src="http://placekitten.com/g/400/200" />
  </div>
  ...
</Slider>

{slideStyle} will be ignored / overwritten.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:16
  • Comments:28 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
mihaukocommented, Apr 13, 2018

Are those inline styles connected to additional div wrapper like on screenshot? What is the purpose of this div?

selection_0961

It can be also visible on @nihlton demo.

I have this structure on 0.23.1 version

10reactions
akirancommented, Aug 12, 2019

Fixed in react-slick@0.25.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Override CSS Styles - W3docs
Here, the Class selector overrode the ID selector because it was the last used one. An ID selector only takes precedence over a...
Read more >
How do I prevent my style from being overridden another style ...
Consider we want to style " z " element. But our style is overridden by " y z " selector (without quotes).
Read more >
Forums - CSS - Why is a style overridden?
style in DevTools refers to inline styles applied to that element. Inline style will take precedence over any style you apply via style...
Read more >
Techniques to prevent CSS override by base application
Styles applied in this way can only be overridden by base application with: !important tag; Inline styles. Create and use custom elements.
Read more >
Dynamic style - manipulating CSS with JavaScript - W3C Wiki
For example, style.color returns the colour that element has set on it. By calling element.style.color = "red"; you can apply the ...
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