_flex.scss 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. @if $enable-flex {
  2. @each $breakpoint in map-keys($grid-breakpoints) {
  3. // Flex column reordering
  4. @include media-breakpoint-up($breakpoint) {
  5. .flex-#{$breakpoint}-first {
  6. order: -1;
  7. }
  8. .flex-#{$breakpoint}-last {
  9. order: 1;
  10. }
  11. }
  12. // Alignment for every item
  13. @include media-breakpoint-up($breakpoint) {
  14. .flex-items-#{$breakpoint}-top {
  15. align-items: flex-start;
  16. }
  17. .flex-items-#{$breakpoint}-middle {
  18. align-items: center;
  19. }
  20. .flex-items-#{$breakpoint}-bottom {
  21. align-items: flex-end;
  22. }
  23. }
  24. // Alignment per item
  25. @include media-breakpoint-up($breakpoint) {
  26. .flex-#{$breakpoint}-top {
  27. align-self: flex-start;
  28. }
  29. .flex-#{$breakpoint}-middle {
  30. align-self: center;
  31. }
  32. .flex-#{$breakpoint}-bottom {
  33. align-self: flex-end;
  34. }
  35. }
  36. // Horizontal alignment of item
  37. @include media-breakpoint-up($breakpoint) {
  38. .flex-items-#{$breakpoint}-left {
  39. justify-content: flex-start;
  40. }
  41. .flex-items-#{$breakpoint}-center {
  42. justify-content: center;
  43. }
  44. .flex-items-#{$breakpoint}-right {
  45. justify-content: flex-end;
  46. }
  47. .flex-items-#{$breakpoint}-around {
  48. justify-content: space-around;
  49. }
  50. .flex-items-#{$breakpoint}-between {
  51. justify-content: space-between;
  52. }
  53. }
  54. }
  55. }