Skip to content

The open alternative to Salesforce, designed for AI.

1.2 KB
Raw Blame
@use '../../../styles/abstracts/mixins' as *;

@mixin card-owner {
  box-sizing: border-box;
  color: inherit;
  display: block;
  font-family: inherit;
  line-height: inherit;
  margin: 0;
  padding: 0;
  text-align: inherit;
  text-decoration: none;

  &:is(button, a[href], [role='button'], [role='link']) {
    @include focus-ring;

    cursor: pointer;

    &:focus-visible {
      outline-offset: -2px;
    }

    &:not(:disabled, [aria-disabled='true'], [data-disabled]) {
      @include hover-capable {
        &:hover {
          --card-section-background-color: transparent;

          background-color: var(--t-background-transparent-light);
        }
      }
    }

    &:is(:disabled, [aria-disabled='true'], [data-disabled]) {
      cursor: not-allowed;
      opacity: 0.5;
    }
  }

  &:has(> [data-card-action]) {
    cursor: default;
    isolation: isolate;
    position: relative;
  }

  &:has(
    > [data-card-action]:not(:disabled, [aria-disabled='true'], [data-disabled])
  ) {
    cursor: pointer;

    @include hover-capable {
      &:hover:not(:has(:hover > [data-card-action])) {
        --card-section-background-color: transparent;

        background-color: var(--t-background-transparent-light);
      }
    }
  }
}