aboutsummaryrefslogtreecommitdiff
path: root/themes/docsy/assets/scss/_code.scss
blob: fa2974393d07f6b47505c078e1d35e838f5aa245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Code formatting.

.td-content {
	// Highlighted code.
    .highlight {
        @extend .card;
        
        margin: 2rem 0;
        padding: 1rem;
        background-color: $gray-100;

        pre, div {
            background-color: inherit !important;
        }

        pre {
            margin: 0;
            padding: 0;
        }
    }

    // Inline code
    p code, li > code, table code {
        color: inherit;
        padding: 0.2em 0.4em;
        margin: 0;
        font-size: 85%;
        word-break: normal;
        background-color: rgba($black, 0.05);
        border-radius: $border-radius;

        br {
            display: none;
        }
    }


    // Code blocks
    pre {
        word-wrap: normal;
        background-color: $gray-100;
        padding: $spacer;
     

        > code {
            padding: 0;
            margin: 0;
            font-size: 100%;
            word-break: normal;
            white-space: pre;
            border: 0;
        }
    }
}