dropdown.css 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. @import "../../../mixins/_rounded.css";
  6. @import "../../../mixins/_disabled.css";
  7. @import "../../../mixins/_shadow.css";
  8. :root {
  9. --ck-dropdown-icon-size: calc(0.5 * var(--ck-icon-size));
  10. }
  11. .ck-dropdown {
  12. /* Enable font size inheritance, which allows fluid UI scaling. */
  13. font-size: inherit;
  14. & .ck-dropdown__arrow {
  15. right: var(--ck-spacing-standard);
  16. width: var(--ck-dropdown-icon-size);
  17. }
  18. &.ck-disabled .ck-dropdown__arrow {
  19. @mixin ck-disabled;
  20. }
  21. & .ck-button.ck-dropdown__button {
  22. /* A space to accommodate the triangle. */
  23. padding-right: calc(2.5 * var(--ck-spacing-standard));
  24. &:not(.ck-button_with-text) {
  25. /* Make sure dropdowns with just an icon have the right inner spacing */
  26. padding-left: var(--ck-spacing-small);
  27. }
  28. /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */
  29. &.ck-disabled .ck-button__label {
  30. @mixin ck-disabled;
  31. }
  32. /* #23 */
  33. & .ck-button__label {
  34. width: 7em;
  35. overflow: hidden;
  36. text-overflow: ellipsis;
  37. }
  38. }
  39. }
  40. .ck-dropdown__panel {
  41. @mixin ck-rounded-corners;
  42. @mixin ck-drop-shadow;
  43. background: var(--ck-color-dropdown-panel-background);
  44. border: 1px solid var(--ck-color-dropdown-panel-border);
  45. /* Compensate double border from button and from box when positioned below the button. */
  46. bottom: 1px;
  47. /* Make sure the panel is at least as wide as the dropdown's button. */
  48. min-width: 100%;
  49. }