Skip to content

Commit

Permalink
Fix: Component background image support (fixes adaptlearning#511) (ad…
Browse files Browse the repository at this point in the history
…aptlearning#512)

* Add missing .background styles

* Add relative positioning to .component__inner to control stacking order
  • Loading branch information
swashbuck authored May 8, 2024
1 parent 1c99a6d commit 1ca97b5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions less/core/component.less
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
.component {
position: relative;

&.has-bg-image > .background {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-repeat: no-repeat;
background-size: cover;
background-position: center top;
}

&__container {
flex-direction: unset;
margin-left: -@component-padding-hoz;
margin-right: -@component-padding-hoz;
}

&__inner {
position: relative;
padding: @component-padding-ver @component-padding-hoz;
}

Expand Down

0 comments on commit 1ca97b5

Please sign in to comment.