PageRenderTime 43ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/app/design/frontend/Magento/luma/Magento_Customer/web/css/source/_module.less

https://gitlab.com/crazybutterfly815/magento2
LESS | 545 lines | 428 code | 89 blank | 28 comment | 0 complexity | 7922ff6a972e596cbfcaecbf7864980b MD5 | raw file
  1. // /**
  2. // * Copyright © 2016 Magento. All rights reserved.
  3. // * See COPYING.txt for license details.
  4. // */
  5. //
  6. // Variables
  7. // _____________________________________________
  8. @account-title-border-color: @color-gray-middle2;
  9. @account-table-border-bottom-color: @color-gray-middle1;
  10. @account-table-action-delete: @color-red12;
  11. @_password-default: @color-gray-light01;
  12. @_password-weak: #ffafae;
  13. @_password-medium: #ffd6b3;
  14. @_password-strong: #c5eeac;
  15. @_password-very-strong: #81b562;
  16. //
  17. // Common
  18. // _____________________________________________
  19. & when (@media-common = true) {
  20. .login-container {
  21. .block {
  22. &-new-customer {
  23. .actions-toolbar {
  24. margin-top: 25px;
  25. }
  26. }
  27. .block-title {
  28. &:extend(.abs-login-block-title all);
  29. .lib-font-size(18);
  30. }
  31. }
  32. .fieldset {
  33. .lib-form-hasrequired(bottom);
  34. &:after {
  35. margin-top: 35px;
  36. }
  37. }
  38. }
  39. .block-addresses-list {
  40. .items.addresses {
  41. > .item {
  42. margin-bottom: @indent__base;
  43. &:last-child {
  44. margin-bottom: 0;
  45. }
  46. }
  47. .item.actions {
  48. margin-top: @indent__xs;
  49. .action {
  50. &:extend(.abs-account-actions all);
  51. }
  52. }
  53. }
  54. address {
  55. &:extend(.abs-account-block-line-height all);
  56. }
  57. }
  58. .form-address-edit {
  59. #region_id {
  60. display: none;
  61. }
  62. .actions-toolbar .action.primary {
  63. &:extend(.abs-button-l all);
  64. }
  65. }
  66. .form-edit-account {
  67. .fieldset.password {
  68. display: none;
  69. }
  70. }
  71. .form-create-account {
  72. .fieldset-fullname {
  73. .fields {
  74. .field {
  75. float: none;
  76. }
  77. }
  78. }
  79. }
  80. .box-billing-address,
  81. .box-shipping-address,
  82. .box-information,
  83. .box-newsletter {
  84. .box-content {
  85. &:extend(.abs-account-block-line-height all);
  86. }
  87. }
  88. // My account
  89. .account {
  90. .page-title-wrapper {
  91. .page-title {
  92. display: inline-block;
  93. }
  94. }
  95. .messages {
  96. margin-bottom: @indent__base;
  97. }
  98. .column.main {
  99. margin-bottom: @indent__l;
  100. h2 {
  101. margin-top: 0;
  102. }
  103. .block:not(.widget) {
  104. &:extend(.abs-account-blocks all);
  105. }
  106. }
  107. .sidebar-additional {
  108. margin-top: @indent__xl;
  109. }
  110. .table-wrapper {
  111. .lib-css(margin-bottom, @indent__base);
  112. border-bottom: 1px solid @account-table-border-bottom-color;
  113. &:last-child {
  114. margin-bottom: 0;
  115. }
  116. }
  117. .legend {
  118. &:extend(.abs-account-title all);
  119. }
  120. }
  121. .account,
  122. [class^='sales-guest-'],
  123. .sales-guest-view {
  124. .column.main {
  125. .order-details-items {
  126. .table-wrapper {
  127. .data.table {
  128. &:extend(.abs-table-striped all);
  129. }
  130. }
  131. }
  132. }
  133. .data.table {
  134. .col.actions {
  135. .action {
  136. &:extend(.abs-account-actions all);
  137. &.delete {
  138. .lib-css(color, @account-table-action-delete);
  139. }
  140. }
  141. }
  142. }
  143. }
  144. // Checkout address (create shipping address)
  145. .field.street {
  146. .field.additional {
  147. .label {
  148. &:extend(.abs-visually-hidden all);
  149. }
  150. }
  151. }
  152. //
  153. // Blocks & Widgets
  154. // ---------------------------------------------
  155. .block {
  156. &:extend(.abs-margin-for-blocks-and-widgets all);
  157. .column.main & {
  158. &:last-child {
  159. margin-bottom: 0;
  160. }
  161. }
  162. .title {
  163. strong {
  164. .lib-heading(h4);
  165. .column.main & {
  166. }
  167. }
  168. margin-bottom: @indent__s;
  169. }
  170. p {
  171. &:last-child {
  172. margin: 0;
  173. }
  174. }
  175. .box-actions {
  176. margin-top: @indent__xs;
  177. .action {
  178. &:extend(.abs-account-actions all);
  179. }
  180. }
  181. }
  182. //
  183. // Password Strength Meter
  184. // ---------------------------------------------
  185. .field.password {
  186. .control {
  187. .lib-vendor-prefix-display();
  188. .lib-vendor-prefix-flex-direction();
  189. .mage-error {
  190. .lib-vendor-prefix-order(2);
  191. }
  192. .input-text {
  193. .lib-vendor-prefix-order(0);
  194. z-index: 2;
  195. }
  196. }
  197. }
  198. .password-strength-meter {
  199. background-color: @_password-default;
  200. height: @form-element-input__height;
  201. line-height: @form-element-input__height;
  202. padding: @form-element-input__padding;
  203. position: relative;
  204. z-index: 1;
  205. &:before {
  206. content: '';
  207. height: 100%;
  208. left: 0;
  209. position: absolute;
  210. top: 0;
  211. z-index: -1;
  212. }
  213. .password-none & {
  214. &:before {
  215. background-color: @_password-default;
  216. width: 100%;
  217. }
  218. }
  219. .password-weak & {
  220. &:before {
  221. background-color: @_password-weak;
  222. width: 25%;
  223. }
  224. }
  225. .password-medium & {
  226. &:before {
  227. background-color: @_password-medium;
  228. width: 50%;
  229. }
  230. }
  231. .password-strong & {
  232. &:before {
  233. background-color: @_password-strong;
  234. width: 75%;
  235. }
  236. }
  237. .password-very-strong & {
  238. &:before {
  239. background-color: @_password-very-strong;
  240. width: 100%;
  241. }
  242. }
  243. }
  244. .control.captcha-image {
  245. .lib-css(margin-top, @indent__s);
  246. .captcha-img {
  247. vertical-align: middle;
  248. }
  249. }
  250. .account {
  251. .data.table-return-items {
  252. .qty {
  253. .input-text {
  254. &:extend(.abs-input-qty all);
  255. }
  256. }
  257. }
  258. }
  259. .order-products-toolbar {
  260. position: relative;
  261. }
  262. }
  263. //
  264. // Desktop
  265. // _____________________________________________
  266. .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
  267. .login-container {
  268. &:extend(.abs-add-clearfix-desktop all);
  269. .block {
  270. &:extend(.abs-blocks-2columns all);
  271. &.login {
  272. .actions-toolbar {
  273. > .primary {
  274. margin-bottom: 0;
  275. margin-right: @indent__l;
  276. }
  277. > .secondary {
  278. float: left;
  279. }
  280. }
  281. }
  282. }
  283. .fieldset {
  284. > .field {
  285. > .control {
  286. width: 55%;
  287. }
  288. }
  289. }
  290. }
  291. .form-create-account {
  292. .fieldset-fullname {
  293. .fields {
  294. .field {
  295. float: left;
  296. margin: 0 @indent__s @indent__s 0;
  297. }
  298. }
  299. .field-name-prefix,
  300. .field-name-suffix {
  301. width: 50px;
  302. }
  303. }
  304. }
  305. .form.password.reset,
  306. .form.send.confirmation,
  307. .form.password.forget,
  308. .form.create.account {
  309. min-width: 600px;
  310. width: 50%;
  311. }
  312. // My account
  313. .account.page-layout-2columns-left {
  314. .sidebar-main,
  315. .sidebar-additional {
  316. width: 22.3%;
  317. }
  318. .column.main {
  319. width: 77.7%;
  320. }
  321. }
  322. .account {
  323. .page-title-wrapper {
  324. &:extend(.abs-add-clearfix-desktop all);
  325. }
  326. .column.main {
  327. .block:not(.widget) {
  328. .block-content {
  329. &:extend(.abs-add-clearfix-desktop all);
  330. .box {
  331. &:extend(.abs-blocks-2columns all);
  332. }
  333. }
  334. }
  335. }
  336. .data.table {
  337. margin-bottom: 0;
  338. .col {
  339. &.actions {
  340. white-space: nowrap;
  341. }
  342. }
  343. }
  344. .toolbar {
  345. &:extend(.abs-pager-toolbar all);
  346. }
  347. }
  348. .block-addresses-list {
  349. .items.addresses {
  350. &:extend(.abs-add-clearfix-desktop all);
  351. > .item {
  352. &:extend(.abs-blocks-2columns all);
  353. margin-bottom: @indent__base;
  354. &:nth-last-child(1),
  355. &:nth-last-child(2) {
  356. margin-bottom: 0;
  357. }
  358. }
  359. }
  360. address {
  361. &:extend(.abs-account-block-font-size all);
  362. }
  363. }
  364. .page-main {
  365. .block {
  366. &:extend(.abs-margin-for-blocks-and-widgets-desktop all);
  367. }
  368. }
  369. .form-address-edit {
  370. .fieldset {
  371. &:extend(.abs-blocks-2columns all);
  372. }
  373. }
  374. .form-edit-account {
  375. .fieldset {
  376. &:extend(.abs-blocks-2columns all);
  377. .fieldset {
  378. margin-bottom: @indent__base;
  379. width: 100%;
  380. }
  381. }
  382. }
  383. .box-billing-address,
  384. .box-shipping-address,
  385. .box-information {
  386. .box-content {
  387. &:extend(.abs-account-block-font-size all);
  388. }
  389. }
  390. .control.captcha-image {
  391. .captcha-img {
  392. margin: 0 @indent__s @indent__s 0;
  393. }
  394. }
  395. }
  396. //
  397. // Mobile @screen__s
  398. // _____________________________________________
  399. .media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
  400. .account {
  401. .column.main,
  402. .sidebar-additional {
  403. margin: 0;
  404. }
  405. .data.table {
  406. &:extend(.abs-table-striped-mobile all);
  407. }
  408. }
  409. }
  410. //
  411. // Mobile @screen__m
  412. // _____________________________________________
  413. .media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
  414. .login-container {
  415. .fieldset {
  416. &:after {
  417. text-align: center;
  418. }
  419. }
  420. }
  421. .account {
  422. .page.messages {
  423. margin-bottom: @indent__xl;
  424. }
  425. .column.main {
  426. .block:not(.widget) {
  427. .block-title {
  428. &:extend(.abs-add-clearfix-mobile-m all);
  429. > .action {
  430. float: right;
  431. .lib-css(margin-top, @indent__xs);
  432. }
  433. }
  434. .block-content {
  435. .box {
  436. .lib-css(margin-bottom, @indent__base);
  437. &:last-child {
  438. margin-bottom: 0;
  439. }
  440. }
  441. }
  442. }
  443. }
  444. }
  445. .control.captcha-image {
  446. .captcha-img {
  447. display: block;
  448. .lib-css(margin-bottom, @indent__s);
  449. }
  450. }
  451. .customer-account-index {
  452. .page-title-wrapper {
  453. position: relative;
  454. }
  455. }
  456. }