Plan stuff. Log stuff.
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.

50 lines
811 B

4 years ago
  1. <script>
  2. export let size = 1;
  3. </script>
  4. <div class="col col-{size}"><slot></slot></div>
  5. <style>
  6. div.col {
  7. display: inline-block;
  8. box-sizing: border-box;
  9. padding: 0;
  10. margin: 0;
  11. }
  12. div.col-1 {
  13. width: calc((100% / 12) * 1)
  14. }
  15. div.col-2 {
  16. width: calc((100% / 12) * 2)
  17. }
  18. div.col-3 {
  19. width: calc((100% / 12) * 3)
  20. }
  21. div.col-4 {
  22. width: calc((100% / 12) * 4)
  23. }
  24. div.col-5 {
  25. width: calc((100% / 12) * 5)
  26. }
  27. div.col-6 {
  28. width: calc((100% / 12) * 6)
  29. }
  30. div.col-7 {
  31. width: calc((100% / 12) * 7)
  32. }
  33. div.col-8 {
  34. width: calc((100% / 12) * 8)
  35. }
  36. div.col-9 {
  37. width: calc((100% / 12) * 9)
  38. }
  39. div.col-10 {
  40. width: calc((100% / 12) * 10)
  41. }
  42. div.col-11 {
  43. width: calc((100% / 12) * 11)
  44. }
  45. div.col-12 {
  46. width: 100%
  47. }
  48. </style>