author | stetrabby <info@trabucchi.de> |
Fri, 20 Dec 2013 22:30:44 +0100 | |
changeset 53 | 3416f82943ea |
permissions | -rwxr-xr-x |
info@53 | 1 |
// |
info@53 | 2 |
// Code (inline and block) |
info@53 | 3 |
// -------------------------------------------------- |
info@53 | 4 |
|
info@53 | 5 |
|
info@53 | 6 |
// Inline and block code styles |
info@53 | 7 |
code, |
info@53 | 8 |
kbd, |
info@53 | 9 |
pre, |
info@53 | 10 |
samp { |
info@53 | 11 |
font-family: @font-family-monospace; |
info@53 | 12 |
} |
info@53 | 13 |
|
info@53 | 14 |
// Inline code |
info@53 | 15 |
code { |
info@53 | 16 |
padding: 2px 4px; |
info@53 | 17 |
font-size: 90%; |
info@53 | 18 |
color: @code-color; |
info@53 | 19 |
background-color: @code-bg; |
info@53 | 20 |
white-space: nowrap; |
info@53 | 21 |
border-radius: @border-radius-base; |
info@53 | 22 |
} |
info@53 | 23 |
|
info@53 | 24 |
// Blocks of code |
info@53 | 25 |
pre { |
info@53 | 26 |
display: block; |
info@53 | 27 |
padding: ((@line-height-computed - 1) / 2); |
info@53 | 28 |
margin: 0 0 (@line-height-computed / 2); |
info@53 | 29 |
font-size: (@font-size-base - 1); // 14px to 13px |
info@53 | 30 |
line-height: @line-height-base; |
info@53 | 31 |
word-break: break-all; |
info@53 | 32 |
word-wrap: break-word; |
info@53 | 33 |
color: @pre-color; |
info@53 | 34 |
background-color: @pre-bg; |
info@53 | 35 |
border: 1px solid @pre-border-color; |
info@53 | 36 |
border-radius: @border-radius-base; |
info@53 | 37 |
|
info@53 | 38 |
// Account for some code outputs that place code tags in pre tags |
info@53 | 39 |
code { |
info@53 | 40 |
padding: 0; |
info@53 | 41 |
font-size: inherit; |
info@53 | 42 |
color: inherit; |
info@53 | 43 |
white-space: pre-wrap; |
info@53 | 44 |
background-color: transparent; |
info@53 | 45 |
border-radius: 0; |
info@53 | 46 |
} |
info@53 | 47 |
} |
info@53 | 48 |
|
info@53 | 49 |
// Enable scrollable blocks of code |
info@53 | 50 |
.pre-scrollable { |
info@53 | 51 |
max-height: @pre-scrollable-max-height; |
info@53 | 52 |
overflow-y: scroll; |
info@53 | 53 |
} |