UI for Zipcoin Blue

segment.md.scss 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. @import "../../themes/ionic.globals.md";
  2. // Material Design Segment
  3. // --------------------------------------------------
  4. /// @prop - Text color of the activated segment button
  5. $segment-button-md-text-color-activated: $toolbar-md-active-color !default;
  6. /// @prop - Border color of the activated segment button
  7. $segment-button-md-border-color-activated: $toolbar-md-active-color !default;
  8. /// @prop - Width of the bottom border on the segment button
  9. $segment-button-md-border-bottom-width: 2px !default;
  10. /// @prop - Color of the bottom border on the segment button
  11. $segment-button-md-border-bottom-color: rgba(#000, .10) !default;
  12. /// @prop - Opacity of the segment button
  13. $segment-button-md-opacity: .7 !default;
  14. /// @prop - Opacity of the activated segment button
  15. $segment-button-md-opacity-activated: 1 !default;
  16. /// @prop - Opacity of the disabled segment button
  17. $segment-button-md-opacity-disabled: .3 !default;
  18. // deprecated
  19. $segment-button-md-padding: null !default;
  20. /// @prop - Padding top of the segment button
  21. $segment-button-md-padding-top: 0 !default;
  22. /// @prop - Padding end of the segment button
  23. $segment-button-md-padding-end: 6px !default;
  24. /// @prop - Padding bottom of the segment button
  25. $segment-button-md-padding-bottom: $segment-button-md-padding-top !default;
  26. /// @prop - Padding start of the segment button
  27. $segment-button-md-padding-start: $segment-button-md-padding-end !default;
  28. /// @prop - Height of the segment button
  29. $segment-button-md-height: 4.2rem !default;
  30. /// @prop - Line height of the segment button
  31. $segment-button-md-line-height: 4rem !default;
  32. /// @prop - Font size of the segment button
  33. $segment-button-md-font-size: 1.2rem !default;
  34. /// @prop - Size of an icon in the segment button
  35. $segment-button-md-icon-size: 2.6rem !default;
  36. /// @prop - Line height of an icon in the segment button
  37. $segment-button-md-icon-line-height: $segment-button-md-line-height !default;
  38. .segment-md .segment-button {
  39. flex: 1;
  40. width: 0;
  41. height: $segment-button-md-height;
  42. border-bottom-width: $segment-button-md-border-bottom-width;
  43. border-bottom-style: solid;
  44. border-bottom-color: $segment-button-md-border-bottom-color;
  45. font-size: $segment-button-md-font-size;
  46. font-weight: 500;
  47. line-height: $segment-button-md-line-height;
  48. text-transform: uppercase;
  49. color: $segment-button-md-text-color-activated;
  50. background-color: transparent;
  51. opacity: $segment-button-md-opacity;
  52. transition: 100ms all linear;
  53. @include deprecated-variable(padding, $segment-button-md-padding) {
  54. @include padding($segment-button-md-padding-top, $segment-button-md-padding-end, $segment-button-md-padding-bottom, $segment-button-md-padding-start);
  55. }
  56. ion-icon {
  57. font-size: $segment-button-md-icon-size;
  58. line-height: $segment-button-md-icon-line-height;
  59. }
  60. &.activated,
  61. &.segment-activated {
  62. border-color: $segment-button-md-border-color-activated;
  63. opacity: $segment-button-md-opacity-activated;
  64. }
  65. }
  66. .segment-md.segment-disabled,
  67. .segment-md .segment-button-disabled {
  68. opacity: $segment-button-md-opacity-disabled;
  69. pointer-events: none;
  70. }
  71. .toolbar {
  72. .segment-md {
  73. @include margin(0, auto);
  74. }
  75. .segment-md .segment-button.activated,
  76. .segment-md .segment-button.segment-activated {
  77. opacity: 1;
  78. }
  79. }
  80. // Material Design Segment Button Mixin
  81. // --------------------------------------------------
  82. @mixin md-segment-button($color-name, $color-base, $color-contrast) {
  83. .segment-md-#{$color-name} .segment-button {
  84. color: $color-base;
  85. &.activated,
  86. &.segment-activated {
  87. border-color: $color-base;
  88. color: $color-base;
  89. opacity: 1;
  90. }
  91. }
  92. }
  93. // Material Design Segment Color Generation
  94. // --------------------------------------------------
  95. @each $color-name, $color-base, $color-contrast in get-colors($colors-md) {
  96. @include md-segment-button($color-name, $color-base, $color-contrast);
  97. }