8
0

button.css 2.4 KB

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