Product Flag
Installation
yarn add @chewy/kib-product-styles
Import
@use '~@chewy/kib-product-styles/src/kib-product-flag/styles' as kib-product-flag;
Mixins
flag
@mixin flag() { ... }
@mixin flag() { display: flex; justify-content: center; align-items: center; min-width: settings.$min-width; width: max-content; height: settings.$height; border-radius: 0 0 settings.$border-radius 0; background-color: settings.$background-color; color: settings.$text-color; padding-left: settings.$spacing; padding-right: settings.$spacing; }
Description
Product flag root styles
Parameters
None.
Requires
- [variable]
min-width
- [variable]
height
- [variable]
border-radius
- [variable]
background-color
- [variable]
text-color
- [variable]
spacing
flag-deal
@mixin flag-deal() { ... }
@mixin flag-deal() { background-color: settings.$deal-background-color; color: settings.$deal-text-color; }
Description
Product flag deal styles
Parameters
None.
Requires
- [variable]
deal-background-color
- [variable]
deal-text-color
flag-oos
@mixin flag-oos() { ... }
@mixin flag-oos() { background-color: settings.$flag-background-color; color: settings.$flag-text-color; }
Description
Product flag out of stock styles
Parameters
None.
Requires
- [variable]
flag-background-color
- [variable]
flag-text-color
text
@mixin text() { ... }
@mixin text() { @include typography.style-as('caption'); font-weight: settings.$font-weight; }
Variables
min-width
$min-width: unit.rem(50px) !default;
Description
Default width for product flag
Type
Number
height
$height: kib-core.dimensions-get('large') !default;
Description
Default height for product flag
Type
Number
font-weight
$font-weight: map.get(kib-core.$type-weights, bold) !default;
border-radius
$border-radius: kib-core.dimensions-get('small') !default;
Description
Default font weight styles
Type
Number
background-color
$background-color: color.get('ui-elements', 'flag', 'new', 'primary') !default;
Description
New flag bacgkround color
Type
Number
text-color
$text-color: color.get('ui-elements', 'flag', 'new', 'text') !default;
Description
New flag text color
Type
Number
spacing
$spacing: unit.rem(12px) !default;
Description
Spacing used for padding
Type
Number
deal-background-color
$deal-background-color: color.get('ui-elements', 'flag', 'deal', 'primary') !default;
deal-text-color
$deal-text-color: color.get('ui-elements', 'flag', 'deal', 'text') !default;
flag-background-color
$flag-background-color: kib-core.theme-get('next', 'neutral', 800) !default;
flag-text-color
$flag-text-color: kib-core.theme-get('next', 'neutral', 50) !default;