// .linked >        element       child
$_linked_widgets: ("%button",     ""),
                  ("button",      ""),
                  ("menubutton",  "> button"),
                  ("dropdown",    "> button"),
                  ("colorbutton", "> button"),
                  ("fontbutton",  "> button"),
                  ("tabbutton",   "> button"),
                  ("%entry",      ""),
                  ("entry",       "");

$_linked_widgets: join($_linked_widgets, $deprecated_linked_widgets);

@each $widget, $child in $_linked_widgets {
  .linked:not(.vertical) > {
    #{$widget} {
      &:dir(ltr):not(:first-child) #{$child},
      &:dir(rtl):not(:last-child) #{$child} {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        margin-left: -1px;
      }

      &:dir(ltr):not(:last-child) #{$child},
      &:dir(rtl):not(:first-child) #{$child} {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
      }
    }
  }

  .linked.vertical {
    #{$widget} {
      &:not(:first-child) #{$child} {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        margin-top: -1px;
      }

      &:not(:last-child) #{$child} {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
      }
    }
  }
}
