All files / src/components/u-article.vue index.vue

68.42% Statements 13/19
33.33% Branches 2/6
33.33% Functions 1/3
72.22% Lines 13/18

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144      7x     7x             7x           7x 7x             7x 7x 7x 7x 7x 7x 7x           7x                                                                                                                                                                                                                
<template>
<article :class="$style.root">
    <slot></slot>
</article>
</template>
 
<script>
export default { name: 'u-article' };
</script>
 
<style module>
.root {}
 
.root > h1 {
    font-size: var(--article-h1-font-size);
    line-height: 30px;
    margin-bottom: 60px;
}
 
.root > h2 {
    font-size: var(--article-h2-font-size);
    margin: 40px 0 20px;
    line-height: 40px;
    color: var(--article-h2-color);
    border-bottom: 2px solid var(--article-h2-border-color);
}
 
.root > h2 + h3 {
    margin-top: 20px;
}
 
.root > h3 {
    font-size: var(--article-h3-font-size);
    margin: 40px 0 20px;
    padding-left: 0;
}

.root > h4 {
    font-size: var(--article-h4-font-size);
    margin: 25px 0 10px;
}
 
.root > h4::after {
    content: '';
    float: left;
    margin: 10px 0;
    margin-left: -14px;
    top: 50%;
    display: block;
    height: 6px;
    width: 6px;
    background: var(--brand-primary);
    border-radius: 100%;
}
 
.root > h5 {
    font-size: var(--article-h5-font-size);
    margin: 0.3em 0;
}
 
.root > h6 {
    font-size: var(--article-h6-font-size);
}
 
.root > h1 > :global(.heading-anchor),
.root > h2 > :global(.heading-anchor),
.root > h3 > :global(.heading-anchor),
.root > h4 > :global(.heading-anchor),
.root > h5 > :global(.heading-anchor),
.root > h6 > :global(.heading-anchor) {
    display: none;
    float: left;
    margin-left: -1.4em;
    width: 1.4em;
    bottom: 0;
    text-align: center;
}
 
.root > h1:hover > :global(.heading-anchor),
.root > h2:hover > :global(.heading-anchor),
.root > h3:hover > :global(.heading-anchor),
.root > h4:hover > :global(.heading-anchor),
.root > h5:hover > :global(.heading-anchor),
.root > h6:hover > :global(.heading-anchor) {
    display: block;
}
 
.root > h4:hover::after {
    display: none;
}
 
.root > h1:target::before,
.root > h2:target::before,
.root > h3:target::before,
.root > h4:target::before,
.root > h5:target::before,
.root > h6:target::before {
    content: '';
    display: block;
    margin-top: calc(-1 * var(--navbar-height) - 30px);
    height: calc(var(--navbar-height) + 30px);
    visibility: hidden;
}
 
.root img {
    max-width: 100%;
}
 
.root > table {
    margin: 0 auto;
    width: 100%;
}
 
.root > table:hover {
    box-shadow: 0 2px 10px rgba(90, 95, 100, 0.12);
}
 
.root > table th {
    text-align: left;
    color: #a7afbb;
}
 
.root > table th, .root > table td {
    padding: 4px 8px;
    font-size: var(--article-table-font-size);
    border: 1px solid var(--border-color-base);
}
 
.root > table img {
    max-width: none;
}
 
.root > [class^="u-toc"] {
    position: fixed;
    top: 120px;
    right: 40px;
}
 
.root > [class^="u-toc"] > [class^="u-toc_body"] {
    overflow: auto;
    max-height: calc(100vh - 120px - 40px - 10px);
}
</style>