<commit_before>// Copyright 2016 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/animation/functions";
@import "@material/elevation/mixins";
@import "@material/elevation/variables";
@import "@material/ripple/mixins";
@import "@material/theme/functions";
@import "@material/theme/mixins";
@import "./variables";

@mixin mdc-fab-accessible($container-color) {
  @include mdc-fab-container-color($container-color);
  // Calculate whether to use dark or light text on top of given color.
  $light-or-dark-text: mdc-theme-light-or-dark($container-color);

  @if ($light-or-dark-text == "light") {
    @include mdc-fab-ink-color(text-primary-on-dark);
    @include mdc-fab-ripple($mdc-fab-light-ripple-config);
  } @else {
    @include mdc-fab-ink-color(text-primary-on-light);
    @include mdc-fab-ripple(()); //default dark ripple
  }
}

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

@mixin mdc-fab-ink-color($color) {
  @include mdc-theme-prop(color, $color);
}

@mixin mdc-fab-ripple($ripple-config) {
  @include mdc-ripple-bg(map-merge((pseudo: "::before"), $ripple-config));
  @include mdc-ripple-fg(map-merge((pseudo: "::after"), $ripple-config));
}

$mdc-fab-icon-enter-delay_: 90ms;
$mdc-fab-icon-enter-duration_: 180ms;

@mixin mdc-fab-base_ {
  @include mdc-ripple-base;
  @include mdc-elevation(6);

  display: inline-flex;
  position: relative;
  justify-content: center;
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  padding: 0;
  transition:
    box-shadow $mdc-elevation-transition-duration $mdc-elevation-transition-timing-function,
    opacity 15ms linear 30ms,
    mdc-animation-enter(transform, $mdc-fab-icon-enter-duration_ + $mdc-fab-icon-enter-delay_);
  border: none;
  border-radius: 50%;
  fill: currentColor;
  cursor: pointer;
  user-select: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  overflow: hidden;

  &:active {
    @include mdc-elevation(12);
  }<commit_msg>fix(fab): Add hover/focus elevation (#1331)<commit_after>// Copyright 2016 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/animation/functions";
@import "@material/elevation/mixins";
@import "@material/elevation/variables";
@import "@material/ripple/mixins";
@import "@material/theme/functions";
@import "@material/theme/mixins";
@import "./variables";

@mixin mdc-fab-accessible($container-color) {
  @include mdc-fab-container-color($container-color);
  // Calculate whether to use dark or light text on top of given color.
  $light-or-dark-text: mdc-theme-light-or-dark($container-color);

  @if ($light-or-dark-text == "light") {
    @include mdc-fab-ink-color(text-primary-on-dark);
    @include mdc-fab-ripple($mdc-fab-light-ripple-config);
  } @else {
    @include mdc-fab-ink-color(text-primary-on-light);
    @include mdc-fab-ripple(()); //default dark ripple
  }
}

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

@mixin mdc-fab-ink-color($color) {
  @include mdc-theme-prop(color, $color);
}

@mixin mdc-fab-ripple($ripple-config) {
  @include mdc-ripple-bg(map-merge((pseudo: "::before"), $ripple-config));
  @include mdc-ripple-fg(map-merge((pseudo: "::after"), $ripple-config));
}

$mdc-fab-icon-enter-delay_: 90ms;
$mdc-fab-icon-enter-duration_: 180ms;

@mixin mdc-fab-base_ {
  @include mdc-ripple-base;
  @include mdc-elevation(6);

  display: inline-flex;
  position: relative;
  justify-content: center;
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  padding: 0;
  transition:
    box-shadow $mdc-elevation-transition-duration $mdc-elevation-transition-timing-function,
    opacity 15ms linear 30ms,
    mdc-animation-enter(transform, $mdc-fab-icon-enter-duration_ + $mdc-fab-icon-enter-delay_);
  border: none;
  border-radius: 50%;
  fill: currentColor;
  cursor: pointer;
  user-select: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  overflow: hidden;

  &:hover,
  &:focus {
    @include mdc-elevation(8);
  }

  &:active {
    @include mdc-elevation(12);
  }
{'fraction_non_alphanumeric': 0.15272656704832135, 'fraction_numerical': 0.011449640985833495, 'mean_word_length': 3.9845261121856868, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7531639', 'n_tokens_mistral': 1832, 'n_tokens_neox': 1729, 'n_words': 424}