Skip to content

Commit

Permalink
fix some more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakshmishri committed Sep 6, 2023
1 parent 4bf5e00 commit 2dd3919
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions blocks/v2-images-grid/v2-images-grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@
text-align: center;
position: absolute;
bottom: 10px;
padding: 9px;
padding: 9px 9px 7px;
color: var(--c-primary-white);
background-color: var(--c-secondary-graphite);
right: 10px;
text-transform: uppercase;
font: var(--body-2-font-size)/16px var(--ff-body);
font: 12px/16px var(--ff-body-bold);
letter-spacing: 1.92px;
}
}
9 changes: 2 additions & 7 deletions blocks/v2-images-grid/v2-images-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default function decorate(block) {
// give format to the first 4 list items
[...ul.children].forEach((li, idx) => {
if (idx < 4) {
const section = createElement('div');
const captionEle = getAllElWithChildren(li.querySelectorAll('p'), 'picture', true)[0];
let picture = li.querySelector('picture');

Expand All @@ -37,13 +36,9 @@ export default function decorate(block) {
picture.append(figCaption);
}

// Move image outside of the wrapper
section.prepend(picture);
li.innerHTML = '';

// Remove caption element
captionEle.remove();

li.append(section);
li.append(picture);
return;
}
li.remove();
Expand Down

0 comments on commit 2dd3919

Please sign in to comment.