compile-button.less 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. @stripe-width: 20px;
  2. @keyframes pdf-toolbar-stripes {
  3. from {
  4. background-position: 0 0;
  5. }
  6. to {
  7. background-position: @stripe-width 0;
  8. }
  9. }
  10. .detach-compile-button-container {
  11. border-radius: @btn-border-radius-base 0 0 @btn-border-radius-base;
  12. margin-left: 6px;
  13. }
  14. // only apply for legacy editor
  15. .toolbar-pdf-right {
  16. .detach-compile-button-container when (@is-new-css = false) {
  17. margin-right: -5px;
  18. }
  19. // because 2px border on :active state
  20. .detach-compile-button-container when (@is-new-css = true) {
  21. margin-right: -3px;
  22. }
  23. }
  24. .btn-striped-animated {
  25. // prettier-ignore
  26. #gradient > .striped(@color: rgba(255, 255, 255, 0.2), @angle: -45deg);
  27. background-size: @stripe-width @stripe-width;
  28. .animation(pdf-toolbar-stripes 2s linear infinite);
  29. }
  30. .detach-compile-button when (@is-new-css = false) {
  31. &[disabled],
  32. &[disabled].active,
  33. &[disabled]:hover,
  34. &[disabled]:focus {
  35. background-color: mix(@btn-primary-bg, @toolbar-alt-bg-color, 65%);
  36. .opacity(1);
  37. }
  38. }
  39. .detach-compile-button {
  40. height: 28px;
  41. padding-top: 0;
  42. padding-bottom: 0;
  43. &.detach-compile-button-disabled {
  44. &,
  45. &:hover {
  46. color: @white;
  47. background-color: @ol-green;
  48. }
  49. }
  50. }
  51. .detach-compile-button when (@is-new-css = true) {
  52. border: none;
  53. }
  54. .detach-compile-button-label {
  55. margin-left: @line-height-computed / 4;
  56. }
  57. @keyframes compile-button-flash {
  58. from,
  59. to {
  60. background: rgba(0, 0, 0, 0);
  61. }
  62. 25%,
  63. 75% {
  64. background: rgba(0, 0, 0, 0.2);
  65. }
  66. }
  67. @keyframes compile-button-bounce {
  68. from,
  69. 50%,
  70. to {
  71. transform: translateY(0);
  72. }
  73. 25%,
  74. 75% {
  75. transform: translateY(2px);
  76. }
  77. }
  78. .detach-compile-button-animate {
  79. animation-duration: 1.2s;
  80. animation-fill-mode: both;
  81. animation-timing-function: ease-in-out;
  82. animation-name: compile-button-flash;
  83. }
  84. .detach-compile-button-animate .caret {
  85. animation-duration: 0.6s;
  86. animation-delay: 0.4s;
  87. animation-fill-mode: both;
  88. animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
  89. animation-name: compile-button-bounce;
  90. }