Skip to content

Commit

Permalink
change(item): listing images now provide left and right classes to st…
Browse files Browse the repository at this point in the history
…yle accordingly

- style left and right image to provide margin where needed
  • Loading branch information
ichim-david committed Sep 26, 2022
1 parent a4c7ae5 commit b1507ec
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/blocks/Listing/ItemTemplates.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ const BasicItem = (props) => {
hasDescription={hasDescription}
hasDate={hasDate}
/>
<PreviewImage item={item} style={{ marginLeft: 'auto' }} />
<PreviewImage item={item} className={'right'} />
</>
) : (
<>
<PreviewImage item={item} />
<PreviewImage item={item} className={'left'} />
<BodyText
item={item}
hasDescription={hasDescription}
Expand Down
23 changes: 18 additions & 5 deletions src/less/listing-cards.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ each(range(5), {
border-bottom: 1px solid #bcbec0;
margin-bottom: 32px;

img {
width: auto !important;
max-width: 350px !important;
margin-right: 25px;
}

.slot-head,
.listing-header {
Expand All @@ -102,6 +97,16 @@ each(range(5), {
}

// listing theme styling alongside inverse options
.has--rounded-- .listing-item .image {
width: auto !important;
max-width: 350px !important;
}

.has--rounded--true img {
width: 176px !important;
height: 176px !important;
border-radius: 50%;
}
.has--theme--primary {
--text-color: var(--text-color--primary, #fff);
background-color: var(--background-color, @primaryColor);
Expand Down Expand Up @@ -133,6 +138,14 @@ each(range(5), {
--background-color: #fff;
}

.image.left {
margin-right: 24px;
}

.image.right {
margin-left: 24px;
}

.u-item.listing-item {
padding: var(--theme-padding, 32px 1rem);
margin: 0;
Expand Down

0 comments on commit b1507ec

Please sign in to comment.