button.css 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. @import "../../../mixins/_focus.css";
  6. @import "../../../mixins/_shadow.css";
  7. @import "../../../mixins/_disabled.css";
  8. @import "../../../mixins/_rounded.css";
  9. @import "../../mixins/_button.css";
  10. .ck-button,
  11. a.ck-button {
  12. @mixin ck-button-colors --ck-color-button-default;
  13. @mixin ck-rounded-corners;
  14. border-width: 1px;
  15. border-style: solid;
  16. white-space: nowrap;
  17. cursor: default;
  18. vertical-align: middle;
  19. padding: var(--ck-spacing-small);
  20. text-align: center;
  21. /* Enable font size inheritance, which allows fluid UI scaling. */
  22. font-size: inherit;
  23. &:focus {
  24. @mixin ck-focus-ring;
  25. @mixin ck-box-shadow var(--ck-focus-outer-shadow);
  26. }
  27. /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */
  28. &.ck-disabled {
  29. @mixin ck-button-icon {
  30. @mixin ck-disabled;
  31. }
  32. /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */
  33. & .ck-button__label {
  34. @mixin ck-disabled;
  35. }
  36. }
  37. &.ck-button_with-text {
  38. padding: var(--ck-spacing-small) var(--ck-spacing-standard);
  39. @mixin ck-button-icon {
  40. margin-left: calc(-1 * var(--ck-spacing-small));
  41. margin-right: var(--ck-spacing-small);
  42. }
  43. }
  44. /* A style of the button which is currently on, e.g. its feature is active. */
  45. &.ck-on {
  46. @mixin ck-button-colors --ck-color-button-on;
  47. }
  48. & .ck-icon {
  49. use,
  50. use * {
  51. color: inherit;
  52. }
  53. }
  54. & .ck-button__label {
  55. /* Enable font size inheritance, which allows fluid UI scaling. */
  56. font-size: inherit;
  57. height: var(--ck-line-height-base)em;
  58. line-height: inherit;
  59. font-weight: inherit;
  60. color: inherit;
  61. cursor: inherit;
  62. }
  63. }
  64. /* A style of the button which handles the primary action. */
  65. .ck-button-action,
  66. a.ck-button-action {
  67. @mixin ck-button-colors --ck-color-button-action;
  68. text-shadow: 0 -1px var(--ck-color-button-action-border);
  69. color: var(--ck-color-button-action-text);
  70. &:hover,
  71. &:focus,
  72. &:active {
  73. text-shadow: 0 -1px var(--ck-color-button-action-active-border);
  74. }
  75. }
  76. .ck-button-bold,
  77. a.ck-button-bold {
  78. font-weight: bold;
  79. }