Skip to content

Commit

Permalink
Remove background-color from image to allow opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnito committed Feb 28, 2023
1 parent ce892fd commit 1489ff8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

.media {
width: 100%;
background-color: var(--matterColorNegative); /* Loading state color for the images */
border-radius: 8px;
margin-bottom: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/PageBuilder/Primitives/Image/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const FieldImage = React.forwardRef((props, ref) => {
const firstImageVariant = variants[variantNames[0]];
const { width: aspectWidth, height: aspectHeight } = firstImageVariant || {};

const classes = classNames(rootClassName || css.markdownImage, className);
const classes = classNames(rootClassName || css.fieldImage, className);
return (
<AspectRatioWrapper className={classes} width={aspectWidth || 1} height={aspectHeight || 1}>
<ResponsiveImage
Expand Down
6 changes: 5 additions & 1 deletion src/containers/PageBuilder/Primitives/Image/Image.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.markdownImage {
width: 100%;
/**
* Note: markdown images might be too small for filling the space.
*/
width: auto;
max-width: 100%;
border-radius: 8px;
object-fit: cover;
}
Expand Down

0 comments on commit 1489ff8

Please sign in to comment.