palantir/blueprint

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

Open

#1750 aperta il 24 ott 2017

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)TypeScript (2167 fork)batch import
Domain: designPackage: coreStatus: work in progressType: bughelp wanted

Metriche repository

Star
 (20.263 star)
Metriche merge PR
 (Merge medio 43g 10h) (27 PR mergiate in 30 g)

Descrizione

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

Guida contributor