Skip to content

Commit

Permalink
fix: imaged full width view in edit mode (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini authored Mar 13, 2024
1 parent beb07ad commit 053183b
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions src/theme/ItaliaTheme/Views/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,39 @@ picture.volto-image.responsive img.full-width,
margin-left: -50vw !important;
object-fit: cover;

$toolbar-width: 80px;
$toolbar-collapsed-width: 20px;
$sidebar-width: 375px;
$sidebar-collapsed-width: 20px;

.has-toolbar & {
left: calc(50% + 40px);
width: calc(100vw - 80px) !important;
left: calc(50% + calc($toolbar-width / 2));
width: calc(100vw - $toolbar-width) !important;
}
.has-toolbar.has-sidebar & {
$toolbars-width: calc($toolbar-width + $sidebar-width);
left: calc(50% + calc($toolbars-width / 2));
width: calc(100vw - $toolbars-width) !important;
}
.has-toolbar.has-sidebar-collapsed & {
$toolbars-width: calc($toolbar-width + $sidebar-collapsed-width);
left: calc(50% + calc($toolbars-width / 2));
width: calc(100vw - $toolbars-width) !important;
}

.has-toolbar-collapsed & {
left: calc(50% + 10px);
width: calc(100vw - 20px) !important;
left: calc(50% + calc($toolbar-collapsed-width / 2));
width: calc(100vw - $toolbar-collapsed-width) !important;
}
.has-toolbar-collapsed.has-sidebar & {
$toolbars-width: calc($toolbar-collapsed-width + $sidebar-width);
left: calc(50% + calc($toolbars-width / 2));
width: calc(100vw - $toolbars-width) !important;
}
.has-toolbar-collapsed.has-sidebar-collapsed & {
$toolbars-width: calc($toolbar-collapsed-width + $sidebar-collapsed-width);
left: calc(50% + calc($toolbars-width / 2));
width: calc(100vw - $toolbars-width) !important;
}
}

Expand Down

0 comments on commit 053183b

Please sign in to comment.