//
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

@import "@material/theme/mixins";

//
// Public
//

@mixin mdc-card-fill-color($color) {
  @include mdc-theme-prop(background-color, $color);
}

@mixin mdc-card-outline($color, $thickness: $mdc-card-outline-width) {
  border: $thickness solid mdc-theme-prop-value($color);
}

@mixin mdc-card-corner-radius($radius) {
  border-radius: $radius;
}

@mixin mdc-card-media-aspect-ratio($x, $y) {
  &::before {
    // This clever trick brought to you by: http://www.mademyday.de/css-height-equals-width-with-pure-css.html
    margin-top: percentage($y / $x);
  }
}

//
// Private
//

@mixin mdc-card-container-layout_ {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

@mixin mdc-card-actions-layout_($display: flex) {
  display: $display;
  flex-direction: row;
  align-items: center;
  box-sizing: border-box;
}

@mixin mdc-card-media-aspect-ratio-base_ {
  &::before {
    display: block;
    content: "";
  }
}
