_style.scss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /**
  2. * Button
  3. */
  4. button,
  5. .button,
  6. input[type="submit"],
  7. .wp-block-button__link,
  8. .wp-block-file__button {
  9. // Extend button style
  10. @extend %button-style;
  11. }
  12. /**
  13. * Block Options
  14. */
  15. .wp-block-button {
  16. // Outline Style
  17. &.is-style-outline.wp-block-button__link,
  18. &.is-style-outline .wp-block-button__link {
  19. border: #{map-deep-get($config-button, "border-width")} solid currentcolor;
  20. padding: #{map-deep-get($config-button, "padding", "vertical") - map-deep-get($config-button, "border-width")} #{map-deep-get($config-button, "padding", "horizontal")};
  21. &:not(.has-background) {
  22. background: transparent;
  23. }
  24. &:not(.has-text-color) {
  25. color: #{map-deep-get($config-button, "color", "background")};
  26. }
  27. &:active {
  28. color: #{map-deep-get($config-button, "color", "background")};
  29. }
  30. &:hover,
  31. &:focus,
  32. &.has-focus {
  33. color: #{map-deep-get($config-button, "color", "background-hover")};
  34. }
  35. .has-primary-background-color &:not(.has-text-color) {
  36. color: #{map-deep-get($config-button, "color", "text")};
  37. }
  38. }
  39. // Squared Style
  40. &.is-style-squared,
  41. &.is-style-squared .wp-block-button__link {
  42. border-radius: 0;
  43. }
  44. // Set alignleft as default floating behavior
  45. .entry-content > &:not(.alignleft):not(.alignright) {
  46. @extend %responsive-alignleft;
  47. }
  48. // Set aligndefault as center floating behavior
  49. .entry-content > &.aligncenter {
  50. @extend %responsive-aligndefault;
  51. }
  52. }