vc_mixins.less 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. // For clearing floats like a boss h5bp.com/q
  2. .vc_clearfix {
  3. &:before,
  4. &:after {
  5. display: table;
  6. content: "";
  7. }
  8. &:after {
  9. clear: both;
  10. }
  11. }
  12. // Mixins 4.0
  13. //Button variants mixin
  14. .vc_btn_variants(@color, @txt_color) {
  15. background-color: @color;
  16. color: @txt_color !important; // TODO: WTF? why it is not rendering?
  17. .transition(all 0.5s);
  18. &:hover {
  19. background-color: darken(@color, 6%);
  20. color: darken(@txt_color, 3%) !important;
  21. }
  22. &.vc_btn_outlined,
  23. &.vc_btn_square_outlined {
  24. color: @color !important;
  25. &:hover {
  26. border-color: darken(@color, 6%);
  27. }
  28. }
  29. &.vc_btn_3d {
  30. .box-shadow(0 5px 0 darken(@color, 11%));
  31. margin-bottom: 5px;
  32. &.vc_btn_xs {
  33. .box-shadow(0 3px 0 darken(@color, 11%));
  34. margin-bottom: 3px;
  35. }
  36. &.vc_btn_sm {
  37. .box-shadow(0 4px 0 darken(@color, 11%));
  38. margin-bottom: 4px;
  39. }
  40. }
  41. }
  42. .vc_heading(@font_size) {
  43. font-weight: normal;
  44. font-size: @font_size;
  45. color: inherit;
  46. }
  47. .vc_box-heading {
  48. .border-top-radius(1px);
  49. background: @vc_modal_header_bg_color;
  50. color: @vc_modal_header_color;
  51. padding: 10px 15px;
  52. .vc_icon {
  53. width: 15px;
  54. height: 18px;
  55. display: block;
  56. }
  57. // TODO: refactor with SMCSS
  58. .vc_close {
  59. margin-top: 2px;
  60. float: right;
  61. display: block;
  62. &:focus {
  63. -webkit-box-shadow: none;
  64. -moz-box-shadow: none;
  65. box-shadow: none;
  66. }
  67. .vc_icon {
  68. background: transparent url(../vc/fe/close_panel.png) center center;
  69. }
  70. }
  71. .vc_minimize {
  72. margin-top: 2px;
  73. margin-right: 2px;
  74. float: right;
  75. display: block;
  76. .vc_icon {
  77. background: transparent url(../vc/fe/modal_minimize.png) center center;
  78. }
  79. }
  80. .vc_transparent {
  81. margin-top: 2px;
  82. margin-right: 8px;
  83. float: right;
  84. display: block;
  85. .vc_icon {
  86. background: transparent url(../vc/fe/eye_ico.png) center center no-repeat;
  87. }
  88. }
  89. }
  90. .vc_edit_color_option_variants(@selector, @color, @txt_color) {
  91. .@{selector} {
  92. background-color: @color !important;
  93. color: @txt_color !important;
  94. }
  95. }
  96. .greyGradient() {
  97. background: #f1f1f1;
  98. background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
  99. background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
  100. background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9);
  101. background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9);
  102. background-image: linear-gradient(to top, #ececec, #f9f9f9);
  103. border: 1px solid #dfdfdf !important;
  104. -webkit-box-shadow: inset 0 1px 0 #fff;
  105. box-shadow: inset 0 1px 0 #fff;
  106. }
  107. // CSS3 PROPERTIES
  108. // --------------------------------------------------
  109. // Border Radius
  110. .border-radius(@radius) {
  111. -webkit-border-radius: @radius;
  112. -moz-border-radius: @radius;
  113. border-radius: @radius;
  114. }
  115. // COMPONENT MIXINS
  116. // --------------------------------------------------
  117. // Button backgrounds
  118. // ------------------
  119. .buttonBackground(@startColor, @endColor) {
  120. background-color: @startColor;
  121. // in these cases the gradient won't cover the background, so we override
  122. &:hover, &:active, &.active, &.disabled, &[disabled] {
  123. background-color: @endColor;
  124. }
  125. }
  126. .no_bullet_fix() {
  127. background-image: none;
  128. list-style: none !important;
  129. &:after,
  130. &:before {
  131. display: none !important;
  132. }
  133. }
  134. //Transition
  135. .wpb_transition(@param: all, @time: 0.2s, @easing: linear) {
  136. transition: @param @time @easing;
  137. -moz-transition: @param @time @easing;
  138. -webkit-transition: @param @time @easing;
  139. -o-transition: @param @time @easing;
  140. }
  141. .wpb_transform(@param) {
  142. -webkit-transform: @param;
  143. -moz-transform: @param;
  144. -ms-transform: @param;
  145. -o-transform: @param;
  146. transform: @param;
  147. }
  148. .wpb_border_radius(@radius: 5px) {
  149. -webkit-border-radius: @radius;
  150. -moz-border-radius: @radius;
  151. border-radius: @radius;
  152. }
  153. // Mixins 4.0
  154. //Button variants mixin
  155. .vc_btn_variants(@selector, @color, @txt_color) {
  156. &@{selector} {
  157. .vc_btn_variants(@color, @txt_color);
  158. }
  159. }
  160. .vc_frontend-editor-invisibility-settings {
  161. display: block !important;
  162. .opacity(.5);
  163. .vc_controls, &.vc_section + .vc_controls, &.vc_section + .vc_row-full-width + .vc_controls {
  164. .vc_btn-content {
  165. background-color: #CCC !important;
  166. border-color: #CCC !important;
  167. &:hover {
  168. background-color: #b3b3b3 !important;
  169. border-color: #b3b3b3 !important;
  170. }
  171. }
  172. .vc_control-btn-append:before {
  173. border-bottom-color: #CCC !important;
  174. }
  175. .vc_control-btn-append:hover:before {
  176. border-bottom-color: #b3b3b3 !important;
  177. }
  178. }
  179. &.vc_section + .vc_controls, &.vc_section + .vc_row-full-width + .vc_controls {
  180. .vc_btn-content {
  181. .opacity(.5);
  182. }
  183. }
  184. }
  185. .vc_backend-editor-invisibility-settings {
  186. display: block !important;
  187. .vc_controls {
  188. .vc_btn-content {
  189. background-color: #CCC !important;
  190. border-color: #CCC !important;
  191. &:hover {
  192. background-color: #b3b3b3 !important;
  193. border-color: #b3b3b3 !important;
  194. }
  195. }
  196. }
  197. > * {
  198. .opacity(.5) !important;
  199. }
  200. }
  201. .vc-empty {
  202. outline: 1px dotted @vc_border_color;
  203. min-height: 50px;
  204. position: relative;
  205. cursor: pointer;
  206. .box-sizing(border-box);
  207. &:after {
  208. font-family: 'vcpb-plugin-icons' !important;
  209. speak: none;
  210. font-style: normal;
  211. font-weight: bold;
  212. font-variant: normal;
  213. text-transform: none;
  214. -webkit-font-smoothing: antialiased;
  215. -moz-osx-font-smoothing: grayscale;
  216. content: @vc-c-icon-add_element;
  217. color: #848C92;
  218. font-size: 20px;
  219. top: 0;
  220. left: 0;
  221. right: 0;
  222. bottom: 0;
  223. margin: auto;
  224. z-index: 0;
  225. height: 30px;
  226. width: 30px;
  227. line-height: 30px;
  228. text-align: center;
  229. position: absolute;
  230. }
  231. }
  232. .vc_bg_color_variants(@color) {
  233. .vc_bg-@{color} {
  234. background-color: @@color;
  235. }
  236. }
  237. // End Mixins