123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. @import "../../themes/ionic.globals.wp";
  2. // Windows Tabs
  3. // --------------------------------------------------
  4. // deprecated
  5. $tabs-wp-tab-padding: null !default;
  6. /// @prop - Padding top on the tab button
  7. $tabs-wp-tab-padding-top: 12px !default;
  8. /// @prop - Padding end on the tab button
  9. $tabs-wp-tab-padding-end: 10px !default;
  10. /// @prop - Padding bottom on the tab button
  11. $tabs-wp-tab-padding-bottom: 5px !default;
  12. /// @prop - Padding start on the tab button
  13. $tabs-wp-tab-padding-start: 10px !default;
  14. /// @prop - Minimum height of the tab button
  15. $tabs-wp-tab-min-height: 4.8rem !default;
  16. /// @prop - Font size of the tab button text
  17. $tabs-wp-tab-font-size: 1.2rem !default;
  18. /// @prop - Font weight of the tab button text
  19. $tabs-wp-tab-font-weight: normal !default;
  20. /// @prop - Opacity of the inactive tab button
  21. $tabs-wp-tab-opacity: .7 !default;
  22. /// @prop - Text color of the inactive tab button
  23. $tabs-wp-tab-color: rgba($tabs-wp-tab-color-inactive, $tabs-wp-tab-opacity) !default;
  24. /// @prop - Text color of the active tab button
  25. $tabs-wp-tab-color-active: $tabs-wp-tab-color-active !default;
  26. /// @prop - Icon color of the inactive tab button
  27. $tabs-wp-tab-icon-color: rgba($tabs-wp-tab-color-inactive, $tabs-wp-tab-opacity) !default;
  28. /// @prop - Icon color of the active tab button
  29. $tabs-wp-tab-icon-color-active: $tabs-wp-tab-color-active !default;
  30. /// @prop - Border on the inactive tab button (border-top when [tabsPlacement=bottom] and border-bottom when [tabsPlacement=top])
  31. $tabs-wp-tab-border: 2px solid $tabs-wp-border-color !default;
  32. /// @prop - Border color on the active tab button (border-top when [tabsPlacement=bottom] and border-bottom when [tabsPlacement=top])
  33. $tabs-wp-tab-border-color-active: $tabs-wp-tab-color-active !default;
  34. /// @prop - Background of the tab button when pressed
  35. $tabs-wp-tab-background-activated: rgba(0, 0, 0, .1) !default;
  36. /// @prop - Size of the tab button icon
  37. $tabs-wp-tab-icon-size: 2.4rem !default;
  38. .tabs-wp .tabbar {
  39. background: $tabs-wp-background;
  40. }
  41. .tabs-wp .tab-button {
  42. @include border-radius(0);
  43. min-height: $tabs-wp-tab-min-height;
  44. border-bottom: $tabs-wp-tab-border;
  45. font-size: $tabs-wp-tab-font-size;
  46. font-weight: $tabs-wp-tab-font-weight;
  47. color: $tabs-wp-tab-color;
  48. box-shadow: none;
  49. @include deprecated-variable(padding, $tabs-wp-tab-padding) {
  50. @include padding($tabs-wp-tab-padding-top, $tabs-wp-tab-padding-end, $tabs-wp-tab-padding-bottom, $tabs-wp-tab-padding-start);
  51. }
  52. }
  53. .tabs-wp .tab-button[aria-selected=true] {
  54. border-bottom-color: $tabs-wp-tab-border-color-active;
  55. color: $tabs-wp-tab-color-active;
  56. }
  57. .tabs-wp .tab-button.activated {
  58. background: $tabs-wp-tab-background-activated;
  59. }
  60. .tabs-wp[tabsPlacement=bottom] .tab-button {
  61. border-top: $tabs-wp-tab-border;
  62. border-bottom-width: 0;
  63. }
  64. .tabs-wp[tabsPlacement=bottom] .tab-button[aria-selected=true] {
  65. border-top-color: $tabs-wp-tab-border-color-active;
  66. }
  67. // Windows Tab Button Text
  68. // --------------------------------------------------
  69. .tabs-wp .tab-button-text {
  70. @include margin(5px, null);
  71. }
  72. // Windows Tab Button Icon
  73. // --------------------------------------------------
  74. .tabs-wp .tab-button-icon {
  75. min-width: $tabs-wp-tab-icon-size;
  76. font-size: $tabs-wp-tab-icon-size;
  77. color: $tabs-wp-tab-icon-color;
  78. }
  79. .tabs-wp .tab-button[aria-selected=true] .tab-button-icon {
  80. color: $tabs-wp-tab-icon-color-active;
  81. }
  82. .tabs-wp[tabsLayout=icon-bottom] .tab-button {
  83. @include padding(8px, null, 8px, null);
  84. }
  85. .tabs-wp[tabsLayout=icon-right] .tab-button, // deprecated
  86. .tabs-wp[tabsLayout=icon-left] .tab-button, // deprecated
  87. .tabs-wp[tabsLayout=icon-end] .tab-button,
  88. .tabs-wp[tabsLayout=icon-start] .tab-button {
  89. @include padding(null, null, 10px, null);
  90. }
  91. .tabs-wp[tabsLayout=icon-right] .tab-button ion-icon, // deprecated
  92. .tabs-wp[tabsLayout=icon-left] .tab-button ion-icon, // deprecated
  93. .tabs-wp[tabsLayout=icon-end] .tab-button ion-icon,
  94. .tabs-wp[tabsLayout=icon-start] .tab-button ion-icon {
  95. min-width: 24px;
  96. }
  97. .tabs-wp[tabsLayout=icon-hide] .tab-button,
  98. .tabs-wp[tabsLayout=title-hide] .tab-button,
  99. .tabs-wp .tab-button.icon-only,
  100. .tabs-wp .tab-button.has-title-only {
  101. @include padding(6px, 10px);
  102. }
  103. // Windows Tabbar Color Mixin
  104. // --------------------------------------------------
  105. @mixin tabbar-wp($color-name, $color-base, $color-contrast) {
  106. .tabs-wp-#{$color-name} .tabbar {
  107. background-color: $color-base;
  108. }
  109. .tabs-wp-#{$color-name} .tab-button,
  110. .tabs-wp-#{$color-name} .tab-button-icon {
  111. color: rgba($color-contrast, $tabs-wp-tab-opacity);
  112. }
  113. .tabs-wp-#{$color-name} .tab-button:hover:not(.disable-hover),
  114. .tabs-wp-#{$color-name} .tab-button:hover:not(.disable-hover) .tab-button-icon,
  115. .tabs-wp-#{$color-name} .tab-button[aria-selected=true],
  116. .tabs-wp-#{$color-name} .tab-button[aria-selected=true] .tab-button-icon {
  117. border-color: $color-contrast;
  118. color: $color-contrast;
  119. }
  120. }
  121. // Windows Tabbar Color Generation
  122. // --------------------------------------------------
  123. @each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
  124. @include tabbar-wp($color-name, $color-base, $color-contrast);
  125. }