Installation

  yarn add @chewy/kib-banner-styles

Import

  @use '~@chewy/kib-banner-styles/src/styles' as kib-banner;

This component is deprecated

@mixin base-styles() { ... }@mixin base-styles() { 
  margin-left: auto;
  margin-right: auto;
  max-width: settings.$max-width-small;
  position: relative;
  display: block;
  height: settings.$height;
  overflow: hidden;

  &:focus {
    box-shadow: 0 0 0 settings.$focus-border settings.$focus-border-color;
    outline: none;
  }

  @include media.query(md) {
    max-width: settings.$max-width-medium;
  }

  @include media.query(min-lg) {
    max-width: settings.$max-width-large;
  }
 }
Description

Banner base styles

Parameters

None.

Requires
Used by
@mixin tall-styles($parent) { ... }@mixin tall-styles($parent) { 
  height: settings.$tall-height;
 }
Description

Tall banner styles

Parameters
Parameters
parameter Nameparameter Descriptionparameter Typeparameter Default value
$parent

Class of the parent

String none
Requires
@mixin short-styles($parent) { ... }@mixin short-styles($parent) { 
  height: settings.$short-height-small;

  @include media.query(min-md) {
    height: settings.$short-height;
  }
 }
Description

Short banner styles

Parameters
Parameters
parameter Nameparameter Descriptionparameter Typeparameter Default value
$parent

Class of the parent

String none
Requires
@mixin wrapper($parent) { ... }@mixin wrapper($parent) { 
  @include kib-grid.container-base;
  @include kib-grid.container-vertical-aligned-center;

  height: 100%;
  position: absolute;
  top: 0;
  width: 100%;
 }
Description

Wrapper styles

Parameters
Parameters
parameter Nameparameter Descriptionparameter Typeparameter Default value
$parent

Class of the parent

String none
@mixin wrapper-align-start() { ... }@mixin wrapper-align-start() { 
  @include kib-grid.container-aligned-left;
 }
Description

Wrapper align left styles

Parameters

None.

@mixin wrapper-align-center() { ... }@mixin wrapper-align-center() { 
  @include kib-grid.container-aligned-center;
 }
Description

Wrapper align center styles

Parameters

None.

@mixin wrapper-align-end() { ... }@mixin wrapper-align-end() { 
  // Align left when < small
  @include kib-grid.container-aligned-left;

  @include media.query(min-md) {
    @include kib-grid.container-aligned-right;
  }
 }
Description

Wrapper align right styles

Parameters

None.

@mixin image() { ... }@mixin image() { 
  width: 100%;
  height: 100%;
  object-fit: cover;
 }
Description

Image styles

Parameters

None.

@mixin header-styles($parent) { ... }@mixin header-styles($parent) { 
  margin: 0;
  padding: 0;

  #{$parent}--light & {
    color: settings.$header-color-light-bg;
  }

  #{$parent}--dark & {
    color: settings.$header-color-dark-bg;
  }
 }
Description

Banner header styles

Parameters
Parameters
parameter Nameparameter Descriptionparameter Typeparameter Default value
$parent

Class of the parent

String none
Requires
@mixin subheader-styles($parent) { ... }@mixin subheader-styles($parent) { 
  margin-top: settings.$subheader-margin;
  margin-bottom: 0;

  #{$parent}--light & {
    color: settings.$subheader-color-light-bg;
  }

  #{$parent}--dark & {
    color: settings.$subheader-color-dark-bg;
  }
 }
Description

Banner subheader styles

Parameters
Parameters
parameter Nameparameter Descriptionparameter Typeparameter Default value
$parent

Class of the parent

String none
@mixin actions() { ... }@mixin actions() { 
  margin-top: settings.$actions-margin;
 }
Description

Actions container styles

Parameters

None.

Requires
@mixin text-container($parent) { ... }@mixin text-container($parent) { 
  @include kib-grid.item-base;

  max-height: 100%;
  width: settings.$safe-area-width-small;

  @include media.query(md) {
    width: settings.$safe-area-width-medium;
  }

  @include media.query(min-lg) {
    width: settings.$safe-area-width-large;
  }
 }
Description

Text container styles

Parameters
Parameters
parameter Nameparameter Descriptionparameter Typeparameter Default value
$parent

Class of the parent

String none
@mixin text-container-align-start() { ... }@mixin text-container-align-start() { 
  margin-left: settings.$safe-area-margin-small;

  @include media.query(min-md) {
    margin-left: settings.$safe-area-margin-horizontal;
  }
 }
Description

Text container align left styles

Parameters

None.

@mixin text-container-align-center() { ... }@mixin text-container-align-center() { 
  @include kib-grid.container-aligned-center;

  text-align: center;
 }
Description

Text container align center styles

Parameters

None.

@mixin text-container-align-end() { ... }@mixin text-container-align-end() { 
  margin-left: settings.$safe-area-margin-small;

  @include media.query(min-md) {
    margin-right: settings.$safe-area-margin-horizontal;
  }
 }
Description

Text container align right styles

Parameters

None.

@mixin font-styles-x($parent) { ... }@mixin font-styles-x($parent) { 
  @each $i in map.keys(presets.$styles) {
    &--style-#{$i} {
      #{$parent}__header {
        @include kib-typography.style-as-type(
          map.get(presets.$styles, $i, '$header'),
          map.get(presets.$styles, $i, '$headerAlternate')
        );

        @if map.get(presets.$styles, $i, 'md') {
          @include media.query(min-md) {
            @include kib-typography.style-as-type(
              map.get(presets.$styles, $i, 'md', '$header'),
              map.get(presets.$styles, $i, 'md', '$headerAlternate')
            );
          }
        }
      }

      #{$parent}__subheader {
        @include kib-typography.style-as-type(
          map.get(presets.$styles, $i, '$subheader'),
          map.get(presets.$styles, $i, '$subheaderAlternate')
        );

        @if map.get(presets.$styles, $i, 'md') {
          @include media.query(min-md) {
            @include kib-typography.style-as-type(
              map.get(presets.$styles, $i, 'md', '$subheader'),
              map.get(presets.$styles, $i, 'md', '$subheaderAlternate')
            );
          }
        }
      }
    }
  }
 }
Description

Generate and set font styles classes

Parameters
Parameters
parameter Nameparameter Descriptionparameter Typeparameter Default value
$parent

Class of the parent

String none
Requires
Deprecated!

Kept to avoid breaking change

$height: unit.rem(296px) !default;
Description

Banner height

Type

Number

Deprecated!

Kept to avoid breaking change

$max-width-small: unit.rem(648px) !default;
Description

Default max width banner for small

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$max-width-medium: unit.rem(1040px) !default;
Description

Default max width banner for medium

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$max-width-large: unit.rem(1440px) !default;
Description

Default max width banner

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$safe-area-width-small: unit.rem(208px) !default;
Description

Safe area width for small

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$safe-area-width-medium: unit.rem(316px) !default;
Description

Safe area width for medium

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$safe-area-width-large: unit.rem(440px) !default;
Description

Safe area width for large

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$safe-area-margin-horizontal: unit.rem(52px) !default;
Description

Safe area margin for horizontal edges

Type

Number

Deprecated!

Kept to avoid breaking change

$safe-area-margin-small: spacing.get('s4') !default;
Description

Safe area margin for small

Type

Number

Deprecated!

Kept to avoid breaking change

$tall-height: unit.rem(400px) !default;
Description

Tall Banner height

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$short-height: unit.rem(168px) !default;
Description

Short Banner height

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$short-height-small: unit.rem(128px) !default;
Description

Short Banner height for small

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$subheader-margin: spacing.get('s2') !default;
Description

Subheader margin

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$actions-margin: spacing.get('s4') !default;
Description

Actions margin

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$header-color-light-bg: kib-core.theme-get('next', 'neutral', 800) !default;
Description

Header light bg text color

Type

Color

Used by
Deprecated!

Kept to avoid breaking change

$subheader-color-light-bg: kib-core.theme-get('next', 'neutral', 600) !default;
Description

Subheader light bg text color

Type

Color

Used by
Deprecated!

Kept to avoid breaking change

$header-color-dark-bg: kib-core.theme-get('next', 'neutral', 50) !default;
Description

Header dark bg text color

Type

Color

Used by
Deprecated!

Kept to avoid breaking change

$subheader-color-dark-bg: kib-core.theme-get('next', 'neutral', 100) !default;
Description

Subheader dark bg text color

Type

Color

Used by
Deprecated!

Kept to avoid breaking change

$focus-border: unit.rem(2px);
Description

Focus border size

Type

Number

Used by
Deprecated!

Kept to avoid breaking change

$focus-border-color: kib-core.theme-get('next', 'brand');
Description

Focus border color

Type

Color

Used by