diff --git a/packages/styles/scss/components/leadspace/_leadspace.scss b/packages/styles/scss/components/leadspace/_leadspace.scss index 149891e1157..019d34e21ff 100644 --- a/packages/styles/scss/components/leadspace/_leadspace.scss +++ b/packages/styles/scss/components/leadspace/_leadspace.scss @@ -95,7 +95,7 @@ $btn-min-width: 26; :host(#{$c4d-prefix}-leadspace) { display: block; position: relative; - + &::before { content: ''; opacity: 0; @@ -108,18 +108,18 @@ $btn-min-width: 26; animation: loadingAnimation 2000ms ease infinite; transition: all 800ms cubic-bezier(0.4, 0.14, 0.3, 1); } - + &[loading] { &::before { z-index: 5; opacity: 1; } } - + ::slotted(#{$c4d-prefix}-background-media) { height: auto; aspect-ratio: 4 / 3; /* stylelint-disable-line property-no-unknown */ - + @include breakpoint(lg) { position: absolute; inset: 0; @@ -163,7 +163,6 @@ $btn-min-width: 26; .#{$prefix}--buttongroup, ::slotted(#{$c4d-prefix}-button-group), ::slotted(#{$c4d-prefix}-leadspace-block-cta) { - @include breakpoint(md) { display: grid; grid-template-columns: repeat( @@ -228,7 +227,6 @@ $btn-min-width: 26; } .#{$prefix}--leadspace__action { - @include breakpoint(md) { display: inline-block; } @@ -566,8 +564,8 @@ $btn-min-width: 26; height: rem(528px); } } - } - + } + :host(#{$c4d-prefix}-leadspace)[size='medium'] { @include breakpoint(lg) { .#{$prefix}--leadspace__overlay { @@ -577,7 +575,6 @@ $btn-min-width: 26; } :host(#{$c4d-prefix}-leadspace)[size='short'] { - @include breakpoint(lg) { .#{$prefix}--leadspace__overlay { height: rem(288px); @@ -631,7 +628,6 @@ $btn-min-width: 26; :host(#{$c4d-prefix}-leadspace)[size='medium'] { ::slotted(#{$c4d-prefix}-leadspace-heading) { - @include breakpoint(lg) { margin-bottom: $spacing-10; } @@ -645,7 +641,6 @@ $btn-min-width: 26; } :host(#{$c4d-prefix}-leadspace)[size='super'] { - .#{$prefix}--leadspace__section { @include breakpoint(lg) { min-height: carbon--mini-units(80); diff --git a/packages/web-components/src/components/leadspace/__stories__/leadspace.stories.ts b/packages/web-components/src/components/leadspace/__stories__/leadspace.stories.ts index b0a9ed9b914..11278559b5d 100644 --- a/packages/web-components/src/components/leadspace/__stories__/leadspace.stories.ts +++ b/packages/web-components/src/components/leadspace/__stories__/leadspace.stories.ts @@ -64,17 +64,21 @@ const navigationWithBreadcrumbs = html` `; export const Super = (args) => { - const { title, copy, buttons, navElements, highlight, typeStyle } = args?.LeadSpace ?? {}; + const { title, copy, buttons, navElements, highlight, typeStyle } = + args?.LeadSpace ?? {}; return html` ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} ${ifDefined(copy)} ${buttons.map((elem) => { return html` - ${elem.copy} { copy, buttons, navElements, - highlight, - typeStyle } = args?.LeadSpace ?? {}; + highlight, + typeStyle, + } = args?.LeadSpace ?? {}; const image = defaultSrc || leadspaceImg; return html` { default-src="${ifDefined(defaultSrc)}"> ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} ${ifDefined(copy)} ${buttons.map((elem) => { return html` - ${elem.copy} { copy, buttons, navElements, - highlight, typeStyle } = args?.LeadSpace ?? {}; + highlight, + typeStyle, + } = args?.LeadSpace ?? {}; return html` { default-src="${ifDefined(defaultSrc)}"> ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} ${ifDefined(copy)} ${buttons.map((elem) => { return html` - ${elem.copy} { - const { title, copy, buttons, navElements, highlight, typeStyle } = args?.LeadSpace ?? {}; + const { title, copy, buttons, navElements, highlight, typeStyle } = + args?.LeadSpace ?? {}; return html` ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} ${ifDefined(copy)} ${buttons.map((elem) => { return html` - ${elem.copy} { copy, buttons, navElements, - highlight, typeStyle } = args?.LeadSpace ?? {}; + highlight, + typeStyle, + } = args?.LeadSpace ?? {}; const image = defaultSrc || leadspaceImg; return html` { default-src="${ifDefined(defaultSrc)}"> ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} ${ifDefined(copy)} ${buttons.map((elem) => { return html` - ${elem.copy} { copy, buttons, navElements, - highlight, typeStyle } = args?.LeadSpace ?? {}; + highlight, + typeStyle, + } = args?.LeadSpace ?? {}; return html` { default-src="${ifDefined(defaultSrc)}"> ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} ${ifDefined(copy)} ${buttons.map((elem) => { return html` - ${elem.copy} { - const { title, copy, buttons, navElements, highlight, typeStyle } = args?.LeadSpace ?? {}; + const { title, copy, buttons, navElements, highlight, typeStyle } = + args?.LeadSpace ?? {}; return html` ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} ${ifDefined(copy)} ${buttons.map((elem) => { return html` - ${elem.copy} { copy, buttons, navElements, - highlight, typeStyle } = args?.LeadSpace ?? {}; + highlight, + typeStyle, + } = args?.LeadSpace ?? {}; const image = defaultSrc || leadspaceImg; return html` { default-src="${ifDefined(defaultSrc)}"> ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} ${ifDefined(copy)} ${buttons.map((elem) => { return html` - ${elem.copy} { copy, buttons, navElements, - highlight, typeStyle } = args?.LeadSpace ?? {}; + highlight, + typeStyle, + } = args?.LeadSpace ?? {}; return html` { default-src="${ifDefined(defaultSrc)}"> ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} ${ifDefined(copy)} ${buttons.map((elem) => { return html` - ${elem.copy} { - const { title, navElements, highlight, typeStyle } = args?.LeadSpace ?? {}; + const { title, navElements, highlight, typeStyle } = args?.LeadSpace ?? {}; return html` ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} `; }; @@ -465,8 +508,15 @@ Short.story = { }; export const ShortWithImage = (args) => { - const { alt, defaultSrc, gradientStyleScheme, title, navElements, highlight, typeStyle } = - args?.LeadSpace ?? {}; + const { + alt, + defaultSrc, + gradientStyleScheme, + title, + navElements, + highlight, + typeStyle, + } = args?.LeadSpace ?? {}; const image = defaultSrc || leadspaceImg; return html` { default-src="${ifDefined(defaultSrc)}"> ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} { - const { alt, defaultSrc, gradientStyleScheme, title, navElements, highlight, typeStyle } = - args?.LeadSpace ?? {}; + const { + alt, + defaultSrc, + gradientStyleScheme, + title, + navElements, + highlight, + typeStyle, + } = args?.LeadSpace ?? {}; return html` { default-src="${ifDefined(defaultSrc)}"> ${navElements === navigationOptions[0] ? navigationWithTagGroup : ``} ${navElements === navigationOptions[1] ? navigationWithBreadcrumbs : ``} - ${ifDefined(title)} + ${ifDefined(title)} - `; + return html` `; } static get stableSelector() { diff --git a/packages/web-components/src/components/leadspace/leadspace.scss b/packages/web-components/src/components/leadspace/leadspace.scss index b69267f6c6e..d3da3b0c2a0 100644 --- a/packages/web-components/src/components/leadspace/leadspace.scss +++ b/packages/web-components/src/components/leadspace/leadspace.scss @@ -6,4 +6,4 @@ // @use '../../../../styles/scss/components/leadspace'; -@use '../../../../carbon-web-components/src/components/breadcrumb/breadcrumb'; \ No newline at end of file +@use '../../../../carbon-web-components/src/components/breadcrumb/breadcrumb'; diff --git a/packages/web-components/src/components/leadspace/leadspace.ts b/packages/web-components/src/components/leadspace/leadspace.ts index 14f2b69605a..85cc8f23fef 100644 --- a/packages/web-components/src/components/leadspace/leadspace.ts +++ b/packages/web-components/src/components/leadspace/leadspace.ts @@ -150,8 +150,11 @@ class C4DLeadSpace extends StableSelectorMixin(LitElement) { } }); - if(this.size === 'short') { - this.querySelector('c4d-leadspace-heading')?.setAttribute('type-style', 'fluid-heading-05'); + if (this.size === 'short') { + this.querySelector('c4d-leadspace-heading')?.setAttribute( + 'type-style', + 'fluid-heading-05' + ); } }