spaCy/website/assets/css/_components/_code.sass
2017-05-17 18:21:01 +02:00

75 lines
1.7 KiB
Sass

//- 💫 CSS > COMPONENTS > CODE
//- Code block
.c-code-block
background: $color-front
color: $color-back
padding: 0.75em 0
border-radius: 2px
overflow: auto
width: 100%
max-width: 100%
white-space: pre
direction: ltr
//- Code block content
.c-code-block__content
display: block
font: normal 600 1.1rem/#{2} $font-code
padding: 1em 2em
//- Inline code
*:not(.c-code-block) > code
font: normal 600 0.8em/#{1} $font-code
background: rgba($color-front, 0.05)
box-shadow: 1px 1px 0 rgba($color-front, 0.1)
text-shadow: 1px 1px 0 rgba($color-back, 0.5)
color: $color-front
padding: 0.1em 0.5em
margin: 0
border-radius: 1px
box-decoration-break: clone
white-space: nowrap
.c-aside__content &
background: lighten($color-front, 10)
color: $color-back
text-shadow: none
//- Syntax Highlighting
[class*="language-"] .token
&.comment, &.prolog, &.doctype, &.cdata, &.punctuation
color: map-get($syntax-highlighting, comment)
&.property, &.tag, &.constant, &.symbol, &.deleted
color: map-get($syntax-highlighting, tag)
&.boolean, &.number
color: map-get($syntax-highlighting, number)
&.selector, &.attr-name, &.string, &.char, &.builtin, &.inserted
color: map-get($syntax-highlighting, selector)
@at-root .language-css .token.string,
&.operator, &.entity, &.url, &.variable
color: map-get($syntax-highlighting, operator)
&.atrule, &.attr-value, &.function
color: map-get($syntax-highlighting, function)
&.regex, &.important
color: map-get($syntax-highlighting, regex)
&.keyword
color: map-get($syntax-highlighting, keyword)
&.italic
font-style: italic