spaCy/website/assets/css/_components/_code.sass

82 lines
1.8 KiB
Sass
Raw Normal View History

2016-10-03 18:19:13 +00:00
//- ----------------------------------
//- 💫 COMPONENTS > CODE
//- ----------------------------------
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
//- Code block
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
.c-code-block
background: $color-subtle-light
padding: 1em 0
border-left: 5px solid $color-theme
overflow: auto
width: 100%
max-width: 100%
white-space: pre
direction: ltr
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
:not(.o-block)
margin-bottom: 2rem
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
//- Code block content
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
.c-code-block__content
display: block
padding: 2em 2.5em
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
//- Code block label
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
.c-code-block__label
display: inline-block
background: $color-theme
color: $color-back
padding: 1rem
margin-bottom: 1.5rem
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
//- Inline code
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
:not(.c-code-block) > code
@extend .u-code-small
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
background: $color-subtle-light
box-shadow: 1px 1px 0 $color-subtle
color: $color-front
padding: 0.15em 0.5em
margin: 0 0.25em
border-radius: 2px
text-shadow: 1px 1px 0 $color-back
//- 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)
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
&.selector, &.attr-name, &.string, &.char, &.builtin, &.inserted
color: map-get($syntax-highlighting, selector)
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
@at-root .language-css .token.string,
&.operator, &.entity, &.url, &.variable
color: map-get($syntax-highlighting, operator)
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
&.atrule, &.attr-value, &.function
color: map-get($syntax-highlighting, function)
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
&.regex, &.important
color: map-get($syntax-highlighting, regex)
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
&.keyword
color: map-get($syntax-highlighting, keyword)
2016-03-31 14:24:48 +00:00
2016-10-03 18:19:13 +00:00
&.italic
font-style: italic