onpage-help.less 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. .enable_onpage_help() when(@enable-onpage-help = true) {
  2. .onpage-help-backdrop {
  3. position: absolute;
  4. z-index: 99990;
  5. top: 0;
  6. bottom: 0;
  7. left: 0;
  8. right: 0;
  9. background-color: #000;
  10. filter: alpha(opacity=5);
  11. background-color: rgba(0,0,0,0.05);
  12. }
  13. .onpage-help-section {
  14. display: block;
  15. position: absolute;
  16. z-index: 100000;
  17. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4DFFFFFF', endColorstr='#4DFFFFFF',GradientType=0 );
  18. background-color: rgba(255,255,255,0.3);
  19. border: 1px dashed #8BBCD3;
  20. border-radius:4px;
  21. transition: background-color 0.2s, border-color 0.2s;
  22. -webkit-transition: background-color 0.2s, border-color 0.2s;
  23. text-align: center;
  24. vertical-align: middle;
  25. outline: none !important;
  26. }
  27. .onpage-help-section > .ie-hover-fix {
  28. /* ie8-9 fix*/
  29. display: block;
  30. position: absolute;
  31. top: 0;
  32. bottom: 0;
  33. left: 0;
  34. right: 0;
  35. background-color: #FFF;
  36. filter: alpha(opacity=1);
  37. }
  38. .onpage-help-section {
  39. &:focus, &:active {
  40. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#33C9D8EA', endColorstr='#33C9D8EA',GradientType=0 );
  41. background-color: rgba(201,216,234,0.2);
  42. border-color: #77ACC4;
  43. }
  44. &:hover {
  45. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#66C9D8EA', endColorstr='#66C9D8EA',GradientType=0 );
  46. background-color: rgba(201,216,234,0.4);
  47. border-color: #77ACC4;
  48. border-style: solid;
  49. }
  50. > .help-icon-1 {
  51. font-size: @font-size-onpage-help-icon-1;
  52. display: inline-block;
  53. position: absolute;
  54. z-index: 1;
  55. top: 50%;
  56. left: 50%;
  57. transform: translate(-50%, -50%);
  58. -webkit-transform: translate(-50%, -50%);
  59. opacity: 0;
  60. filter:alpha(opacity=0);
  61. color: #FFF;
  62. text-shadow: 0 0 2px black;
  63. background-color: #85B8DB;
  64. border: 2px solid #FFF;
  65. border-radius: 100%;
  66. box-shadow: 0 0 2px 1px rgba(0,0,0,0.4);
  67. width: 48px;
  68. height: 48px;
  69. line-height: 46px;
  70. transition: opacity 0.2s;
  71. -webkit-transition: opacity 0.2s;
  72. }
  73. &:focus > .help-icon-1,
  74. &:active > .help-icon-1 {
  75. opacity: 0.5;
  76. }
  77. &:hover > .help-icon-1 {
  78. opacity: 1;
  79. filter:alpha(opacity=100);
  80. }
  81. &.help-section-small > .help-icon-1 {
  82. font-size: @font-size-onpage-help-icon-1-small;
  83. width: 28px;
  84. height: 28px;
  85. line-height: 26px;
  86. border-radius: 12px;
  87. }
  88. &.help-section-smaller > .help-icon-1 {
  89. font-size: @font-size-onpage-help-icon-1-smaller;
  90. width: 20px;
  91. height: 20px;
  92. line-height: 17px;
  93. border-radius: 8px;
  94. }
  95. > .help-icon-2 {
  96. position: absolute;
  97. z-index: 2;
  98. left: -4px;
  99. top: -4px;
  100. width: 18px;
  101. height: 18px;
  102. line-height: 16px;
  103. display: block;
  104. font-size: @font-size-onpage-help-icon-2;
  105. color: orange;
  106. background-color: #FFF;
  107. border: 1px solid orange;
  108. border-radius: 4px;
  109. opacity: 1;
  110. transition: all 0.2s;
  111. -webkit-transition: all 0.2s;
  112. }
  113. &:hover > .help-icon-2 {
  114. color: #59A34E;
  115. border-color: #59A34E;
  116. transform: scale(1.25);
  117. -webkit-transform: scale(1.25);
  118. }
  119. }
  120. .onpage-help-modal {
  121. z-index: 100010;
  122. }
  123. .onpage-help-modal + .modal-backdrop {
  124. z-index: 100009;
  125. }
  126. .onpage-help-modal-buttons button{
  127. border-radius: 100%;
  128. border-width: 2px !important;
  129. &:focus {
  130. outline: none !important;
  131. }
  132. &.disabled {
  133. transform: scale(0.9);
  134. -webkit-transform: scale(0.9);
  135. }
  136. }
  137. .onpage-help-content {
  138. max-width: 800px;
  139. margin: 0 auto;
  140. }
  141. .code-modal.onpage-help-modal {
  142. .modal-dialog {
  143. margin-top: 6px;
  144. margin-bottom: 6px;
  145. }
  146. .modal-header {
  147. padding-top: 6px;
  148. padding-bottom: 6px;
  149. }
  150. .modal-body {
  151. padding: 10px 12px
  152. }
  153. }
  154. .onpage-help-modal pre {
  155. border-width: 0;
  156. box-shadow: none;
  157. border-radius: 0;
  158. margin-top: 8px;
  159. }
  160. .onpage-help-modal .modal-title code {
  161. font-size: @base-font-size;
  162. }
  163. .onpage-help-modal .modal-body {
  164. font-size: @base-font-size + 1;
  165. }
  166. }
  167. .enable_onpage_help();