_flex.scss 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* ==================
  2. 弹性布局
  3. ==================== */
  4. .flex {
  5. display: flex !important;
  6. &-sub {
  7. flex: 1 !important;
  8. }
  9. &-twice {
  10. flex: 2 !important;
  11. }
  12. &-treble {
  13. flex: 3 !important;
  14. }
  15. &-column {
  16. flex-direction: column !important;
  17. }
  18. &-row {
  19. flex-direction: row !important;
  20. }
  21. &-column-reverse {
  22. flex-direction: column-reverse !important;
  23. }
  24. &-row-reverse {
  25. flex-direction: row-reverse !important;
  26. }
  27. &-wrap {
  28. flex-wrap: wrap !important;
  29. }
  30. &-center {
  31. justify-content: center
  32. }
  33. &-bar {
  34. // @include flex-bar;
  35. }
  36. &-shrink-0 {
  37. flex-shrink: 0;
  38. }
  39. }
  40. // .basis {
  41. // @each $class, $value in (xs: 20%, sm: 40%, df: 50%, lg: 60%, xl: 80%) {
  42. // &-#{$class} {
  43. // flex-basis: $value !important;
  44. // }
  45. // }
  46. // }
  47. // .align {
  48. // @each $class, $value in (start: flex-start, end: flex-end, center: center, stretch: stretch, baseline: baseline) {
  49. // &-#{$class} {
  50. // align-items: $value !important;
  51. // }
  52. // }
  53. // }
  54. // .self {
  55. // @each $class, $value in (start: flex-start, end: flex-end, center: center, stretch: stretch, baseline: baseline) {
  56. // &-#{$class} {
  57. // align-self: $value !important;
  58. // }
  59. // }
  60. // }
  61. // .justify {
  62. // @each $class, $value in (start: flex-start, end: flex-end, center: center, between: space-between, around: space-around) {
  63. // &-#{$class} {
  64. // justify-content: $value !important;
  65. // }
  66. // }
  67. // }