8
0

dropdown.css 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.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. }
  13. /* Dropdown button should span horizontally, e.g. in vertical toolbars */
  14. & .ck-button.ck-dropdown__button {
  15. width: 100%;
  16. /* Disable main button's tooltip when the dropdown is open. Otherwise the panel may
  17. partially cover the tooltip */
  18. &.ck-on {
  19. @mixin ck-tooltip_disabled;
  20. }
  21. }
  22. & .ck-dropdown__panel {
  23. /* This is to get rid of flickering when the tooltip is shown under the panel,
  24. which looks like the panel moves vertically a pixel down and up. */
  25. -webkit-backface-visibility: hidden;
  26. display: none;
  27. z-index: var(--ck-z-modal);
  28. position: absolute;
  29. &.ck-dropdown__panel-visible {
  30. display: inline-block;
  31. /* This will prevent blurry icons in dropdown on Firefox. See #340. */
  32. will-change: transform;
  33. }
  34. &.ck-dropdown__panel_ne,
  35. &.ck-dropdown__panel_nw {
  36. bottom: 100%;
  37. }
  38. &.ck-dropdown__panel_se,
  39. &.ck-dropdown__panel_sw {
  40. transform: translate3d( 0, 100%, 0 );
  41. }
  42. &.ck-dropdown__panel_ne,
  43. &.ck-dropdown__panel_se {
  44. left: 0px;
  45. }
  46. &.ck-dropdown__panel_nw,
  47. &.ck-dropdown__panel_sw {
  48. right: 0px;
  49. }
  50. }
  51. }