style.css 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. $fontSize: 12px;
  2. $padding: 8px;
  3. $itemPaddingX: 14px;
  4. $scriptIconSize: 18px;
  5. $scriptIconMLR: 2px;
  6. $iconSize: 14px;
  7. $iconML: calc($scriptIconSize + 2 * $scriptIconMLR);
  8. $iconMR: 10px;
  9. $leftPaneWidth: calc($iconML + $iconSize + $iconMR);
  10. $logoSize: 32px;
  11. $logoMLR: calc(($leftPaneWidth - $logoSize) / 2);
  12. $topIconSize: 20px;
  13. $findIconSize: 16px;
  14. $findIconML: calc($leftPaneWidth - $findIconSize - $iconMR);
  15. body {
  16. width: 320px;
  17. max-width: 100%;
  18. /* Latest Chrome renders an extra blank for a nonexistent scrollbar */
  19. overflow: hidden;
  20. background: var(--fill-0-5);
  21. @media (min-width: 360px) {
  22. width: 100%;
  23. }
  24. }
  25. .page-popup {
  26. /* hardcoded popup height in Chrome */
  27. max-height: 600px;
  28. overflow: hidden;
  29. .incognito {
  30. padding: $padding $padding 0 $leftPaneWidth;
  31. }
  32. }
  33. footer {
  34. height: 40px;
  35. line-height: 40px;
  36. text-align: center;
  37. font-size: $fontSize;
  38. color: var(--fill-6);
  39. > span {
  40. cursor: pointer;
  41. &:hover {
  42. color: var(--fill-9);
  43. }
  44. }
  45. }
  46. .logo {
  47. text-align: center;
  48. margin: 0 $logoMLR;
  49. img {
  50. width: $logoSize;
  51. }
  52. &.disabled > img {
  53. opacity: .5;
  54. }
  55. }
  56. .menu-area {
  57. cursor: pointer;
  58. &:hover {
  59. background: cornflowerblue;
  60. color: var(--bg);
  61. }
  62. .disabled > & {
  63. color: var(--fill-8);
  64. &:hover {
  65. color: var(--fill-4);
  66. }
  67. }
  68. }
  69. .ext-name {
  70. &.disabled {
  71. color: var(--fill-8);
  72. }
  73. }
  74. .script-icon {
  75. &:not([src]) {
  76. display: none;
  77. }
  78. max-width: $scriptIconSize;
  79. max-height: $scriptIconSize;
  80. margin-left: $scriptIconMLR;
  81. position: absolute;
  82. & + .icon {
  83. margin-left: $iconML;
  84. margin-right: $iconMR;
  85. }
  86. }
  87. .menu-buttons {
  88. align-items: center;
  89. padding: $padding $padding $padding 0;
  90. background: var(--bg);
  91. > .menu-area {
  92. padding: $padding;
  93. }
  94. .icon {
  95. display: block;
  96. width: $topIconSize;
  97. height: $topIconSize;
  98. }
  99. }
  100. .menu {
  101. background: var(--bg);
  102. border-top: 1px solid var(--fill-4);
  103. &-item {
  104. position: relative;
  105. display: flex;
  106. align-items: center;
  107. min-height: 2rem;
  108. padding-left: $itemPaddingX;
  109. padding-right: $itemPaddingX;
  110. text-align: left;
  111. white-space: nowrap;
  112. .submenu & {
  113. text-align: left;
  114. }
  115. .icon {
  116. flex: 0 0 $iconSize;
  117. }
  118. > .icon:first-child {
  119. margin-right: $iconMR;
  120. }
  121. > .flex-auto {
  122. &:last-child {
  123. padding-right: $itemPaddingX;
  124. }
  125. }
  126. > .flex-1 {
  127. padding-right: 2rem;
  128. }
  129. }
  130. &-find {
  131. padding-left: 0;
  132. /* using the same selector as above to override it */
  133. > .icon:first-child {
  134. flex-basis: $findIconSize;
  135. width: $findIconSize;
  136. height: $findIconSize;
  137. margin: 0 $iconMR 0 $findIconML;
  138. }
  139. }
  140. &-group {
  141. padding-left: $leftPaneWidth;
  142. & [data-totals]::after {
  143. content: ": " attr(data-totals);
  144. }
  145. }
  146. &.expand {
  147. background: var(--fill-0-5);
  148. > .submenu {
  149. display: block;
  150. }
  151. .icon-collapse {
  152. transform: rotateZ(90deg);
  153. }
  154. }
  155. }
  156. .submenu {
  157. display: none;
  158. min-height: 4rem;
  159. max-height: 30rem;
  160. overflow-y: auto;
  161. background: var(--bg);
  162. border-top: 1px dashed var(--fill-2);
  163. > * {
  164. position: relative;
  165. &:not(:hover) > .submenu-buttons {
  166. visibility: hidden;
  167. }
  168. .menu-item {
  169. padding-left: 0;
  170. }
  171. }
  172. &-buttons {
  173. display: flex;
  174. position: absolute;
  175. top: .3rem;
  176. right: $itemPaddingX;
  177. }
  178. &-button {
  179. padding: .2rem;
  180. background: var(--bg);
  181. cursor: pointer;
  182. &:hover {
  183. color: var(--bg);
  184. background: cornflowerblue;
  185. }
  186. .icon {
  187. display: block;
  188. }
  189. }
  190. &-commands {
  191. font-size: .8rem;
  192. color: var(--fill-12);
  193. > .menu-item {
  194. padding-left: $leftPaneWidth;
  195. > .icon {
  196. margin-right: .5rem;
  197. }
  198. }
  199. }
  200. }
  201. .message {
  202. position: absolute;
  203. max-width: 100%;
  204. left: 0;
  205. bottom: 0;
  206. padding: 4px $padding;
  207. word-wrap: break-word;
  208. font-size: $fontSize;
  209. line-height: 1;
  210. background: var(--fill-0-5);
  211. border: 1px solid var(--fill-2);
  212. > div {
  213. max-height: 2em;
  214. overflow: hidden;
  215. }
  216. }
  217. .failure-reason {
  218. padding: .75rem $itemPaddingX .75rem $leftPaneWidth;
  219. code {
  220. max-width: 100%;
  221. }
  222. }