_mixins.scss 712 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Mixins
  2. //-------------------------------
  3. @mixin centered-block() {
  4. display: block;
  5. text-align: center;
  6. width: 100%;
  7. padding: 0px;
  8. }
  9. @mixin figure2() {
  10. margin-left: -1rem;
  11. margin-right: -1rem;
  12. background-color: var(--code-bg-color);
  13. }
  14. // Underline slide borders from left/right and back
  15. // FROM left or right
  16. @mixin border-slide($direction) {
  17. position: relative;
  18. border-bottom: 0;
  19. &:hover, &:focus {
  20. border-bottom: 0;
  21. }
  22. &:after {
  23. color: inherit;
  24. content: '';
  25. position: absolute;
  26. bottom: -0.15em;
  27. #{$direction}: 0;
  28. width: 0%;
  29. border-bottom: 0.15em solid;
  30. transition: width 0.25s ease-in-out;
  31. }
  32. &:hover:after {
  33. width: 100%;
  34. }
  35. }