]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - themes/default/less/code.less
Release 6.5.3
[Github/sugarcrm.git] / themes / default / less / code.less
1 // Code.less
2 // Code typography styles for the <code> and <pre> elements
3 // --------------------------------------------------------
4
5 // Inline and block code styles
6 code,
7 pre {
8   padding: 0 3px 2px;
9   #font > #family > .monospace;
10   font-size: @baseFontSize - 1;
11   color: @grayDark;
12   .border-radius(4px);
13 }
14
15 // Inline code
16 code {
17   padding: 3px 4px;
18   color: #d14;
19   background-color: #f7f7f9;
20   border: 1px solid #e1e1e8;
21 }
22
23 // Blocks of code
24 pre {
25   display: block;
26   padding: (@baseLineHeight - 1) / 2;
27   margin: 0 0 @baseLineHeight / 2;
28   font-size: 12px;
29   line-height: @baseLineHeight;
30   background-color: #f5f5f5;
31   border: 1px solid #ccc; // fallback for IE7-8
32   border: 1px solid rgba(0,0,0,.15);
33   .border-radius(4px);
34   white-space: pre;
35   white-space: pre-wrap;
36   word-break: break-all;
37   word-wrap: break-word;
38
39   // Make prettyprint styles more spaced out for readability
40   &.prettyprint {
41     margin-bottom: @baseLineHeight;
42   }
43
44   // Account for some code outputs that place code tags in pre tags
45   code {
46     padding: 0;
47     color: inherit;
48     background-color: transparent;
49     border: 0;
50   }
51 }
52
53 // Enable scrollable blocks of code
54 .pre-scrollable {
55   max-height: 340px;
56   overflow-y: scroll;
57 }