dropdown.css 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. @import "../tooltip/mixins/_tooltip.css";
  6. .ck-dropdown {
  7. display: inline-block;
  8. position: relative;
  9. & .ck-dropdown__arrow {
  10. pointer-events: none;
  11. z-index: var(--ck-z-default);
  12. position: absolute;
  13. top: 50%;
  14. transform: translate3d( 0, -50%, 0 );
  15. }
  16. /* Dropdown button should span horizontally, e.g. in vertical toolbars */
  17. & .ck-button.ck-dropdown__button {
  18. width: 100%;
  19. /* Disable main button's tooltip when the dropdown is open. Otherwise the panel may
  20. partially cover the tooltip */
  21. &.ck-on {
  22. @mixin ck-tooltip_disabled;
  23. }
  24. }
  25. }
  26. .ck-dropdown__panel {
  27. /* This is to get rid of flickering when the tooltip is shown under the panel,
  28. which looks like the panel moves vertically a pixel down and up. */
  29. -webkit-backface-visibility: hidden;
  30. display: none;
  31. z-index: var(--ck-z-modal);
  32. position: absolute;
  33. left: 0px;
  34. transform: translate3d( 0, 100%, 0 );
  35. }
  36. .ck-dropdown__panel-visible {
  37. display: inline-block;
  38. /* This will prevent blurry icons in dropdown on Firefox. See #340. */
  39. will-change: transform;
  40. }