Fork-Awesome/assets/less/bootstrap-3.3.5/code.less

70 lines
1.4 KiB
Plaintext
Raw Normal View History

2013-01-02 13:40:00 +08:00
//
2014-05-15 04:13:14 +08:00
// Code (inline and block)
2013-01-02 13:40:00 +08:00
// --------------------------------------------------
2012-06-05 03:33:52 +08:00
// Inline and block code styles
code,
2014-05-15 04:13:14 +08:00
kbd,
pre,
samp {
2013-10-23 23:12:39 +08:00
font-family: @font-family-monospace;
2012-06-05 03:33:52 +08:00
}
// Inline code
code {
padding: 2px 4px;
2013-10-23 23:12:39 +08:00
font-size: 90%;
color: @code-color;
background-color: @code-bg;
border-radius: @border-radius-base;
2012-06-05 03:33:52 +08:00
}
2014-05-15 04:13:14 +08:00
// User input typically entered via keyboard
kbd {
padding: 2px 4px;
font-size: 90%;
color: @kbd-color;
background-color: @kbd-bg;
border-radius: @border-radius-small;
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
2014-08-27 00:51:53 +08:00
kbd {
padding: 0;
font-size: 100%;
font-weight: bold;
2014-08-27 00:51:53 +08:00
box-shadow: none;
}
2014-05-15 04:13:14 +08:00
}
2012-06-05 03:33:52 +08:00
// Blocks of code
pre {
display: block;
2013-10-23 23:12:39 +08:00
padding: ((@line-height-computed - 1) / 2);
margin: 0 0 (@line-height-computed / 2);
font-size: (@font-size-base - 1); // 14px to 13px
line-height: @line-height-base;
2012-06-05 03:33:52 +08:00
word-break: break-all;
word-wrap: break-word;
2013-10-23 23:12:39 +08:00
color: @pre-color;
background-color: @pre-bg;
border: 1px solid @pre-border-color;
border-radius: @border-radius-base;
2012-06-05 03:33:52 +08:00
// Account for some code outputs that place code tags in pre tags
code {
padding: 0;
2013-10-23 23:12:39 +08:00
font-size: inherit;
2012-06-05 03:33:52 +08:00
color: inherit;
2013-01-02 13:40:00 +08:00
white-space: pre-wrap;
2012-06-05 03:33:52 +08:00
background-color: transparent;
2014-05-15 04:13:14 +08:00
border-radius: 0;
2012-06-05 03:33:52 +08:00
}
}
// Enable scrollable blocks of code
.pre-scrollable {
2013-10-23 23:12:39 +08:00
max-height: @pre-scrollable-max-height;
2012-06-05 03:33:52 +08:00
overflow-y: scroll;
2013-10-23 23:12:39 +08:00
}