//
// Copyright IBM Corp. 2019, 2021
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//

@use '@carbon/styles/scss/config' as *;
@use '@carbon/styles/scss/spacing' as *;
@use '../../globals/vars' as *;
@use '../../globals/imports' as *;

@mixin tag-group {
  :host(#{$c4d-prefix}-tag-group) {
    display: flex;
    flex-flow: row wrap;
    gap: $spacing-03;

    ::slotted(#{$c4d-prefix}-tag-link) {
      display: flex;
    }

    // !important necessary for React wrappers since Carbon React styles override margin without this
    ::slotted(.#{$prefix}--tag),
    ::slotted(#{$prefix}-filter-tag),
    ::slotted(#{$prefix}-tag) {
      // stylelint-disable-next-line declaration-no-important
      margin: 0 !important;
    }
  }
}
