index.less 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. @import "../styles/mixins/index.less";
  2. @import "../styles/themes/index.less";
  3. .tab-style(@theme, @color) {
  4. &--@{theme} &-bar {
  5. background: @color;
  6. }
  7. &--@{theme}&--current {
  8. color: @color;
  9. }
  10. }
  11. .@{wux-prefix}-tabs {
  12. &__tab {
  13. flex: 1;
  14. display: flex;
  15. width: 100%;
  16. justify-content: center;
  17. align-items: center;
  18. text-align: center;
  19. position: relative;
  20. box-sizing: border-box;
  21. font-size: @tabs-font-size;
  22. // color: @tabs-color;
  23. padding: 0 @tabs-scrolling-size;
  24. &-bar {
  25. display: block;
  26. width: calc(~"100%" - @tabs-scrolling-size * 2);
  27. height: @tabs-bar-size;
  28. background: transparent;
  29. position: absolute;
  30. bottom: 0;
  31. left: @tabs-scrolling-size;
  32. background: @tabs-bar-balanced-bg;
  33. border-radius: @tabs-bar-size;
  34. &--full {
  35. width: 100%;
  36. left: 0;
  37. }
  38. }
  39. &--vertical {
  40. padding: 0 @tabs-scrolling-size;
  41. }
  42. &--vertical &-bar {
  43. width: @tabs-bar-size;
  44. height: 100%;
  45. right: 0;
  46. left: auto;
  47. }
  48. &--current {
  49. color: @tabs-bar-balanced-bg;
  50. }
  51. &--horizontal&--scroll {
  52. display: inline-flex;
  53. width: auto;
  54. }
  55. &--disabled {
  56. opacity: @disabled-opacity;
  57. }
  58. .tab-style(light, @tabs-bar-light-bg);
  59. .tab-style(stable, @tabs-bar-stable-bg);
  60. .tab-style(positive, @tabs-bar-positive-bg);
  61. .tab-style(calm, @tabs-bar-calm-bg);
  62. .tab-style(assertive, @tabs-bar-assertive-bg);
  63. .tab-style(balanced, @tabs-bar-balanced-bg);
  64. .tab-style(energized, @tabs-bar-energized-bg);
  65. .tab-style(royal, @tabs-bar-royal-bg);
  66. .tab-style(dark, @tabs-bar-dark-bg);
  67. }
  68. }