-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add class as a standalone prop as opposed to inside of attributes #145
Comments
My front dev is a little rusty & you seem to be way more knowledgeable. Code:
Style: |
Hey sorry for the late reply @KevinFocke , I've been away! I hope you did manage to fix this issue but just in case you didn't or for any others, I believe your attributes should be pointing to picture, not container. The container definition is for the BackroundPicture component I've made the same mistake many times as well... Like this:
|
@LushawnDev Thanks for the help. Unfortunately, it's not fixed yet. I think it messes up the grid somehow. Code before:
Code after
|
@KevinFocke try this out, I use these as a universal reset when working with astro-imagetools and it usually fixes those kinds of issues! I believe it's because of the inline styling that it applies to picture and img elements. Give it a go and let me know if it fixes your problem.
|
I don't know if this will be possible for both the
<Picture>
and<Image>
components, but for the<BackgroundImage>
component, I wonder if it would be possible to be able to pass a class name to the container as direct a prop instead of through the attributes prop? This would allow the scoped CSS to still work, as described in the docs here.This would be great for your other components too, although I can understand how that may be tricky for example for
<Picture>
, would you make the class attach to the image or picture tags...Here is the current and desired syntax to clarify:
Current:
Desired:
Thanks for your work on a great Astro integration so far!
The text was updated successfully, but these errors were encountered: