TailwindのFlexbox早見表


ブラウザ確認

コード

slim
.flex.w-full.bg-gray-300
  .flex-1.bg-red-300.text-center.mt-1.mx-1
    | flex-1
  .flex-1.bg-yellow-300.text-center.mt-1.mx-1
    | flex-1
  .flex-1.bg-green-300.text-center.mt-1.mx-1
    | flex-1
.flex.w-full.bg-gray-300
  .flex-1.bg-red-300.text-center.mt-1.mx-1
    | flex-1
  .flex-1.bg-yellow-300.text-center.mt-1.mx-1
    | flex-1
  .flex-auto.bg-green-300.text-center.mt-1.mx-1
    | flex-auto
.flex.w-full.bg-gray-300
  .flex-1.bg-red-300.text-center.mt-1.mx-1
    | flex-1
  .flex-1.bg-yellow-300.text-center.mt-1.mx-1
    | flex-1
  .flex-initial.bg-green-300.text-center.mt-1.mx-1
    | flex-initial
.flex.w-full.bg-gray-300
  .flex-1.bg-red-300.text-center.mt-1.mx-1
    | flex-1
  .flex-auto.bg-yellow-300.text-center.mt-1.mx-1
    | flex-auto
  .flex-1.bg-green-300.text-center.mt-1.mx-1
    | flex-1
.flex.w-full.bg-gray-300
  .flex-1.bg-red-300.text-center.mt-1.mx-1
    | flex-1
  .flex-auto.bg-yellow-300.text-center.mt-1.mx-1
    | flex-auto
  .flex-auto.bg-green-300.text-center.mt-1.mx-1
    | flex-auto
.flex.w-full.bg-gray-300
  .flex-1.bg-red-300.text-center.mt-1.mx-1
    | flex-1
  .flex-auto.bg-yellow-300.text-center.mt-1.mx-1
    | flex-auto
  .flex-initial.bg-green-300.text-center.mt-1.mx-1
    | flex-initial
.flex.w-full.bg-gray-300
  .flex-1.bg-red-300.text-center.mt-1.mx-1
    | flex-1
  .flex-initial.bg-yellow-300.text-center.mt-1.mx-1
    | flex-initial
  .flex-1.bg-green-300.text-center.mt-1.mx-1
    | flex-1
.flex.w-full.bg-gray-300
  .flex-1.bg-red-300.text-center.mt-1.mx-1
    | flex-1
  .flex-initial.bg-yellow-300.text-center.mt-1.mx-1
    | flex-initial
  .flex-auto.bg-green-300.text-center.mt-1.mx-1
    | flex-auto
.flex.w-full.bg-gray-300
  .flex-1.bg-red-300.text-center.mt-1.mx-1
    | flex-1
  .flex-initial.bg-yellow-300.text-center.mt-1.mx-1
    | flex-initial
  .flex-initial.bg-green-300.text-center.mt-1.mx-1
    | flex-initial

.flex.w-full.bg-gray-300
  .flex-auto.bg-red-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-1.bg-yellow-300.text-center.mt-1.mx-1
   | flex-1
  .flex-1.bg-green-300.text-center.mt-1.mx-1
   | flex-1
.flex.w-full.bg-gray-300
  .flex-auto.bg-red-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-1.bg-yellow-300.text-center.mt-1.mx-1
   | flex-1
  .flex-auto.bg-green-300.text-center.mt-1.mx-1
   | flex-auto
.flex.w-full.bg-gray-300
  .flex-auto.bg-red-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-1.bg-yellow-300.text-center.mt-1.mx-1
   | flex-1
  .flex-initial.bg-green-300.text-center.mt-1.mx-1
   | flex-initial
.flex.w-full.bg-gray-300
  .flex-auto.bg-red-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-auto.bg-yellow-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-1.bg-green-300.text-center.mt-1.mx-1
   | flex-1
.flex.w-full.bg-gray-300
  .flex-auto.bg-red-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-auto.bg-yellow-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-auto.bg-green-300.text-center.mt-1.mx-1
   | flex-auto
.flex.w-full.bg-gray-300
  .flex-auto.bg-red-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-initial.bg-yellow-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-1.bg-green-300.text-center.mt-1.mx-1
   | flex-1
.flex.w-full.bg-gray-300
  .flex-auto.bg-red-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-initial.bg-yellow-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-auto.bg-green-300.text-center.mt-1.mx-1
   | flex-auto
.flex.w-full.bg-gray-300
  .flex-auto.bg-red-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-initial.bg-yellow-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-initial.bg-green-300.text-center.mt-1.mx-1
   | flex-initial

.flex.w-full.bg-gray-300
  .flex-initial.bg-red-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-1.bg-yellow-300.text-center.mt-1.mx-1
   | flex-1
  .flex-1.bg-green-300.text-center.mt-1.mx-1
   | flex-1
.flex.w-full.bg-gray-300
  .flex-initial.bg-red-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-1.bg-yellow-300.text-center.mt-1.mx-1
   | flex-1
  .flex-auto.bg-green-300.text-center.mt-1.mx-1
   | flex-auto
.flex.w-full.bg-gray-300
  .flex-initial.bg-red-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-1.bg-yellow-300.text-center.mt-1.mx-1
   | flex-1
  .flex-initial.bg-green-300.text-center.mt-1.mx-1
   | flex-initial
.flex.w-full.bg-gray-300
  .flex-initial.bg-red-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-auto.bg-yellow-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-1.bg-green-300.text-center.mt-1.mx-1
   | flex-1
.flex.w-full.bg-gray-300
  .flex-initial.bg-red-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-auto.bg-yellow-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-auto.bg-green-300.text-center.mt-1.mx-1
   | flex-auto
.flex.w-full.bg-gray-300
  .flex-initial.bg-red-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-auto.bg-yellow-300.text-center.mt-1.mx-1
   | flex-auto
  .flex-initial.bg-green-300.text-center.mt-1.mx-1
   | flex-initial
.flex.w-full.bg-gray-300
  .flex-initial.bg-red-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-initial.bg-yellow-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-1.bg-green-300.text-center.mt-1.mx-1
   | flex-1
.flex.w-full.bg-gray-300
  .flex-initial.bg-red-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-initial.bg-yellow-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-auto.bg-green-300.text-center.mt-1.mx-1
   | flex-auto
.flex.w-full.bg-gray-300
  .flex-initial.bg-red-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-initial.bg-yellow-300.text-center.mt-1.mx-1
   | flex-initial
  .flex-initial.bg-green-300.text-center.mt-1.mx-1
   | flex-initial