button.css 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. /* Enable font size inheritance, which allows fluid UI scaling. */
  21. font-size: inherit;
  22. &:focus {
  23. @mixin ck-focus-ring;
  24. @mixin ck-box-shadow var(--ck-focus-outer-shadow);
  25. }
  26. @mixin ck-button-icon {
  27. float: left;
  28. }
  29. /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */
  30. &.ck-disabled {
  31. @mixin ck-button-icon {
  32. @mixin ck-disabled;
  33. }
  34. /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */
  35. & .ck-button__label {
  36. @mixin ck-disabled;
  37. }
  38. }
  39. &.ck-button_with-text {
  40. padding: var(--ck-spacing-small) var(--ck-spacing-standard);
  41. @mixin ck-button-icon {
  42. margin-left: calc(-1 * var(--ck-spacing-small));
  43. margin-right: var(--ck-spacing-small);
  44. }
  45. & .ck-button__label {
  46. display: block;
  47. }
  48. }
  49. /* A style of the button which is currently on, e.g. its feature is active. */
  50. &.ck-on {
  51. @mixin ck-button-colors --ck-color-button-on;
  52. }
  53. & .ck-icon {
  54. use,
  55. use * {
  56. color: inherit;
  57. }
  58. }
  59. & .ck-button__label {
  60. /* Enable font size inheritance, which allows fluid UI scaling. */
  61. font-size: inherit;
  62. float: left;
  63. height: var(--ck-line-height-base)em;
  64. line-height: inherit;
  65. font-weight: inherit;
  66. color: inherit;
  67. cursor: inherit;
  68. }
  69. }
  70. /* A style of the button which handles the primary action. */
  71. .ck-button-action,
  72. a.ck-button-action {
  73. @mixin ck-button-colors --ck-color-button-action;
  74. text-shadow: 0 -1px var(--ck-color-button-action-border);
  75. color: var(--ck-color-button-action-text);
  76. &:hover,
  77. &:focus,
  78. &:active {
  79. text-shadow: 0 -1px var(--ck-color-button-action-active-border);
  80. }
  81. }
  82. .ck-button-bold,
  83. a.ck-button-bold {
  84. font-weight: bold;
  85. }