Skip to content

Commit

Permalink
Merge pull request #230 from hlxsites/bug/zm-impt
Browse files Browse the repository at this point in the history
fixed font and padding with important
  • Loading branch information
pardeepgera23 authored Dec 8, 2023
2 parents a18aafb + 76d1d76 commit 3ebf7c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 8 additions & 8 deletions blocks/model-image/model-image.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,20 @@
outline: 0
}

#cboxClose {
#cboxOverlay #colorbox #cboxClose {
position: absolute;
top: 0;
right: 0;
display: block;
width: 32px;
height: 32px;
padding: 0;
font-size: 28px;
padding: 0 !important;
font-size: 28px !important;
font-family: Arial,Helvetica;
line-height: 32px;
background-color: #ec8f2d;
color: #fff;
border-radius: 0;
border-radius: 0 !important;
border: 0;
margin: 0;
overflow: visible;
Expand All @@ -90,21 +90,21 @@
background-color: #00000050 !important
}

.model-image .icon-search {
#cboxOverlay #colorbox .button.icon-search {
position: absolute;
bottom: 0;
right: 0;
display: block;
width: 32px;
height: 32px;
padding: 0;
padding: 0 !important;
margin: 0;
border: 0;
font-size: 16px;
font-size: 16px !important;
line-height: 32px;
background-color: #ec8f2d;
color: #fff;
border-radius: 0
border-radius: 0 !important;
}

.model-image .icon-search:hover {
Expand Down
4 changes: 4 additions & 0 deletions blocks/model-image/model-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default function decorate(block) {
display: 'none',
});
addStyles(pictureTagForZoom.querySelector('img'), { 'max-width': '100%' });
addStyles(cboxWrapperSecondChildCboxbtnIconSearch, { display: 'block' });
});
overlayDiv.addEventListener('click', (e) => {
e.stopPropagation();
Expand All @@ -104,13 +105,16 @@ export default function decorate(block) {
display: 'none',
});
addStyles(pictureTagForZoom.querySelector('img'), { 'max-width': '100%' });
addStyles(cboxWrapperSecondChildCboxbtnIconSearch, { display: 'block' });
});
pictureTagForZoom.addEventListener('click', (e) => {
e.stopPropagation();
addStyles(pictureTagForZoom.querySelector('img'), { 'max-width': '200%' });
addStyles(cboxWrapperSecondChildCboxbtnIconSearch, { display: 'none' });
});
block.querySelector('.button.icon-search').addEventListener('click', (e) => {
e.stopPropagation();
addStyles(pictureTagForZoom.querySelector('img'), { 'max-width': '200%' });
addStyles(cboxWrapperSecondChildCboxbtnIconSearch, { display: 'none' });
});
}

0 comments on commit 3ebf7c6

Please sign in to comment.