tabHeader.component.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. $tabs-height: 38px;
  2. :host {
  3. position: relative;
  4. cursor: pointer;
  5. box-sizing: border-box;
  6. > * { cursor: pointer; }
  7. flex: 1000 1 200px;
  8. width: 200px;
  9. // flex-basis and width are also set through animation on AppRoot
  10. padding: 0 10px;
  11. display: flex;
  12. flex-direction: row;
  13. min-width: 0;
  14. overflow: hidden;
  15. &.flex-width {
  16. flex: 1000 1 auto;
  17. width: auto;
  18. }
  19. &.vertical {
  20. flex: none;
  21. height: $tabs-height;
  22. }
  23. .index {
  24. flex: none;
  25. font-weight: bold;
  26. -webkit-app-region: no-drag;
  27. cursor: -webkit-grab;
  28. width: 22px;
  29. border-radius: 10px;
  30. text-align: center;
  31. transition: 0.25s all;
  32. align-self: center;
  33. margin-top: 1px;
  34. }
  35. profile-icon {
  36. font-size: 13px;
  37. margin: 1px 4px 0 0;
  38. }
  39. .name {
  40. flex: auto;
  41. margin-top: 1px;
  42. overflow: hidden;
  43. white-space: nowrap;
  44. text-overflow: ellipsis;
  45. min-width: 0;
  46. align-self: center;
  47. }
  48. .index + .name {
  49. margin-left: 10px;
  50. }
  51. .buttons {
  52. display: flex;
  53. position: absolute;
  54. align-items: center;
  55. height: 100%;
  56. top: 2px;
  57. right: 3px;
  58. opacity: 0;
  59. button {
  60. display: flex;
  61. align-items: center;
  62. flex: none;
  63. justify-content: center;
  64. background: transparent;
  65. -webkit-app-region: no-drag;
  66. $button-size: 26px;
  67. width: $button-size;
  68. height: $button-size;
  69. border-radius: $button-size / 6;
  70. line-height: $button-size;
  71. align-self: center;
  72. text-align: center;
  73. font-size: 20px;
  74. &:focus {
  75. outline: 0;
  76. }
  77. }
  78. }
  79. &:hover .name:not(.no-hover) {
  80. -webkit-mask-image: linear-gradient(black 0 0), linear-gradient(to left, transparent 0%, transparent 50%, black 100%);
  81. -webkit-mask-size: calc(100% - 80px) auto, 80px auto;
  82. -webkit-mask-repeat: no-repeat;
  83. -webkit-mask-position: left, right;
  84. }
  85. &:hover .buttons {
  86. transition: 0.25s opacity;
  87. opacity: 1;
  88. }
  89. &.drag-region {
  90. -webkit-app-region: drag;
  91. }
  92. &.fully-draggable {
  93. cursor: -webkit-grab;
  94. }
  95. .progressbar {
  96. position: absolute;
  97. left: 0;
  98. top: 0;
  99. height: 3px;
  100. z-index: 1;
  101. transition: 0.25s width;
  102. }
  103. .colorbar {
  104. position: absolute;
  105. left: 0;
  106. bottom: 0;
  107. height: 3px;
  108. width: 100%;
  109. z-index: 1;
  110. }
  111. &.active .activity-indicator {
  112. display: none;
  113. }
  114. .activity-indicator {
  115. position: absolute;
  116. left: 10px;
  117. right: 10px;
  118. bottom: 4px;
  119. height: 2px;
  120. }
  121. }