UNPKG

1.01 kBSCSSView Raw
1// Inline code
2code {
3 @include font-size($code-font-size);
4 color: $code-color;
5 word-wrap: break-word;
6
7 // Streamline the style when inside anchors to avoid broken underline and more
8 a > & {
9 color: inherit;
10 }
11}
12
13// User input typically entered via keyboard
14kbd {
15 padding: $kbd-padding-y $kbd-padding-x;
16 @include font-size($kbd-font-size);
17 color: $kbd-color;
18 background-color: $kbd-bg;
19 @include border-radius($border-radius-sm);
20 @include box-shadow($kbd-box-shadow);
21
22 kbd {
23 padding: 0;
24 @include font-size(100%);
25 font-weight: $nested-kbd-font-weight;
26 @include box-shadow(none);
27 }
28}
29
30// Blocks of code
31pre {
32 display: block;
33 @include font-size($code-font-size);
34 color: $pre-color;
35
36 // Account for some code outputs that place code tags in pre tags
37 code {
38 @include font-size(inherit);
39 color: inherit;
40 word-break: normal;
41 }
42}
43
44// Enable scrollable blocks of code
45.pre-scrollable {
46 max-height: $pre-scrollable-max-height;
47 overflow-y: scroll;
48}