// Box
//
// A simple box styling.
//
// A Drupal block is often styled as a box. However, this design component is
// not applied to any blocks by default; it is used as an example of how to
// build and document a CSS component.
//
// :hover - The hover/focus styling.
// .box--highlight - The "highlight" box variant.
//
// Markup: box.hbs
//
// Style guide: components.box

// "box" is the name of our component. We provide a "%box" placeholder selector
// so that we can easily extend the basic box component with: @extend %box;
.box,
%box {
  @include margin-bottom(1);
  border: 5px solid color(border);
  padding: 1em;

  // Sass compiles this to the selector: .box:hover, .box:focus, .box-is-hover,
  // %box-is-hover {}
  // We always add a placeholder selector like %box-is-hover in case we need to
  // use @extends later.
  // The ".is-" is part of a BEM naming convention that indicates the "focus" is
  // a _state_ of the "box" component.
  &:focus,
  &:hover,
  &.is-focus,
  &--is-focus {
    border-color: color(text);
  }

  // Sass compiles this to the selector: .box__title, %box__title {}
  // The "__" (double underscore) is part of a BEM naming convention that
  // indicates the "title" is an _element_ of (a piece of) the "box" component.
  &__title {
    margin: 0;
  }

  // Sass compiles this to the selector: .box--highlight, %box--highlight {}
  // The "--" (double dash) is part of a BEM naming convention that indicates
  // the "highlight" is a _modifier_, creating a new variation of the standard
  // "box" component.
  &--highlight {
    border-color: color(link);
  }
}

//
// Drupal selectors.
//

//.sidebars {
//  .block {
//    @extend %box;
//  }
//
//  .block__title {
//    @extend %box__title;
//  }
//}
