_public.less 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. .animation(@value) {
  2. -webkit-animation: @value;
  3. -moz-animation: @value;
  4. -ms-animation: @value;
  5. -o-animation: @value;
  6. animation: @value;
  7. }
  8. .blur {
  9. filter: url(../images/blur.svg#blur);
  10. -webkit-filter: blur(5px);
  11. -moz-filter: blur(5px);
  12. -mz-filter: blur(5px);
  13. -o-filter: blur(5px);
  14. filter: blur(5px);
  15. }
  16. .dock(@top: 0, @right: @top, @bottom: @top, @left: @right) {
  17. position: absolute;
  18. top: @top;
  19. right: @right;
  20. bottom: @bottom;
  21. left: @left;
  22. }
  23. .validate-error {
  24. color: red;
  25. border-color: red !important;
  26. vertical-align: middle;
  27. }
  28. span.validate-error {
  29. margin-left: 5px;
  30. }
  31. .button, button {
  32. display: inline-block;
  33. height: 30px;
  34. padding: 0 15px;
  35. line-height: 30px;
  36. text-align: center;
  37. outline: none;
  38. background: lighten(@tab-active, 20%);
  39. &:hover, &.hover {
  40. background: lighten(@tab-hover, 20%);
  41. }
  42. &:active, &.active {
  43. background: lighten(@tab-active, 15%);
  44. }
  45. &:disabled {
  46. background: #CCC;
  47. &:hover, &.hover,
  48. &:active, &.active {
  49. background: #CCC;
  50. }
  51. }
  52. cursor: default;
  53. color: @ui-fore;
  54. border: none;
  55. box-sizing: content-box;
  56. }
  57. input[type=text],
  58. input[type=url] {
  59. padding: 2px 5px;
  60. height: 16px;
  61. line-height: 16px;
  62. outline: none;
  63. border: 1px solid lighten(@tab-hover, 50%);
  64. box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
  65. border-radius: 2px;
  66. &:focus {
  67. border-color: hsl(223, 38%, 55%);
  68. }
  69. }
  70. .loading-circle(@size: 40px, @border-size: 4px) {
  71. width: @size;
  72. height: @size;
  73. border: @border-size solid;
  74. border-color: @border-color transparent transparent;
  75. box-shadow: 0 0 (@size - 5px) white;
  76. z-index: 10;
  77. border-radius: 100%;
  78. .animation(rotate 1.33s ease infinite);
  79. filter: none;
  80. -webkit-filter: none;
  81. }
  82. .loading(@color: rgb(128, 130, 140), @border-color: #fff) {
  83. .loading-target {
  84. .blur;
  85. }
  86. &:after {
  87. content: ' ';
  88. display: block;
  89. .dock;
  90. background: fadeOut(@color, 25%);
  91. .animation(fadeIn 3s ease);
  92. }
  93. &:before {
  94. content: ' ';
  95. .loading-circle;
  96. position: absolute;
  97. left: 50%;
  98. top: 50%;
  99. margin-left: -24px;
  100. margin-top: -24px;
  101. }
  102. }
  103. .loading {
  104. .loading();
  105. }
  106. @-webkit-keyframes rotate {
  107. from {
  108. transform: rotate(0);
  109. }
  110. to {
  111. transform: rotate(360deg);
  112. }
  113. }
  114. @keyframes rotate {
  115. from {
  116. transform: rotate(0);
  117. }
  118. to {
  119. transform: rotate(360deg);
  120. }
  121. }
  122. @-webkit-keyframes fadeIn {
  123. from { opacity: 0; }
  124. to { opacity: 1; }
  125. }
  126. @keyframes fadeIn {
  127. from { opacity: 0; }
  128. to { opacity: 1; }
  129. }
  130. @-webkit-keyframes fadeOut {
  131. from { opacity: 1; }
  132. to { opacity: 0; }
  133. }
  134. @keyframes fadeOut {
  135. from { opacity: 1; }
  136. to { opacity: 0; }
  137. }
  138. .shortcut-key {
  139. display: inline-block;
  140. padding: 3px 8px 5px;
  141. font-size: 12px;
  142. font-weight: normal;
  143. line-height: 14px;
  144. color: hsl(0, 0%, 43%);
  145. /* text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.25); */
  146. white-space: nowrap;
  147. vertical-align: middle;
  148. background-color: hsl(0, 0%, 99%);
  149. border-radius: 3px;
  150. border: 1px solid hsl(0, 0%, 80%);
  151. text-transform: capitalize;
  152. box-shadow: inset 0 -2px hsl(0, 0%, 92%), inset 0 -3px hsl(0, 100%, 100%), 0 1px 2px rgba(255, 255, 255, 0.3);
  153. &:active {
  154. padding-top: 4px;
  155. padding-bottom: 4px;
  156. box-shadow: inset 0 -1px hsl(0, 0%, 92%), inset 0 -2px hsl(0, 100%, 100%), 0 1px 1px rgba(255, 255, 255, 0.3);
  157. &:after {
  158. transform: translate(0, 1px);
  159. }
  160. }
  161. .mac &.ctrl,
  162. .mac &.shift,
  163. .mac &.alt,
  164. &.up,
  165. &.down,
  166. &.left,
  167. &.right {
  168. text-indent: 99999px;
  169. position: relative;
  170. width: 9px;
  171. &:after {
  172. display: block;
  173. position: absolute;
  174. text-align: center;
  175. left: 5px;
  176. top: 4px;
  177. width: 16px;
  178. height: 16px;
  179. text-indent: 0;
  180. }
  181. }
  182. .mac &.ctrl:after {
  183. content: '⌘';
  184. }
  185. .mac &.shift:after {
  186. content: '⇧';
  187. }
  188. .mac &.alt:after {
  189. content: '⌥';
  190. }
  191. &.up:after {
  192. content: '↑';
  193. top: 2px;
  194. }
  195. &.down:after {
  196. content: '↓';
  197. top: 2px;
  198. }
  199. &.left:after {
  200. content: '←';
  201. top: 2px;
  202. }
  203. &.right:after {
  204. content: '→';
  205. top: 2px;
  206. }
  207. }