You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing a React component such as @ampproject/amp-base-carousel, there seems to be no way to get the component's CSS as originally defined in component.jss.js.
So while I get a nicely styled component when using the <amp-base-carousel> custom element, in React I get a completely unstyled carousel with class names generated by JSS, but no actual styles for them.
And amp-base-carousel.css only contains pre-upgrade styles, so that doesn't help either.
disable the transform babel-plugin-transform-jss for npm builds, so that the jss hooks stay in place. This requires the bundle contains the jss package.
keep the transform enabled, but start distributing the associated CSS files. In this case, the pubs need to include the CSS on the page manually, but jss does not need to be part of the bundle
Description
When importing a React component such as
@ampproject/amp-base-carousel
, there seems to be no way to get the component's CSS as originally defined incomponent.jss.js
.So while I get a nicely styled component when using the
<amp-base-carousel>
custom element, in React I get a completely unstyled carousel with class names generated by JSS, but no actual styles for them.And
amp-base-carousel.css
only contains pre-upgrade styles, so that doesn't help either.How do I get the CSS?
Reproduction Steps
I am basically doing this:
Relevant Logs
No response
Browser(s) Affected
No response
OS(s) Affected
No response
Device(s) Affected
No response
AMP Version Affected
2107092322000
The text was updated successfully, but these errors were encountered: