// deprecated
// 理论上每个 html element 都应该继承这个
// 实际场景可根据需求决定是否继承这个 mixin
.extendBase() {
  box-sizing: border-box;
  transition: @icecream-transitions;
  font-family: @icecream-font-family;
}

// 代替 `.extendBase`，后续的重置应该用这个 mixin
// 从 `.extendBase` 迁移到这个 mixin 注意检查正确性
.extendBaseEnhanced() {
  margin: 0;
  padding: 0;
  // 组件的尺寸不依赖环境的 font-size Link 组件除外
  .setFontSize(@icecream-font-size-main);
  box-sizing: border-box;
  transition: @icecream-transitions;
  font-family: @icecream-font-family;
  scroll-behavior: smooth;
}

// 无限旋转动画
.animateSpin() {
  @name: ~'@{icecream-prefix}-spin';

  animation: @name 1s linear infinite;

  @keyframes @name {
    from {
      transform-origin: 50% 50%;
      transform: rotate(0);
    }
    to {
      transform-origin: 50% 50%;
      transform: rotate(360deg);
    }
  }
}

.textEllipsis() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// （用于 input、select 等控件中的）操作图标，可点击
.inputOperationIcon() {
  cursor: pointer;

  color: @icecream-color-grey-6;
  &:hover {
    color: @icecream-color-grey-7;
  }
}

.setFontSize(@font-size) {
  font-size: @font-size;
  line-height: getIcecreamLineHeight(@font-size);
}
