table.less 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @import "var";
  2. table {
  3. th,
  4. td {
  5. padding: .3em .6em;
  6. line-height: 30px;
  7. }
  8. }
  9. .table-border {
  10. border: 1px solid @tableBorderColor;
  11. tr {
  12. border-top: 1px solid @tableCellBorderColor;
  13. th,
  14. td, {
  15. border-top: 1px solid @tableCellBorderColor;
  16. }
  17. &:first-child {
  18. border-top: none;
  19. }
  20. }
  21. thead {
  22. border-bottom: 1px solid @tableBorderColor;
  23. }
  24. }
  25. .table-block {
  26. width: 100%;
  27. box-sizing: border-box;
  28. }
  29. .table-radius {
  30. border-collapse: separate !important;
  31. border-radius: .3em;
  32. thead:first-child {
  33. border-top-left-radius: .3em;
  34. border-top-right-radius: .3em;
  35. tr:first-child {
  36. border-top-left-radius: .3em;
  37. > th:first-child {
  38. border-top-left-radius: .3em;
  39. }
  40. > th:last-child {
  41. border-top-right-radius: .3em;
  42. }
  43. }
  44. }
  45. tbody {
  46. border-bottom-left-radius: .3em;
  47. border-bottom-right-radius: .3em;
  48. tr:last-child {
  49. border-bottom-left-radius: .3em;
  50. border-bottom-right-radius: .3em;
  51. > td:first-child {
  52. border-bottom-left-radius: .3em;
  53. }
  54. > td:last-child {
  55. border-bottom-right-radius: .3em;
  56. }
  57. }
  58. }
  59. }