dropdown.css 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. .ck-dropdown {
  9. /* Enable font size inheritance, which allows fluid UI scaling. */
  10. font-size: inherit;
  11. /* A triangle displayed to indicate this is actually a dropdown. */
  12. & .ck-dropdown__icon {
  13. right: var(--ck-spacing-standard);
  14. }
  15. &.ck-disabled .ck-dropdown__icon {
  16. @mixin ck-disabled;
  17. }
  18. & .ck-button.ck-dropdown__button {
  19. /* A space to accommodate the triangle. */
  20. padding-right: calc(2.5 * var(--ck-spacing-standard));
  21. &:not(.ck-button_with-text) {
  22. /* Make sure dropdowns with just an icon have the right inner spacing */
  23. padding-left: var(--ck-spacing-small);
  24. }
  25. /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */
  26. &.ck-disabled .ck-button__label {
  27. @mixin ck-disabled;
  28. }
  29. /* #23 */
  30. & .ck-button__label {
  31. width: 7em;
  32. overflow: hidden;
  33. text-overflow: ellipsis;
  34. }
  35. }
  36. }
  37. .ck-dropdown__panel {
  38. @mixin ck-rounded-corners;
  39. @mixin ck-drop-shadow;
  40. background: var(--ck-color-dropdown-panel-background);
  41. border: 1px solid var(--ck-color-dropdown-panel-border);
  42. /* Compensate double border from button and from box when positioned below the button. */
  43. bottom: 1px;
  44. /* Make sure the panel is at least as wide as the dropdown's button. */
  45. min-width: 100%;
  46. }