<commit_before>@import '~design-system/scss/config/';

.bodyDecrypted {
    /* Forbidden property on almost ALL clients IE add a space :) */
    [style*='position:absolute'],
    [style*='position: absolute'] {
        position: relative !important;
    }

    table {
        table-layout: auto;
    }

    pre code {
        white-space: pre-wrap;
        background-color: transparent;
    }

    .protonmail_quote {
        padding: .2em 0 .2em 1.2em;
        border-color: #657ee4;
        border-left-width: 3px;
        border-left-style: solid;
    }
    .protonmail_quote .protonmail_quote .protonmail_quote .protonmail_quote .protonmail_quote .protonmail_quote {
        padding-left: 0;
        padding-right: 0;
	    border-left-width: 0;
    }

    // This is needed by the link handler (useLinkHandler.ts)
    a *:not(img) {
        pointer-events: none;
    }

    // fix for some embedded images bugs
    img {
        max-width: none;
    }

    * {
        line-height: normal;
    }
}

.bodyDecrypted.plain {
    white-space: pre-wrap;
    font-family: $font-family-monospace;
}

/* Also exist inside squireEditor.js */
.proton-embedded:not([src]) {
    position: relative;
    min-height: 38px; /* placeholder */
    border: 1px solid;
    border-color: #444 #ccc #ccc #444;
    background: url('../../assets/broken-img.png') no-repeat 0 50% #fff;
}

/** safari can't override the img border on non-src img
    chrome can't override the img border on non-src, non-alt img
    so to not display double border remove our border **/
.ua-chrome .proton-embedded:not([src]):not([alt]),
.ua-safari .proton-embedded:not([src]) {
    border: 0;
}

/** ie, edge, safari can't add ::after content properly on alt img, so offset our background to compensate for their forced text */
.ua-ie .proton-embedded[alt]:not([src]),
.ua-edge .proton-embedded[alt]:not([src]),
.ua-safari .proton-embedded[alt]:not([src]) {
    background-position-y: 80%;
}

/** browser bug? img without alt does not get ::after element, so display the broken img background in the middle */
.proton-embedded:not([src]):not([alt]) {
    background-position-x: 50%;
}

/** img with ALT but not SRC we can display ::after on chrome and firefox */
.proton-embedded[alt]:not([src])::after {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: ' ' attr(alt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 0 0 20px;
    color: rgba(0, 0, 0, 0.5);
    background: url('../../assets/broken-img.png') no-repeat 0 50% #fff; /* override the background in far left */
}

/* Responsiveness of our embedded images */

.proton-embedded:not([width]):not([style*='width']) {
    /*  1. do not handle responsivess if there is a width attribute / inline width style
        2. do not set auto height as long as it's not need to handle our embedded images (no height attribute)
        3. set at least a min width or it's possible it won't be shown
        4. remove min-width when image loaded - for tiny images
    */
    max-width: 100%;
    min-width: 38px;
    &[src] {
        min-width: 0;
    }
}
<commit_msg>[MAILWEB-1686] Hide empty signature block in MessageView<commit_after>@import '~design-system/scss/config/';

.bodyDecrypted {
    /* Forbidden property on almost ALL clients IE add a space :) */
    [style*='position:absolute'],
    [style*='position: absolute'] {
        position: relative !important;
    }

    table {
        table-layout: auto;
    }

    pre code {
        white-space: pre-wrap;
        background-color: transparent;
    }

    .protonmail_quote {
        padding: 0.2em 0 0.2em 1.2em;
        border-color: #657ee4;
        border-left-width: 3px;
        border-left-style: solid;
    }
    .protonmail_quote .protonmail_quote .protonmail_quote .protonmail_quote .protonmail_quote .protonmail_quote {
        padding-left: 0;
        padding-right: 0;
        border-left-width: 0;
    }

    // This is needed by the link handler (useLinkHandler.ts)
    a *:not(img) {
        pointer-events: none;
    }

    // fix for some embedded images bugs
    img {
        max-width: none;
    }

    * {
        line-height: normal;
    }
}

.bodyDecrypted.plain {
    white-space: pre-wrap;
    font-family: $font-family-monospace;
}

/* Also exist inside squireEditor.js */
.proton-embedded:not([src]) {
    position: relative;
    min-height: 38px; /* placeholder */
    border: 1px solid;
    border-color: #444 #ccc #ccc #444;
    background: url('../../assets/broken-img.png') no-repeat 0 50% #fff;
}

.protonmail_signature_block-empty {
    display: none;
}

/** safari can't override the img border on non-src img
    chrome can't override the img border on non-src, non-alt img
    so to not display double border remove our border **/
.ua-chrome .proton-embedded:not([src]):not([alt]),
.ua-safari .proton-embedded:not([src]) {
    border: 0;
}

/** ie, edge, safari can't add ::after content properly on alt img, so offset our background to compensate for their forced text */
.ua-ie .proton-embedded[alt]:not([src]),
.ua-edge .proton-embedded[alt]:not([src]),
.ua-safari .proton-embedded[alt]:not([src]) {
    background-position-y: 80%;
}

/** browser bug? img without alt does not get ::after element, so display the broken img background in the middle */
.proton-embedded:not([src]):not([alt]) {
    background-position-x: 50%;
}

/** img with ALT but not SRC we can display ::after on chrome and firefox */
.proton-embedded[alt]:not([src])::after {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: ' ' attr(alt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 0 0 20px;
    color: rgba(0, 0, 0, 0.5);
    background: url('../../assets/broken-img.png') no-repeat 0 50% #fff; /* override the background in far left */
}

/* Responsiveness of our embedded images */

.proton-embedded:not([width]):not([style*='width']) {
    /*  1. do not handle responsivess if there is a width attribute / inline width style
        2. do not set auto height as long as it's not need to handle our embedded images (no height attribute)
        3. set at least a min width or it's possible it won't be shown
        4. remove min-width when image loaded - for tiny images
    */
    max-width: 100%;
    min-width: 38px;
    &[src] {
        min-width: 0;
    }
}
{'fraction_non_alphanumeric': 0.13624359173528042, 'fraction_numerical': 0.01895292838278701, 'mean_word_length': 2.6662870159453305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '255754', 'n_tokens_mistral': 2223, 'n_tokens_neox': 2056, 'n_words': 637}