DrawioViewer.module.scss 993 B

1234567891011121314151617181920212223242526272829
  1. .drawio-viewer {
  2. margin: 20px 0;
  3. border: 1px solid transparent;
  4. border-radius: 4px;
  5. }
  6. .drawio-viewer * {
  7. box-sizing: content-box;
  8. }
  9. // Revert host-page CSS that leaks into HTML rendered inside <foreignObject>.
  10. // drawio sizes each cell using UA-default HTML metrics and clips overflow via
  11. // an inline max-height wrapper, so non-default styles (e.g. line-height,
  12. // margin from a wrapping `.wiki` ruleset) cause label content to be cut off.
  13. //
  14. // `!important` is required: host selectors such as `.wiki ol:not(.nav) li`
  15. // outrank our scoped selector on specificity (`:not(.nav)` adds a class-level
  16. // weight). Defending the foreignObject content is an adversarial cross-cutting
  17. // concern, so we explicitly opt out of the specificity contest rather than
  18. // chasing host selectors.
  19. //
  20. // See: https://github.com/growilabs/growi/issues/11052
  21. .drawio-viewer foreignObject {
  22. h1, h2, h3, h4, h5, h6,
  23. p, ul, ol, li, blockquote,
  24. img, video, table {
  25. all: revert !important;
  26. }
  27. }