button.css 2.1 KB

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