Fields Group
Installation
yarn add @chewy/kib-fields-styles
Import
@use '~@chewy/kib-fields-styles/src/kib-input-group/styles' as kib-input-group;
Mixins
root-container
@mixin root-container() { ... }
@mixin root-container() { padding: 0; border: 0; margin: 0; display: flex; flex-direction: column; margin-bottom: spacing.get('s2'); }
label
@mixin label() { ... }
@mixin label() { position: relative; @include typography.style-as(settings.$field-group-legend-typography); display: flex; justify-content: center; align-items: center; margin-bottom: spacing.get('s4'); }
Description
Styles for the label of a container of a collection of related fields.
Parameters
None.
Requires
- [function]
get
- [variable]
field-group-legend-typography
label-with-message
@mixin label-with-message() { ... }
@mixin label-with-message() { margin-bottom: spacing.get('s2'); }
Description
Styles for the label of a container of a collection of related fields.
Parameters
None.
Requires
- [function]
get
help
@mixin help() { ... }
@mixin help() { @include typography.style-as('form-helper'); order: 0; color: settings.$help-text-color; margin-top: 0; margin-bottom: spacing.get('s4'); }
help-bottom
@mixin help-bottom() { ... }
@mixin help-bottom() { order: 3; margin-top: spacing.get('s4'); margin-bottom: 0; }
content
@mixin content() { ... }
@mixin content() { gap: spacing.get('s2'); display: flex; flex-direction: column; }
alert
@mixin alert() { ... }
@mixin alert() { margin-bottom: spacing.get('s3'); }
icon
@mixin icon() { ... }
@mixin icon() { $style: 'form-grouping'; $line-height: typography.get($style, 'line-height'); $font-size: typography.get($style, 'font-size'); display: inline-block; flex-shrink: 0; width: calc(#{$line-height} * #{$font-size}); height: calc(#{$line-height} * #{$font-size}); margin-right: spacing.get('s2'); }
error
@mixin error() { ... }
@mixin error() { order: 5; }
Description
Error wrapper
Parameters
None.
error-message
@mixin error-message() { ... }
@mixin error-message() { @include typography.style-as(settings.$error-message-token-size); display: flex; margin-top: spacing.get('s1'); color: settings.$error-text-color; }
Description
Error message
Parameters
None.
Requires
- [function]
get
- [variable]
error-message-token-size
- [variable]
error-text-color
error-icon
@mixin error-icon() { ... }
@mixin error-icon() { margin-right: spacing.get('s1'); width: settings.$error-icon-size; height: settings.$error-icon-size; color: currentColor; }
group-label
@mixin group-label() { ... }
@mixin group-label() { @include typography.style-as('section-1'); margin-bottom: spacing.get('s4'); }
Description
Styles for the label of a container of a collection of related fields.
Parameters
None.
Requires
- [function]
get
group-messages-above
@mixin group-messages-above() { ... }
@mixin group-messages-above() { @include typography.style-as('caption'); margin-bottom: spacing.get('s4'); }
Description
Styles for the messages be below the header but above the fields.
Parameters
None.
Requires
- [function]
get
group-messages-below
@mixin group-messages-below() { ... }
@mixin group-messages-below() { @include typography.style-as('caption'); margin-top: spacing.get('s4'); }
reset-fieldset-styling
@mixin reset-fieldset-styling() { ... }
@mixin reset-fieldset-styling() { padding: 0; border: 0; margin: 0; }
Description
Removing default styling for fieldsets
Parameters
None.