Skip to content

Commit

Permalink
refactor(cxl-ui): cxl-section #view-hero breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
anoblet committed Apr 30, 2024
1 parent 777e32c commit 5bc66d2
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions packages/cxl-ui/scss/cxl-section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use "./mixins" as cxl-mixins;

:host {
--figure-height-multiplier: 0.10;
--figure-height-multiplier: 0.1;
--figure-height-factor: calc(var(--figure-height-multiplier) * var(--cxl-content-max-width-wide));

position: relative;
Expand Down Expand Up @@ -87,15 +87,15 @@
background-color: transparent !important; /* stylelint-disable-line declaration-no-important */
}

/**
* Breakpoint comes from WordPress columns block. Using this value
* is the simplest solution for a hero section layout.
*
* @see https://cxlworld.slack.com/archives/C01JABH8AHX/p1714384594016109?thread_ts=1713699357.038669&cid=C01JABH8AHX
*/
@media #{mq.$medium} {
:host(#view-hero) {
@include mixins.wide-background();
@include mixins.extend-background-right();
@include mixins.wide-background-hero();
@include mixins.wide-background-hero-image();
}

:host([theme~="cxl-hero"]) {
:host(#view-hero:not(.view-hero-modern)),
:host([theme~="cxl-hero"]:not(.view-hero-modern)) {
@include mixins.wide-background();
@include mixins.extend-background-right();
@include mixins.wide-background-hero();
Expand Down Expand Up @@ -152,3 +152,13 @@
}
}
}

@media only screen and (min-width: 782px) {
:host(#view-hero.view-hero-modern),
:host([theme~="cxl-hero"].view-hero-modern) {
@include mixins.wide-background();
@include mixins.extend-background-right();
@include mixins.wide-background-hero();
@include mixins.wide-background-hero-image();
}
}

0 comments on commit 5bc66d2

Please sign in to comment.