_utility.scss 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //Utility classes for Block styles/Patterns:
  2. //Apply to Image block when we don't want margin bottom before caption
  3. .image-no-margin {
  4. margin: 0;
  5. & * { //Removes any whitespace created by child elements (a div on the editor, and an image or link on the frontend)
  6. vertical-align: bottom;
  7. }
  8. }
  9. //Removes padding on Column block when it has a background color
  10. .has-background-no-padding.wp-block-columns.has-background {
  11. padding: 0;
  12. }
  13. // For when we do not want the vertical block gap. Needed until we have per-block margin controls.
  14. .mt-0 {
  15. margin-top: 0 !important;
  16. }
  17. // Provided to allow a group to prevent the standard gap from being used between elements
  18. .gapless-group {
  19. > * {
  20. margin-top: 0 !important;
  21. }
  22. }
  23. /*
  24. Remove the normalized box-sizing: border-box when used with Woo's quantity field,
  25. because Woo limits the field's width to 50px,
  26. which leaves no space for the context between 50px and 20px padding and the spinner arrows (that come from type=number)
  27. See: https://github.com/Automattic/wp-calypso/issues/58958#issuecomment-1015263777
  28. */
  29. .quantity .qty {
  30. box-sizing: content-box;
  31. }