wagtail 4.1.5 覆盖 _chooser.scss 类

问题描述 投票:0回答:0

如何覆盖 wagtail scss

https://github.com/wagtail/wagtail/blob/main/client/scss/components/_chooser.scss#L71

我想给 .chooser__actions 添加一个类

.chooser__actions {
  display: flex;
  gap: theme('spacing.[1.5]');

  .button {
    // Subdued border as there can be a lot of chooser action buttons on a page.
    border-color: theme('colors.border-button-small-outline-default');
  }

  // Hiding for devices capable of hover states only,
  // with opacity only so keyboard focus can move to the first interactive element to reveal it.
  @media (hover: hover) {
    opacity: 0;

    // Ensure the hovering over the comment icon will still show chooser actions.
    // Uses a form-field class as well as widget classes, as all core and custom choosers use different widgets.
    :is(.w-field--model_choice_field, .w-field--admin_task_chooser, .w-field--admin_page_chooser, .w-field--document_chooser_widget, .w-field--admin_image_chooser, .w-field--admin_snippet_chooser):is(:hover, :focus-within)
      & {
      opacity: 1;
    }
  }
}

在 :is

中包含另一个用于悬停的类

谢谢

能够将另一个类添加到悬停是:

wagtail
© www.soinside.com 2019 - 2024. All rights reserved.