_button.scss 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  2. // For licensing, see LICENSE.md or http://ckeditor.com/license
  3. /**
  4. * Implements a button of given background color.
  5. *
  6. * @param {String} $background - Background color of the button.
  7. * @param {String} $border - Border color of the button.
  8. */
  9. @mixin ck-button-colors( $background, $border, $offset: 0 ) {
  10. background: ck-color( $background, $offset );
  11. border-color: ck-color( $border, $offset );
  12. &:not(.ck-disabled) {
  13. &:hover,
  14. &:focus {
  15. background: ck-color( $background, $offset - 10 );
  16. border-color: ck-color( $border, $offset - 10 );
  17. }
  18. &:active {
  19. background: ck-color( $background, $offset - 15 );
  20. border-color: ck-color( $border, $offset - 15 );
  21. box-shadow: inset 0 2px 2px ck-color( $background, $offset - 25 );
  22. }
  23. }
  24. // https://github.com/ckeditor/ckeditor5-theme-lark/issues/98
  25. &.ck-disabled {
  26. background: ck-color( $background, $offset + 10 );
  27. border-color: ck-color( $border, $offset + 10 );
  28. }
  29. }
  30. /**
  31. * A helper to define button–specific icon styles.
  32. *
  33. */
  34. @mixin ck-button-icon {
  35. .ck-icon {
  36. @content;
  37. }
  38. }