.highlight { background: var(--highlight-background); margin-bottom: 26px; //TODO Need fixed the copy button show position. div:first-child { overflow-x: auto; } pre { position: relative; overflow-x: auto; } table tbody tr { //TODO Fixed the too long code line over // layout background color. background: #272822; } /* pre > code span { white-space: break-spaces; overflow: hidden; word-break: break-all; word-wrap: break-word; } */ } @if $codeblock_copy_btn_enable { .highlight:hover .copy-btn, pre:hover .copy-btn { opacity: 1; } .copy-btn { color: $black-dim; cursor: pointer; line-height: 1.6; opacity: 0; padding: 2px 6px; position: absolute; right: 8px; top: 4px; transition: opacity $transition-ease; background: var(--highlight-background); @if $codeblock_style == 'flat' { background: white; border: 0; font-size: $font-size-smaller; } @else if $codeblock_style == 'mac' { color: var(--highlight-foreground); font-size: 14px; border-radius: 3px; } @else { background-color: $gainsboro; background-image: linear-gradient(#fcfcfc, $gainsboro); border: 1px solid #d5d5d5; border-radius: 3px; font-size: $font-size-smaller; } } } @if $codeblock_style == 'mac' { .highlight { border-radius: 5px; box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4); padding-top: 30px; .table-container { border-radius: 0 0 5px 5px; } &::before { background: #fc625d; box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b; margin-top: -20px; margin-left: 10px; position: absolute; @include round-icon(12px); } } }