_media-gallery.less 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. // /**
  2. // * Copyright © Magento, Inc. All rights reserved.
  3. // * See COPYING.txt for license details.
  4. // */
  5. //
  6. // Image Management Variables
  7. // _____________________________________________
  8. @image-gallery__margin-bottom: 3rem;
  9. @image-gallery-image-hidden__z-index: @image-gallery-image__z-index + 1;
  10. @image-gallery-image__margin: 1.2rem;
  11. @image-gallery-image__z-index: 1;
  12. @image-gallery-image-title__font-size: 1.3rem;
  13. @image-gallery-image-resolution__color: @color-very-dark-gray;
  14. @image-gallery-image-resolution__font-size: @font-size__s;
  15. @image-gallery-placeholder-icon__color: @color-gray80;
  16. @image-gallery-placeholder-icon__size: 6rem;
  17. @image-gallery-placeholder__background: @color-white;
  18. @image-gallery-placeholder__border: 1px solid @color-gray80;
  19. @image-gallery-placeholder__height: 150px;
  20. @image-gallery-placeholder__width: @image-gallery-placeholder__height;
  21. @image-gallery-icons__color: @color-gray62;
  22. @image-gallery-icons__hover__color: @color-gray52;
  23. @image-gallery-action__z-index: @image-gallery-image-hidden__z-index + 1;
  24. @image-gallery-fade__z-index: @image-gallery-action__z-index + 1;
  25. //
  26. // Image Management
  27. // _____________________________________________
  28. .gallery {
  29. &:extend(.abs-clearfix all);
  30. overflow: hidden;
  31. }
  32. .image {
  33. background: @image-gallery-placeholder__background;
  34. box-sizing: border-box;
  35. display: inline-block;
  36. margin: 1.2rem;
  37. position: relative;
  38. vertical-align: top;
  39. width: @image-gallery-placeholder__width;
  40. .product-image-wrapper {
  41. background: @image-gallery-placeholder__background;
  42. border: @image-gallery-placeholder__border;
  43. box-sizing: border-box;
  44. cursor: pointer;
  45. height: @image-gallery-placeholder__height;
  46. line-height: 1;
  47. margin-bottom: @indent__s;
  48. overflow: hidden;
  49. position: relative;
  50. width: @image-gallery-placeholder__width;
  51. &:hover {
  52. .product-image {
  53. opacity: .5;
  54. }
  55. }
  56. }
  57. .product-image {
  58. bottom: 0;
  59. left: 0;
  60. margin: auto;
  61. max-height: 100%;
  62. max-width: 100%;
  63. position: absolute;
  64. right: 0;
  65. top: 0;
  66. z-index: @image-gallery-image__z-index;
  67. }
  68. // Image Placeholder
  69. &.image-placeholder {
  70. height: @image-gallery-placeholder__height;
  71. .product-image-wrapper {
  72. .lib-icon-font(
  73. @icon-camera__content,
  74. @_icon-font: @icons-admin__font-name,
  75. @_icon-font-size: @image-gallery-placeholder-icon__size,
  76. @_icon-font-color: @image-gallery-placeholder-icon__color,
  77. @_icon-font-text-hide: true
  78. );
  79. &:before {
  80. left: 0;
  81. position: absolute;
  82. right: 0;
  83. top: 20px;
  84. z-index: @image-gallery-image__z-index;
  85. }
  86. }
  87. .fileinput-button {
  88. margin: 0;
  89. }
  90. .fileinput-button,
  91. .image-browse { // TODO UI: remove after check on configurable product
  92. bottom: 0;
  93. left: 0;
  94. position: absolute;
  95. right: 0;
  96. top: 0;
  97. > span {
  98. display: none;
  99. }
  100. }
  101. input[type='file'] {
  102. border: 500px solid transparent;
  103. bottom: 0;
  104. cursor: pointer;
  105. font-size: 10em;
  106. height: 100%;
  107. left: 0;
  108. opacity: 0;
  109. position: absolute;
  110. right: 0;
  111. top: 0;
  112. width: 100%;
  113. z-index: @image-gallery-action__z-index;
  114. }
  115. .spinner {
  116. display: none;
  117. }
  118. &.loading,
  119. .file-row {
  120. .spinner {
  121. background: @color-white;
  122. display: block;
  123. height: 100%;
  124. left: 0;
  125. margin: 0;
  126. position: absolute;
  127. top: 0;
  128. width: 100%;
  129. z-index: @image-gallery-fade__z-index;
  130. > span {
  131. left: 50%;
  132. margin: 0 0 0 -@indent__base;
  133. top: 50%;
  134. }
  135. }
  136. }
  137. .file-row {
  138. background: @color-white url("@{baseDir}mui/images/ajax-loader-big.gif") no-repeat 50% 50%;
  139. bottom: 0;
  140. height: 100%;
  141. left: 0;
  142. margin: auto;
  143. overflow: hidden;
  144. position: absolute;
  145. right: 0;
  146. text-indent: -999em;
  147. top: 0;
  148. width: 100%;
  149. z-index: 5;
  150. }
  151. }
  152. .image-placeholder-text {
  153. bottom: 0;
  154. color: @color-blue-dodger;
  155. font-size: @image-gallery-image-title__font-size;
  156. left: 0;
  157. line-height: 1.333;
  158. margin-bottom: 15%;
  159. padding: 0 @indent__s;
  160. position: absolute;
  161. right: 0;
  162. text-align: center;
  163. }
  164. &.ui-sortable-placeholder {
  165. background: @color-blue-clear-sky;
  166. border: 1px solid @color-blue-dodger;
  167. visibility: visible !important;
  168. }
  169. // Actions
  170. .action-remove {
  171. &:extend(.abs-action-reset all);
  172. bottom: 12px;
  173. cursor: pointer;
  174. height: 20px;
  175. left: 6px;
  176. position: absolute;
  177. width: 20px;
  178. z-index: @image-gallery-action__z-index;
  179. .lib-icon-font(
  180. @icon-delete__content,
  181. @_icon-font: @icons-admin__font-name,
  182. @_icon-font-size: 2rem,
  183. @_icon-font-color: @image-gallery-icons__color,
  184. @_icon-font-color-hover: @image-gallery-icons__hover__color,
  185. @_icon-font-text-hide: true,
  186. @_icon-font-display: block
  187. );
  188. }
  189. .draggable-handle {
  190. cursor: move;
  191. height: 20px;
  192. left: 2px;
  193. margin: 0;
  194. position: absolute;
  195. top: 4px;
  196. width: 20px;
  197. z-index: @image-gallery-action__z-index;
  198. .lib-icon-font(
  199. @icon-gripper__content,
  200. @_icon-font: @icons-admin__font-name,
  201. @_icon-font-size: 1.8rem,
  202. @_icon-font-color: @image-gallery-icons__color,
  203. @_icon-font-color-hover: @image-gallery-icons__hover__color
  204. );
  205. }
  206. .image-fade {
  207. .lib-font-size(18);
  208. background: rgba(255, 255, 255, .8);
  209. bottom: 0;
  210. color: @color-gray62;
  211. content: attr(data-image-hidden-label);
  212. font-weight: @font-weight__semibold;
  213. left: 0;
  214. line-height: @image-gallery-placeholder__height;
  215. position: absolute;
  216. right: 0;
  217. text-align: center;
  218. text-transform: uppercase;
  219. top: 0;
  220. visibility: hidden;
  221. z-index: @image-gallery-image-hidden__z-index;
  222. }
  223. &.hidden-for-front {
  224. .image-fade {
  225. visibility: visible;
  226. }
  227. }
  228. .item-description {
  229. margin-bottom: @indent__s;
  230. }
  231. .item-title {
  232. .lib-text-overflow();
  233. font-size: @image-gallery-image-title__font-size;
  234. }
  235. .item-size {
  236. color: @image-gallery-image-resolution__color;
  237. font-size: @image-gallery-image-resolution__font-size;
  238. }
  239. .item-roles {
  240. .lib-list-inline();
  241. font-size: 0;
  242. }
  243. .item-role {
  244. background: @color-gray89;
  245. color: @color-brownie;
  246. font-size: @font-size__s;
  247. line-height: 1;
  248. margin: 0 .4rem .4rem 0;
  249. padding: .6rem;
  250. }
  251. }
  252. //
  253. // Gallery image panel
  254. // ---------------------------------------------
  255. .image-panel {
  256. .lib-vendor-prefix-display(flex);
  257. .lib-vendor-prefix-flex-direction(row);
  258. background: @color-white;
  259. border-bottom: 1px solid @color-gray76;
  260. box-shadow: inset 0 1px 3px @color-gray80;
  261. margin: 0 0 1.5rem;
  262. padding: @indent__base 1.5rem;
  263. .admin__fieldset {
  264. .admin__field:not(.admin__field-inline) {
  265. &:extend(.abs-field-rows all);
  266. }
  267. }
  268. .admin__field-inline {
  269. .admin__field-label {
  270. text-align: left;
  271. width: 30%;
  272. }
  273. .admin__field-value {
  274. overflow: hidden;
  275. padding-left: @indent__base;
  276. }
  277. }
  278. }
  279. .image-panel-controls,
  280. .image-panel-preview {
  281. -ms-flex: 1;
  282. -webkit-box-flex: 1;
  283. -webkit-flex: 1;
  284. box-flex: 1;
  285. flex: 1;
  286. }
  287. .image-panel-preview {
  288. -ms-flex-item-align: center;
  289. -webkit-align-self: center;
  290. align-self: center;
  291. img {
  292. display: block;
  293. margin: auto;
  294. }
  295. }
  296. .image-panel-controls {
  297. -ms-flex: 0 0 33%;
  298. -webkit-box-flex: 0;
  299. -webkit-flex: 0 0 33%;
  300. flex: 0 0 33%;
  301. padding-left: @indent__l;
  302. .image-name {
  303. .lib-font-size(16);
  304. color: @color-gray40;
  305. display: block;
  306. }
  307. .action-delete,
  308. .action-remove {
  309. &:extend(.abs-action-reset all);
  310. margin: 0 0 35px;
  311. .lib-icon-font(
  312. @icon-delete__content,
  313. @_icon-font: @icons-admin__font-name,
  314. @_icon-font-size: 1.8rem,
  315. @_icon-font-color: @image-gallery-icons__color,
  316. @_icon-font-color-hover: @image-gallery-icons__hover__color,
  317. @_icon-font-text-hide: true
  318. );
  319. }
  320. .fieldset-image-panel {
  321. padding: @indent__base @indent__xs 0 0;
  322. .field {
  323. margin-bottom: @indent__s;
  324. }
  325. .label {
  326. margin-bottom: @indent__s;
  327. padding-top: 0;
  328. text-align: left;
  329. width: 100%;
  330. }
  331. }
  332. .fieldset-image-panel .field > .control,
  333. .image-panel-controls textarea {
  334. resize: vertical;
  335. width: 100%;
  336. }
  337. }
  338. .image-file-params {
  339. .lib-font-size(11);
  340. color: @color-gray40;
  341. margin: 0 0 @indent__s;
  342. }
  343. //
  344. // Custom Multiselect
  345. // _____________________________________________
  346. .image-panel-controls,
  347. .gallery {
  348. // ToDo UI: remove after new gallery images editing design implementation
  349. .multiselect-alt {
  350. border: 1px solid @color-gray80;
  351. border-radius: 5px;
  352. color: @color-gray20;
  353. list-style: none;
  354. margin: 0;
  355. padding: 0;
  356. .item {
  357. border-top: 1px solid @color-white;
  358. cursor: pointer;
  359. position: relative;
  360. &:first-child {
  361. border-top: 0;
  362. }
  363. &.selected {
  364. background: @color-blue-clear-sky;
  365. &:hover {
  366. background: darken(@color-blue-clear-sky, 10%);
  367. }
  368. label {
  369. .lib-icon-font(
  370. @icon-check-mage__content,
  371. @_icon-font: @icons-admin__font-name,
  372. @_icon-font-size: 1.4rem,
  373. @_icon-font-color: @color-blue-dodger
  374. );
  375. &:before {
  376. left: 8px;
  377. position: absolute;
  378. top: 6px;
  379. width: 17px;
  380. }
  381. }
  382. }
  383. }
  384. label {
  385. cursor: pointer;
  386. display: block;
  387. padding: 6px @indent__m @indent__xs;
  388. }
  389. input[type='checkbox'] {
  390. height: 0;
  391. margin: 0;
  392. opacity: 0;
  393. padding: 0;
  394. width: 0;
  395. }
  396. }
  397. }
  398. //
  399. // Restore default value
  400. // _____________________________________________
  401. .admin__field-service-gallery {
  402. float: right;
  403. &[data-config-scope] {
  404. &:before {
  405. color: @field-scope__color;
  406. content: attr(data-config-scope);
  407. display: block;
  408. font-size: @font-size__s;
  409. line-height: 3.2rem;
  410. }
  411. }
  412. }