Comments (10)
As an alternative, it'd be great to have a way to suppress the style tag injection entirely and instead import the css into a webpack bundle.
from nuka-carousel.
As an alternative, it'd be great to have a way to suppress the style tag injection entirely and instead import the css into a webpack bundle.
Yes. Because, as I found out recently, scoped styles aren't supported in most browsers.
from nuka-carousel.
@sompylasar @BuffaloBuffalo Did either of you find a workaround for this? It's the only thing that's messing up my server-side rendering :(
from nuka-carousel.
@otajor There is no viable workaround for this, only change the library code. But the issue is with the HTML validation by the W3C Validator. How is it messing up the server-side rendering? Could you elaborate please? Maybe it's a different issue you're talking about.
from nuka-carousel.
@sompylasar I was getting the following error on my server-rendered pages (only the ones with carousels on):
uncaught Error: Unable to find element with ID 173
I googled and found this SO answer which said it was caused by invalid HTML structure. So when I saw this thread I figured it was the cause of my bug.
Seems I was right as I seem to have fixed the problem by adding a hacky .replace(/<style/g, '<style scoped')
to my rendered html on the server before serving it. I'll see if I can come up with something less dangerous though!
from nuka-carousel.
@otajor Interesting... Just checked. I don't get this error while still having <style type="text/css" data-reactid="507">.slider-slide > img {width: 100%; display: block;}</style>
rendered by the server-side.
from nuka-carousel.
@otajor Which browser are you observing the error in?
from nuka-carousel.
@sompylasar Chrome 58 - nothing fancy! And nuka-carousel 2.0.4.
from nuka-carousel.
@otajor I'm sticking with 1.2.0 but I don't see any clear difference in this part.
from nuka-carousel.
@otajor Maybe it's React? I use 15.5.4.
from nuka-carousel.
Related Issues (20)
- react18
- Carousel slide transition bouncing while swiping when animation is set to zoom in iOS
- Hiding Next and Previous buttons when First or Last items are active HOT 2
- Are imperative api's such as `slideNext` and `slidePrev` available outside `Carousel` component? HOT 3
- Reset autoplay timer in onDragEnd?
- Can we achieve a crossfade effect between slides when animation="fade"? HOT 1
- add something like vertical mode feature to show items vertically?
- Better infinite scrolling behavior in a controlled carousel?
- Carousel does not work with varying width slides HOT 1
- Module not found: Can't resolve 'nuka-carousel' HOT 1
- Dynamically setting disabled state results in keyboard focus getting lost
- Test accessibility with jest-axe
- Direction of Carousel Sliding HOT 1
- [8.0.0] RangeError: invalid array length HOT 1
- totalPages does not work with image inside a div HOT 1
- Broken Documentation site (https://commerce.nearform.com/open-source/nuka-carousel) HOT 2
- Prop for animation speed HOT 2
- Map render a unique slide in the carousel
- Mobile (tested on IOS) Touch event captured and Slide direction
- Restore slidesToShow and related props
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuka-carousel.