@use "sass/scrollbar";

* {
    max-width: 100%;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;

    &:empty::after {
        content: "\a";
        white-space: pre;
    }
}

[hidden] {
    display: none;
}

:host(body),
:host(body) * {
    @include scrollbar.custom;
}

pre {
    white-space: pre-wrap;
}

// image size constraints
img:not(.mathjax) {
    &:not([data-editor-shrink="false"]) {
        :host-context(.shrink-image) & {
            max-width: var(--editor-default-max-width);
            max-height: var(--editor-default-max-height);
        }
    }

    &[data-editor-shrink="true"] {
        max-width: var(--editor-shrink-max-width);
        max-height: var(--editor-shrink-max-height);
    }
}
