woocommerce/plugins/woocommerce-blocks/assets/js/blocks/checkout/inner-blocks/checkout-fields-block/style.scss

56 lines
1.2 KiB
SCSS
Raw Normal View History

.wc-block-checkout__form {
margin: 0;
max-width: 100%;
}
.is-mobile,
.is-small,
.is-medium {
.wc-block-checkout__main {
order: 1;
}
}
.is-small,
.is-medium,
.is-large {
.wc-block-checkout__shipping-fields,
.wc-block-checkout__billing-fields {
.wc-block-components-address-form {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 0 calc(#{$gap-smaller} * 2); // Required for spacing especially when using flex-grow
.wc-block-components-text-input,
.wc-block-components-state-input,
.wc-block-components-select-input {
flex: 1 0 calc(50% - #{$gap-small}); // "flex-grow = 1" allows the input to grow to fill the space
box-sizing: border-box;
&:nth-of-type(2),
&:first-of-type {
margin-top: 0;
}
}
.wc-block-components-address-form__company,
.wc-block-components-address-form__address_1,
.wc-block-components-address-form__address_2,
Add Checkbox support for Additional Fields in Checkout Block (#42780) * Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073 * revert test to what it was * Default to text, if the type supplied is not supported throw an error * Add type for options * Return null if somehow the select made it through without options * Make select fields type enum and add options to schema * Lint fixes * Update plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/address-form/address-form.tsx Co-authored-by: Niels Lange <info@nielslange.de> * Update plugins/woocommerce/src/Blocks/Domain/Services/CheckoutFields.php Co-authored-by: Niels Lange <info@nielslange.de> * Update checks to log errors and fail gracefully * Add field id to class names * Fix lint error * Fix short array use * Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073 * Default to text, if the type supplied is not supported throw an error * Lint fixes * Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073 * add support for registering checkboxes * remove extra error log * add styling * fix rebase conflit * fix rebase conflit 2 * fix linter errors * address review comments * add warning for checkbox * fix changes --------- Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com> Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> Co-authored-by: Niels Lange <info@nielslange.de>
2023-12-18 12:21:36 +00:00
.wc-block-components-country-input,
.wc-block-components-checkbox {
flex: 0 0 100%;
}
}
}
.wc-block-components-address-form {
.wc-block-components-checkbox {
margin-top: $gap;
}
.wc-block-components-text-input.wc-block-components-address-form__email {
&:only-child {
margin-top: 0;
}
}
}
}