Positioning styles passed to component no longer work
See original GitHub issueHi!
We used to call the component setting position: sticky like this, to make the cookie banner “sticky”:
<CookieConsent style={{ position: 'sticky' }}>
Cookie text!
</CookieConsent>
But now that the component has a wrapping div, this style is set on the inner div instead, and the positioning doesn’t work.
Is there a new configuration we should be looking at to make this work like it used to? Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Enable CSS position style overrides (Can't use absolute ...
The map element always has relative positioning set using the width and height properties of the component.
Read more >TS error using css "position" when passing style object to ...
It's because you are using plan object value as css prop value for emotion directly. Only direct input of css style object into...
Read more >position - CSS: Cascading Style Sheets - MDN Web Docs
The position CSS property sets how an element is positioned in a document ... The offset does not affect the position of any...
Read more >Self Positioning React Components - freeCodeCamp
If you look in componentWillRecieveProps , setStyles and getStyles you'll see reference to how the component is removed and added with display ...
Read more >Absolute, Relative, Fixed Positioning: How Do They Differ?
I am fairly new to web design, and haven't mastered the differences in positioning of elements. I know there is absolute , fixed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Cool, not great with css myself. Glad it fixed it!
@Mastermindzh Thanks, this now works as expected! ✨