palantir/blueprint

[Core/Control Group] Control group doesn't set rounded corners properly if child wrapped with <Popover>

Open

#1,750 创建于 2017年10月24日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)TypeScript (20,263 star) (2,167 fork)batch import
Domain: designPackage: coreStatus: work in progressType: bughelp wanted

描述

Bug report

  • Package version(s): v1.32.0
  • Browser and OS versions: Mac Sierra, Chrome 62

Steps to reproduce

  1. Create a pt-control-group with two arbitrary children, except _wrap those children with <Popover>s. For example, consider this date/timezone picker (which is admittedly too narrow, but ignore that):

    control-group

Actual behavior

Corners are not rounded because of these rules, which round corners on the pt-popover-target parents instead of their pt-input/pt-button children:

.pt-control-group > :first-child {
  border-radius: 3px 0 0 3px;
}

.pt-control-group > :last-child {
  border-radius: 0 3px 3px 0;
}

Expected behavior

Corners are rounded on the pt-input/pt-button/pt-input-group children. Maybe we can change the rule to:

.pt-control-group > :first-child {
  &.pt-button, 
  &.pt-input,
  &.pt-input-group,
  > .pt-button,
  > .pt-input,
  > .pt-input-group {
     border-radius: 3px 0 0 3px;
  }
}

// And same idea for :last-child

贡献者指南