widget.css 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*-----------------------------------------------------------------------------
  2. | Copyright (c) Jupyter Development Team.
  3. | Distributed under the terms of the Modified BSD License.
  4. |----------------------------------------------------------------------------*/
  5. /*-----------------------------------------------------------------------------
  6. | Private CSS variables
  7. |----------------------------------------------------------------------------*/
  8. :root {
  9. --jp-private-cell-scrolling-output-offset: 5px;
  10. }
  11. /*-----------------------------------------------------------------------------
  12. | Cell
  13. |----------------------------------------------------------------------------*/
  14. .jp-Cell {
  15. padding: var(--jp-cell-padding);
  16. margin: 0px;
  17. border: none;
  18. outline: none;
  19. background: transparent;
  20. }
  21. /*-----------------------------------------------------------------------------
  22. | Common input/output
  23. |----------------------------------------------------------------------------*/
  24. .jp-Cell-inputWrapper,
  25. .jp-Cell-outputWrapper {
  26. display: flex;
  27. flex-direction: row;
  28. padding: 0px;
  29. margin: 0px;
  30. /* Added to reveal the box-shadow on the input and output collapsers. */
  31. overflow: visible;
  32. }
  33. /* Only input/output areas inside cells */
  34. .jp-Cell-inputArea,
  35. .jp-Cell-outputArea {
  36. flex: 1 1 auto;
  37. }
  38. /*-----------------------------------------------------------------------------
  39. | Collapser
  40. |----------------------------------------------------------------------------*/
  41. /* Make the output collapser disappear when there is not output, but do so
  42. * in a manner that leaves it in the layout and preserves its width.
  43. */
  44. .jp-Cell.jp-mod-noOutputs .jp-Cell-outputCollapser {
  45. border: none !important;
  46. background: transparent !important;
  47. }
  48. .jp-Cell:not(.jp-mod-noOutputs) .jp-Cell-outputCollapser {
  49. min-height: var(--jp-cell-collapser-min-height);
  50. }
  51. /*-----------------------------------------------------------------------------
  52. | Output
  53. |----------------------------------------------------------------------------*/
  54. /* Put a space between input and output when there IS output */
  55. .jp-Cell:not(.jp-mod-noOutputs) .jp-Cell-outputWrapper {
  56. margin-top: 5px;
  57. }
  58. /* Text output with the Out[] prompt needs a top padding to match the
  59. * alignment of the Out[] prompt itself.
  60. */
  61. .jp-OutputArea-executeResult .jp-RenderedText.jp-OutputArea-output {
  62. padding-top: var(--jp-code-padding);
  63. }
  64. .jp-CodeCell.jp-mod-outputsScrolled .jp-Cell-outputArea {
  65. overflow-y: auto;
  66. max-height: 200px;
  67. box-shadow: inset 0 0 6px 2px rgba(0, 0, 0, 0.3);
  68. margin-left: var(--jp-private-cell-scrolling-output-offset);
  69. }
  70. .jp-CodeCell.jp-mod-outputsScrolled .jp-OutputArea-prompt {
  71. flex: 0 0
  72. calc(
  73. var(--jp-cell-prompt-width) -
  74. var(--jp-private-cell-scrolling-output-offset)
  75. );
  76. }
  77. /*-----------------------------------------------------------------------------
  78. | CodeCell
  79. |----------------------------------------------------------------------------*/
  80. /*-----------------------------------------------------------------------------
  81. | MarkdownCell
  82. |----------------------------------------------------------------------------*/
  83. .jp-MarkdownOutput {
  84. flex: 1 1 auto;
  85. margin-top: 0;
  86. margin-bottom: 0;
  87. padding-left: var(--jp-code-padding);
  88. }
  89. .jp-MarkdownOutput.jp-RenderedHTMLCommon {
  90. overflow: visible;
  91. }