test Drupal site working on Koality Theme Builder
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.0 KiB

  1. //=======================================================
  2. // Mixins
  3. //=======================================================
  4. // Clearfix
  5. @mixin clearfix {
  6. &::after {
  7. content: '';
  8. display: table;
  9. clear: both;
  10. }
  11. }
  12. // Makes an element visually hidden, but accessible.
  13. // @see http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
  14. @mixin element-invisible {
  15. position: absolute !important;
  16. height: 1px;
  17. width: 1px;
  18. overflow: hidden;
  19. clip: rect(1px, 1px, 1px, 1px);
  20. }
  21. // Turns off the element-invisible effect.
  22. @mixin element-invisible-off {
  23. position: static !important;
  24. clip: auto;
  25. height: auto;
  26. width: auto;
  27. overflow: auto;
  28. }
  29. // Makes an element visually hidden by default, but visible when focused.
  30. @mixin element-focusable {
  31. @include element-invisible;
  32. &:active,
  33. &:focus {
  34. @include element-invisible-off;
  35. }
  36. }
  37. // Helper function for working with Sass maps.
  38. // Example: @include print($configuration);
  39. @mixin print($declarations) {
  40. @each $property, $value in $declarations {
  41. #{$property}: $value;
  42. }
  43. }
  44. @mixin ghost-button-mono($inverted: false) {
  45. width: auto;
  46. padding: $button-padding;
  47. text-decoration: none;
  48. transition: all 150ms ease;
  49. cursor: pointer;
  50. @if ($inverted == true) {
  51. border: 2px solid $color-white;
  52. border-radius: 0;
  53. background-color: $color-black;
  54. color: $color-white;
  55. &:hover {
  56. background-color: $color-white;
  57. color: $color-black;
  58. text-decoration: none;
  59. transition: all 150ms ease;
  60. }
  61. } @else {
  62. border: 2px solid $color-black;
  63. border-radius: 0;
  64. background-color: $color-white;
  65. color: $color-black;
  66. &:hover {
  67. background-color: $color-black;
  68. color: $color-white;
  69. text-decoration: none;
  70. transition: all 150ms ease;
  71. }
  72. }
  73. }
  74. %bust-out {
  75. margin: {
  76. left: calc(50% - 50vw);
  77. right: calc(50% - 50vw);
  78. }
  79. transform: translateX(calc(50vw - 50%));
  80. }
  81. @mixin bust-out($margin-right: null, $margin-left: $margin-right, $aspect-ratio: null) {
  82. @extend %bust-out !optional;
  83. }