1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-15 17:45:31 +01:00
blog/_src/_assets/styl/_kremalicious/code.styl

78 lines
1.5 KiB
Stylus
Raw Normal View History

2014-07-12 02:00:18 +02:00
//
// kremalicious3
// --------------
// Code
//
code,
kbd,
pre,
samp
font-family: $font-family-monospace
font-size: $font-size-small
hyphens: none
2014-07-12 02:00:18 +02:00
code,
kbd
2014-07-21 21:07:43 +02:00
padding: 2px 4px
2014-07-12 02:00:18 +02:00
code,
samp
2015-07-26 21:41:59 +02:00
color: darken($code-color, 40%)
background-color: alpha($code-bg, 5%)
2014-07-12 02:00:18 +02:00
border-radius: $border-radius-base
kbd
color: $kbd-color
background-color: $kbd-bg
border-radius: $border-radius-small
2015-08-02 21:15:22 +02:00
border: 1px solid $kbd-bg
box-shadow: inset 0 1px 0 rgba(#fff, .4)
2014-07-12 02:00:18 +02:00
pre
2014-07-21 21:07:43 +02:00
display: block
2016-05-15 18:20:39 +02:00
padding: 0
2016-06-09 19:25:01 +02:00
margin-bottom: $spacer
line-height: $line-height
2014-07-12 02:00:18 +02:00
color: $code-color
background-color: $code-bg
2016-10-03 23:36:15 +02:00
margin-left: -($spacer)
margin-right: -($spacer)
2014-07-12 02:00:18 +02:00
// make 'em scrollable
2014-07-12 21:22:47 +02:00
overflow: scroll
-webkit-overflow-scrolling: touch
max-height: 300px
2014-07-12 02:00:18 +02:00
2016-06-09 19:25:01 +02:00
@media $screen-sm
2015-07-26 21:41:59 +02:00
max-height: 500px
2016-06-09 19:25:01 +02:00
@media $screen-md
border-radius: $border-radius-base
2014-07-12 02:00:18 +02:00
// Account for some code outputs that place code tags in pre tags
code
white-space: pre
overflow: auto
display: block
padding: $spacer
2014-07-12 02:00:18 +02:00
font-size: inherit
color: inherit
background-color: transparent
border-radius: 0
overflow-wrap: normal
word-wrap: normal
word-break: normal
code.language-shell
2014-07-12 02:00:18 +02:00
padding-left: 1.5em
display: block
&:before
2016-05-25 23:03:36 +02:00
@extend .text-dimmed
2014-07-12 02:00:18 +02:00
content: "$"
display: inline-block
2016-05-15 18:20:39 +02:00
margin-left: -.5em
2014-07-12 02:00:18 +02:00
margin-right: .8em