暫無描述

helper.scss 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092
  1. /*------------------------------------------------------------------------------
  2. General table styling
  3. ------------------------------------------------------------------------------*/
  4. $white: #fff;
  5. // Grays
  6. $gray: #87a6bc;
  7. $gray-light: lighten($gray, 33%); //#f3f6f8
  8. $gray-dark: darken($gray, 38%); //#2e4453
  9. // $gray-text: ideal for standard, non placeholder text
  10. // $gray-text-min: minimum contrast needed for WCAG 2.0 AA on white background
  11. $gray-text: $gray-dark;
  12. $gray-text-min: darken($gray, 18%); //#537994
  13. $woo_pink1: #955a89;
  14. $woo_pink2: #bb77ae;
  15. $color_text_blue: #0073aa;
  16. $color_button_primary: $woo_pink1;
  17. $color_button_secondary: $woo_pink2;
  18. /*------------------------------------------------------------------------------
  19. Tab navigation
  20. ------------------------------------------------------------------------------*/
  21. .wc-helper {
  22. .nav-tab-wrapper {
  23. margin-bottom: 22px;
  24. }
  25. @media only screen and (max-width: 784px) {
  26. .nav-tab {
  27. max-width: 40%;
  28. overflow: hidden;
  29. text-overflow: ellipsis;
  30. }
  31. }
  32. }
  33. /*------------------------------------------------------------------------------
  34. Buttons
  35. ------------------------------------------------------------------------------*/
  36. .wc-helper {
  37. .button,
  38. .button:hover,
  39. .button:focus,
  40. .button:active {
  41. background-color: $color_button_primary;
  42. border-width: 0;
  43. box-shadow: none;
  44. border-radius: 3px;
  45. color: #fff;
  46. height: auto;
  47. padding: 3px 14px;
  48. text-align: center;
  49. white-space: normal !important;
  50. @media only screen and (max-width: 782px) {
  51. line-height: 2;
  52. }
  53. &.button-secondary {
  54. background-color: #e6e6e6;
  55. color: #3c3c3c;
  56. text-shadow: none;
  57. }
  58. }
  59. .button:hover {
  60. opacity: 0.8;
  61. }
  62. }
  63. .wc-helper .subscription-filter {
  64. color: #2e4453;
  65. font-size: 13px;
  66. line-height: 13px;
  67. margin: 22px 0;
  68. label {
  69. display: none;
  70. position: relative;
  71. .chevron {
  72. color: #e1e1e1;
  73. border-bottom-width: 0;
  74. line-height: 1;
  75. padding: 0;
  76. position: absolute;
  77. top: 10px;
  78. right: 14px;
  79. }
  80. }
  81. li {
  82. color: #0073aa;
  83. display: inline-block;
  84. padding: 0 4px 0 8px;
  85. position: relative;
  86. &::before {
  87. background-color: #979797;
  88. content: " ";
  89. position: absolute;
  90. top: 0;
  91. left: 0;
  92. bottom: 0;
  93. width: 1px;
  94. }
  95. &:first-of-type {
  96. &::before {
  97. display: none;
  98. }
  99. }
  100. }
  101. a {
  102. color: #0073aa;
  103. text-decoration: none;
  104. &.current {
  105. color: #000;
  106. font-weight: 600;
  107. }
  108. }
  109. .count {
  110. color: #555d66;
  111. font-weight: 400;
  112. }
  113. @media only screen and (max-width: 600px) {
  114. background-color: #fff;
  115. border: 1px solid #e1e1e1;
  116. border-radius: 4px;
  117. font-size: 14px;
  118. label,
  119. li {
  120. line-height: 21px;
  121. padding: 8px 16px;
  122. margin: 0;
  123. &:last-child {
  124. border-bottom: none;
  125. }
  126. }
  127. li {
  128. border-bottom: 1px solid #e1e1e1;
  129. }
  130. label,
  131. span.chevron {
  132. display: block;
  133. }
  134. label {
  135. text-decoration: none;
  136. }
  137. li {
  138. display: none;
  139. }
  140. li {
  141. &::before {
  142. display: none;
  143. }
  144. }
  145. a {
  146. cursor: pointer;
  147. }
  148. span.chevron {
  149. color: #555;
  150. opacity: 0.5;
  151. transform: rotateX(180deg);
  152. }
  153. &:focus,
  154. &:hover {
  155. box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  156. label {
  157. border-bottom: 1px solid #e1e1e1;
  158. }
  159. li {
  160. display: block;
  161. }
  162. span.chevron {
  163. transform: rotateX(0deg);
  164. }
  165. }
  166. }
  167. }
  168. /*------------------------------------------------------------------------------
  169. Subscriptons Header
  170. ------------------------------------------------------------------------------*/
  171. .wc-helper {
  172. .subscriptions-header {
  173. margin: 3em 0 0;
  174. position: relative;
  175. z-index: 10;
  176. h2 {
  177. display: inline-block;
  178. line-height: 25px;
  179. margin: 0 0 1.5em 0;
  180. }
  181. }
  182. .button-update,
  183. .button-update:hover {
  184. background-color: #e6e6e6;
  185. border-radius: 4px;
  186. color: #333;
  187. font-weight: 800;
  188. font-size: 10px;
  189. line-height: 20px;
  190. margin-left: 6px;
  191. opacity: 0.75;
  192. padding: 3px 7px;
  193. text-transform: uppercase;
  194. .dashicons {
  195. font-size: 12px;
  196. height: 12px;
  197. width: 12px;
  198. vertical-align: text-bottom;
  199. }
  200. }
  201. .button-update:hover {
  202. opacity: 1;
  203. }
  204. .user-info {
  205. background-color: #fff;
  206. border: 1px solid #e1e1e1;
  207. border-radius: 4px;
  208. font-size: 12px;
  209. line-height: 26px;
  210. position: absolute;
  211. top: -10px;
  212. right: 0;
  213. transition: all 0.1s ease-in;
  214. @media only screen and (max-width: 600px) {
  215. position: relative;
  216. width: 100%;
  217. }
  218. p {
  219. line-height: 26px;
  220. margin: 0;
  221. }
  222. &:hover {
  223. box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  224. }
  225. header {
  226. color: #555;
  227. font-weight: 600;
  228. padding: 6px 14px;
  229. position: relative;
  230. p {
  231. padding-right: 26px;
  232. }
  233. .dashicons {
  234. opacity: 0.5;
  235. position: absolute;
  236. top: 9px;
  237. right: 14px;
  238. }
  239. &:hover {
  240. cursor: pointer;
  241. }
  242. }
  243. section {
  244. display: none;
  245. p {
  246. border-top: 1px solid #e1e1e1;
  247. padding: 6px 14px;
  248. text-align: center;
  249. }
  250. .actions {
  251. border-top: 1px solid #e1e1e1;
  252. display: flex;
  253. }
  254. a {
  255. color: #a26897;
  256. cursor: pointer;
  257. font-weight: 600;
  258. line-height: 38px;
  259. padding: 0 14px;
  260. text-align: center;
  261. text-decoration: none;
  262. white-space: nowrap;
  263. width: 50%;
  264. .dashicons {
  265. margin-top: -3px;
  266. vertical-align: middle;
  267. }
  268. &:first-child {
  269. border-right: 1px solid #e1e1e1;
  270. }
  271. &:hover {
  272. background-color: #a26897;
  273. color: #fff;
  274. }
  275. }
  276. .avatar {
  277. border: 1px solid #ece1ea;
  278. border-radius: 50%;
  279. height: auto;
  280. margin-right: 6px;
  281. width: 24px;
  282. vertical-align: bottom;
  283. }
  284. }
  285. }
  286. .user-info:hover,
  287. .user-info:focus,
  288. .user-info:active {
  289. header .dashicons {
  290. transform: rotateX(180deg);
  291. }
  292. section {
  293. display: block;
  294. }
  295. }
  296. }
  297. /*------------------------------------------------------------------------------
  298. Subscripton table
  299. ------------------------------------------------------------------------------*/
  300. .wc-helper {
  301. .striped > tbody > :nth-child(odd),
  302. ul.striped > :nth-child(odd),
  303. .alternate {
  304. background-color: #fff;
  305. }
  306. table.widefat,
  307. .wp-editor-container,
  308. .stuffbox,
  309. p.popular-tags,
  310. .widgets-holder-wrap,
  311. .popular-tags,
  312. .feature-filter,
  313. .imgedit-group,
  314. .comment-ays {
  315. padding-top: 5px;
  316. }
  317. .widefat thead tr th,
  318. .widefat thead tr td,
  319. .widefat tfoot tr th,
  320. .widefat tfoot tr td {
  321. color: #32373c;
  322. padding-bottom: 15px;
  323. padding-top: 10px;
  324. }
  325. .widefat td {
  326. padding-bottom: 15px;
  327. padding-top: 15px;
  328. }
  329. .wp-list-table {
  330. border: 0;
  331. box-shadow: none;
  332. padding-top: 0 !important;
  333. z-index: 1;
  334. }
  335. .button {
  336. @media only screen and (max-width: 782px) {
  337. font-size: 11px;
  338. }
  339. }
  340. .wp-list-table__row {
  341. background-color: rgba(0, 0, 0, 0);
  342. td {
  343. align-items: center;
  344. background-color: #fff;
  345. border: 0;
  346. //border-top: 1px solid #e5e5e5;
  347. padding: 16px 22px;
  348. vertical-align: middle;
  349. @media only screen and (max-width: 782px) {
  350. padding: 16px;
  351. }
  352. }
  353. td.color-bar {
  354. border-left: 0;
  355. }
  356. &.is-ext-header {
  357. td {
  358. border-top: 1px solid #e1e1e1;
  359. }
  360. @media only screen and (max-width: 782px) {
  361. display: inline-flex;
  362. flex-flow: row wrap;
  363. width: 100%;
  364. .wp-list-table__ext-details {
  365. display: block;
  366. flex: 2;
  367. }
  368. .wp-list-table__ext-actions {
  369. display: block;
  370. flex: 1;
  371. min-width: 0;
  372. }
  373. }
  374. }
  375. &:last-child td {
  376. border-bottom: 24px solid #f1f1f1;
  377. box-shadow: inset 0 -1px 0 #e1e1e1;
  378. }
  379. }
  380. .wp-list-table__ext-details,
  381. .wp-list-table__ext-status,
  382. .wp-list-table__licence-container {
  383. padding-right: 22px;
  384. position: relative;
  385. width: 100%;
  386. &::before {
  387. background-color: #e1e1e1;
  388. content: " ";
  389. position: absolute;
  390. top: 0;
  391. bottom: 0;
  392. left: 0 !important;
  393. width: 1px !important;
  394. }
  395. }
  396. .wp-list-table__ext-details {
  397. display: flex;
  398. @media only screen and (max-width: 782px) {
  399. display: table;
  400. }
  401. }
  402. .wp-list-table__ext-title {
  403. color: $color_text_blue;
  404. font-size: 18px;
  405. font-weight: 600;
  406. width: 60%;
  407. @media only screen and (max-width: 782px) {
  408. margin-bottom: 12px;
  409. width: 100%;
  410. }
  411. @media only screen and (max-width: 320px) {
  412. max-width: 120px;
  413. }
  414. }
  415. .wp-list-table__ext-description {
  416. color: #333;
  417. padding-left: 12px;
  418. width: 40%;
  419. @media only screen and (max-width: 782px) {
  420. padding-left: 0;
  421. width: 100%;
  422. }
  423. }
  424. .wp-list-table__ext-status {
  425. position: relative;
  426. &.update-available::after {
  427. background-color: #ffc322;
  428. content: " ";
  429. position: absolute;
  430. top: 0;
  431. left: 0;
  432. bottom: 0;
  433. width: 5px;
  434. }
  435. &.expired::after {
  436. background-color: #b81c23;
  437. content: " ";
  438. position: absolute;
  439. top: 0;
  440. left: 0;
  441. bottom: 0;
  442. width: 5px;
  443. }
  444. .dashicons-update {
  445. color: #ffc322;
  446. }
  447. .dashicons-info {
  448. color: #b81c23;
  449. }
  450. p {
  451. color: #333;
  452. margin: 0;
  453. }
  454. .dashicons {
  455. margin-right: 5px;
  456. }
  457. }
  458. .wp-list-table__ext-actions {
  459. min-width: 150px;
  460. position: relative;
  461. width: 25%;
  462. text-align: right;
  463. &::after {
  464. background-color: #e1e1e1;
  465. content: " ";
  466. position: absolute;
  467. top: 0;
  468. bottom: 0;
  469. right: 0;
  470. width: 1px;
  471. }
  472. }
  473. .wp-list-table__ext-updates,
  474. .wp-list-table__ext-licence {
  475. td {
  476. position: relative;
  477. &::before {
  478. background-color: #e1e1e1;
  479. content: " ";
  480. height: 1px;
  481. position: absolute;
  482. top: 0;
  483. left: 0;
  484. right: 0;
  485. }
  486. }
  487. td.wp-list-table__ext-status,
  488. td.wp-list-table__licence-container {
  489. &::before {
  490. left: 22px !important;
  491. width: auto !important;
  492. }
  493. }
  494. td.wp-list-table__ext-actions::before {
  495. right: 22px;
  496. }
  497. @media only screen and (max-width: 782px) {
  498. display: flex;
  499. .wp-list-table__ext-status {
  500. flex: 2;
  501. &::before {
  502. left: 0 !important;
  503. width: 100% !important;
  504. }
  505. }
  506. .wp-list-table__ext-actions {
  507. flex: 1;
  508. min-width: 0;
  509. &::before {
  510. left: 0 !important;
  511. right: 0 !important;
  512. width: 100% !important;
  513. }
  514. }
  515. }
  516. }
  517. .wp-list-table__licence-container {
  518. padding: 0 !important;
  519. &::after {
  520. background-color: #e1e1e1;
  521. content: " ";
  522. position: absolute;
  523. top: 0;
  524. bottom: 0;
  525. right: 0;
  526. width: 1px;
  527. }
  528. }
  529. .wp-list-table__licence-form {
  530. display: flex;
  531. padding: 16px 22px;
  532. @media only screen and (max-width: 782px) {
  533. display: block;
  534. }
  535. &::before {
  536. background-color: #e1e1e1;
  537. content: " ";
  538. height: 1px;
  539. position: absolute;
  540. top: 0;
  541. right: 22px;
  542. left: 22px;
  543. @media only screen and (max-width: 782px) {
  544. right: 0;
  545. left: 0;
  546. }
  547. }
  548. div {
  549. padding-right: 16px;
  550. vertical-align: middle;
  551. @media only screen and (max-width: 782px) {
  552. padding: 0;
  553. }
  554. }
  555. p {
  556. margin: 0 !important;
  557. }
  558. }
  559. .wp-list-table__licence-label {
  560. label {
  561. color: #23282d;
  562. font-weight: 600;
  563. line-height: 30px;
  564. }
  565. }
  566. .wp-list-table__licence-field {
  567. input {
  568. height: 32px;
  569. @media only screen and (max-width: 480px) {
  570. width: 100%;
  571. }
  572. }
  573. @media only screen and (max-width: 782px) {
  574. padding: 8px 0 16px !important;
  575. }
  576. }
  577. .wp-list-table__licence-actions {
  578. flex-grow: 2;
  579. padding-right: 0 !important;
  580. .button {
  581. margin-right: 8px;
  582. }
  583. .button-secondary {
  584. float: right;
  585. margin: 0 0 0 8px;
  586. }
  587. @media only screen and (max-width: 480px) {
  588. text-align: right;
  589. }
  590. }
  591. }
  592. /*------------------------------------------------------------------------------
  593. Expired notification bar
  594. ------------------------------------------------------------------------------*/
  595. .wc-helper {
  596. td.color-bar {
  597. border-left: solid 4px transparent;
  598. }
  599. td.color-bar.expired {
  600. border-left-color: #b81c23;
  601. }
  602. td.color-bar.expiring {
  603. border-left-color: orange;
  604. }
  605. td.color-bar.update-available {
  606. border-left-color: #8fae1b;
  607. }
  608. td.color-bar.expiring.update-available {
  609. border-left-color: #8fae1b;
  610. }
  611. }
  612. /*------------------------------------------------------------------------------
  613. Connected account table
  614. ------------------------------------------------------------------------------*/
  615. .wc-helper {
  616. .connect-wrapper {
  617. background-color: #fff;
  618. border: 1px solid #e5e5e5;
  619. margin-bottom: 25px;
  620. overflow: auto;
  621. }
  622. .connected {
  623. display: flex;
  624. .user-info {
  625. display: flex;
  626. padding: 20px;
  627. width: 100%;
  628. vertical-align: middle;
  629. }
  630. img {
  631. border: 1px solid #e5e5e5;
  632. height: 34px;
  633. width: 34px;
  634. }
  635. .buttons {
  636. padding: 20px;
  637. white-space: nowrap;
  638. }
  639. p {
  640. flex: 2;
  641. margin: 10px 0 0 20px;
  642. }
  643. .chevron {
  644. display: none;
  645. &:hover {
  646. color: $woo_pink1;
  647. cursor: pointer;
  648. }
  649. }
  650. @media only screen and (max-width: 784px) {
  651. display: block;
  652. strong {
  653. display: block;
  654. overflow: hidden;
  655. text-overflow: ellipsis;
  656. }
  657. p {
  658. margin: 0;
  659. overflow: hidden;
  660. text-overflow: ellipsis;
  661. width: 80%;
  662. }
  663. .user-info {
  664. padding-right: 0;
  665. width: auto;
  666. }
  667. .avatar {
  668. margin-right: 12px;
  669. }
  670. .chevron {
  671. color: #e1e1e1;
  672. display: block;
  673. margin: 10px;
  674. transform: rotateX(0deg);
  675. }
  676. .buttons {
  677. display: none;
  678. border-top: 1px solid #e1e1e1;
  679. padding: 10px 20px;
  680. &.active {
  681. display: block;
  682. }
  683. }
  684. }
  685. }
  686. }
  687. /*------------------------------------------------------------------------------
  688. Initial connection screen
  689. ------------------------------------------------------------------------------*/
  690. .wc-helper {
  691. .start-container {
  692. background-color: #fff;
  693. border-left: 4px solid #cc99c2;
  694. padding: 45px 20px 20px 30px;
  695. position: relative;
  696. overflow: hidden;
  697. h2,
  698. p {
  699. max-width: 800px;
  700. }
  701. }
  702. .start-container::before {
  703. color: #eee2ec;
  704. content: "\e01C";
  705. display: block;
  706. font-family: WooCommerce;
  707. font-size: 192px;
  708. line-height: 1;
  709. position: absolute;
  710. top: 65%;
  711. right: -3%;
  712. text-align: center;
  713. width: 1em;
  714. }
  715. .start-container h2 {
  716. font-size: 24px;
  717. line-height: 29px;
  718. position: relative;
  719. }
  720. .start-container p {
  721. font-size: 16px;
  722. margin-bottom: 30px;
  723. position: relative;
  724. }
  725. .button-helper-connect {
  726. height: 37px;
  727. line-height: 37px;
  728. min-width: 124px;
  729. padding: 0 13px;
  730. text-shadow: none;
  731. &:hover,
  732. &:active,
  733. &:focus {
  734. padding: 0 13px;
  735. }
  736. }
  737. }
  738. // ==========================================================================
  739. // FormToggle
  740. // ==========================================================================
  741. .form-toggle__wrapper {
  742. position: relative;
  743. label {
  744. cursor: default;
  745. }
  746. }
  747. .form-toggle {
  748. cursor: pointer;
  749. display: block;
  750. position: absolute;
  751. top: 0;
  752. bottom: -1px;
  753. left: 0;
  754. right: 0;
  755. text-align: left;
  756. text-indent: -100000px;
  757. z-index: 2;
  758. &:focus {
  759. box-shadow: none;
  760. }
  761. &.disabled {
  762. cursor: default;
  763. }
  764. }
  765. .form-toggle__switch {
  766. align-self: flex-start;
  767. background: lighten($gray, 20%);
  768. border-radius: 12px;
  769. box-sizing: border-box;
  770. display: inline-block;
  771. padding: 2px;
  772. outline: 0;
  773. position: relative;
  774. width: 40px;
  775. height: 24px;
  776. transition: all 0.4s ease, box-shadow 0s;
  777. vertical-align: middle;
  778. &::before,
  779. &::after {
  780. content: "";
  781. display: block;
  782. position: relative;
  783. width: 20px;
  784. height: 20px;
  785. }
  786. &::after {
  787. border-radius: 50%;
  788. background: $white;
  789. left: 0;
  790. transition: all 0.2s ease;
  791. }
  792. &::before {
  793. display: none;
  794. }
  795. .accessible-focus &:focus {
  796. box-shadow: 0 0 0 2px $woo_pink1;
  797. }
  798. }
  799. .form-toggle__label {
  800. vertical-align: bottom;
  801. z-index: 1;
  802. .form-toggle__label-content {
  803. color: #87a6bc;
  804. flex: 0 1 100%;
  805. font-size: 13px;
  806. line-height: 16px;
  807. margin-left: 12px;
  808. margin-right: 8px;
  809. vertical-align: top;
  810. text-transform: uppercase;
  811. @media only screen and (max-width: 480px) {
  812. display: none;
  813. }
  814. }
  815. }
  816. .form-toggle {
  817. .accessible-focus &:focus {
  818. + .form-toggle__label .form-toggle__switch {
  819. box-shadow: 0 0 0 2px $woo_pink1;
  820. }
  821. &:checked + .form-toggle__label .form-toggle__switch {
  822. box-shadow: 0 0 0 2px $woo_pink2;
  823. }
  824. }
  825. & + .form-toggle__label .form-toggle__switch {
  826. background: lighten($gray, 10%);
  827. }
  828. &:not(:disabled) {
  829. + .form-toggle__label:hover .form-toggle__switch {
  830. background: lighten($gray, 20%);
  831. }
  832. }
  833. &.active {
  834. + .form-toggle__label .form-toggle__switch {
  835. background: $woo_pink1;
  836. &::after {
  837. left: 8px;
  838. }
  839. }
  840. + .form-toggle__label:hover .form-toggle__switch {
  841. background: $woo_pink2;
  842. }
  843. }
  844. &.disabled {
  845. + label.form-toggle__label span.form-toggle__switch {
  846. opacity: 0.25;
  847. }
  848. }
  849. }
  850. // Classes for toggle state before action is complete (updating plugin or something)
  851. .form-toggle.is-toggling {
  852. + .form-toggle__label .form-toggle__switch {
  853. background: $woo_pink1;
  854. }
  855. &:checked {
  856. + .form-toggle__label .form-toggle__switch {
  857. background: lighten($gray, 20%);
  858. }
  859. }
  860. }
  861. .form-toggle.is-compact {
  862. + .form-toggle__label .form-toggle__switch {
  863. border-radius: 8px;
  864. width: 24px;
  865. height: 16px;
  866. &::before,
  867. &::after {
  868. height: 12px;
  869. width: 12px;
  870. }
  871. }
  872. &:checked {
  873. + .form-toggle__label .form-toggle__switch {
  874. &::after {
  875. left: 8px;
  876. }
  877. }
  878. }
  879. }