_hover.scss 984 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. @mixin hover {
  2. // TODO: re-enable along with mq4-hover-shim
  3. // @if $enable-hover-media-query {
  4. // // See Media Queries Level 4: https://drafts.csswg.org/mediaqueries/#hover
  5. // // Currently shimmed by https://github.com/twbs/mq4-hover-shim
  6. // @media (hover: hover) {
  7. // &:hover { @content }
  8. // }
  9. // }
  10. // @else {
  11. &:hover { @content }
  12. // }
  13. }
  14. @mixin hover-focus {
  15. @if $enable-hover-media-query {
  16. &:focus { @content }
  17. @include hover { @content }
  18. }
  19. @else {
  20. &:focus,
  21. &:hover {
  22. @content
  23. }
  24. }
  25. }
  26. @mixin plain-hover-focus {
  27. @if $enable-hover-media-query {
  28. &,
  29. &:focus {
  30. @content
  31. }
  32. @include hover { @content }
  33. }
  34. @else {
  35. &,
  36. &:focus,
  37. &:hover {
  38. @content
  39. }
  40. }
  41. }
  42. @mixin hover-focus-active {
  43. @if $enable-hover-media-query {
  44. &:focus,
  45. &:active {
  46. @content
  47. }
  48. @include hover { @content }
  49. }
  50. @else {
  51. &:focus,
  52. &:active,
  53. &:hover {
  54. @content
  55. }
  56. }
  57. }