2019-11-27 15:31:49 +07:00
|
|
|
|
/**
|
|
|
|
|
* Code
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reboot
|
|
|
|
|
// ––––––––––––––––––––
|
|
|
|
|
|
|
|
|
|
// 1. Correct the inheritance and scaling of font size in all browsers.
|
|
|
|
|
// 2. Correct the odd `em` font sizing in all browsers.
|
|
|
|
|
pre,
|
|
|
|
|
code,
|
|
|
|
|
kbd,
|
|
|
|
|
samp {
|
|
|
|
|
font-family: $monospace; // 1
|
|
|
|
|
font-size: 1rem; // 2
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Pico
|
|
|
|
|
// ––––––––––––––––––––
|
|
|
|
|
|
|
|
|
|
pre,
|
|
|
|
|
code,
|
|
|
|
|
kbd {
|
|
|
|
|
background: var(--code-inlined);
|
2019-12-01 16:35:38 +07:00
|
|
|
|
color: var(--code-color-1);
|
2019-11-27 15:31:49 +07:00
|
|
|
|
font-size: 85%;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
|
|
|
|
@if map-get($breakpoints, "sm") and $enable-responsive-typography {
|
|
|
|
|
@media (min-width: map-get($breakpoints, "sm")) {
|
|
|
|
|
font-size: 83%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if map-get($breakpoints, "md") and $enable-responsive-typography {
|
|
|
|
|
@media (min-width: map-get($breakpoints, "md")) {
|
|
|
|
|
font-size: 81%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if map-get($breakpoints, "lg") and $enable-responsive-typography {
|
|
|
|
|
@media (min-width: map-get($breakpoints, "lg")) {
|
|
|
|
|
font-size: 79%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@if map-get($breakpoints, "lg") and $enable-responsive-typography {
|
|
|
|
|
@media (min-width: map-get($breakpoints, "xl")) {
|
|
|
|
|
font-size: 77%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
code,
|
|
|
|
|
kbd {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: .375rem .5rem;
|
|
|
|
|
border-radius: $round;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pre {
|
|
|
|
|
display: block;
|
2019-12-03 09:51:37 +07:00
|
|
|
|
margin-bottom: $spacing-block;
|
2019-11-27 15:31:49 +07:00
|
|
|
|
padding: $spacing-block $spacing-gutter;
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
background: var(--code-background);
|
|
|
|
|
|
|
|
|
|
> code {
|
|
|
|
|
display: block;
|
|
|
|
|
padding: 0;
|
|
|
|
|
background: transparent;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
line-height: $line-height;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-02 11:52:26 +07:00
|
|
|
|
// Code Syntax highlighting
|
2019-11-27 15:31:49 +07:00
|
|
|
|
code {
|
|
|
|
|
|
|
|
|
|
// Tags
|
|
|
|
|
b {
|
2019-12-01 16:35:38 +07:00
|
|
|
|
color: var(--code-color-2);
|
2019-11-27 15:31:49 +07:00
|
|
|
|
font-weight: normal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Properties
|
|
|
|
|
i {
|
2019-12-01 16:35:38 +07:00
|
|
|
|
color: var(--code-color-3);
|
2019-11-27 15:31:49 +07:00
|
|
|
|
font-style: normal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Values
|
|
|
|
|
u {
|
2019-12-01 16:35:38 +07:00
|
|
|
|
color: var(--code-color-4);
|
2019-11-27 15:31:49 +07:00
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
2019-12-01 16:35:38 +07:00
|
|
|
|
|
|
|
|
|
// Comments
|
|
|
|
|
em {
|
|
|
|
|
color: var(--code-color-5);
|
|
|
|
|
font-style: normal;
|
|
|
|
|
}
|
2019-11-27 15:31:49 +07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// kbd
|
|
|
|
|
kbd {
|
|
|
|
|
background-color: var(--secondary);
|
|
|
|
|
color: var(--secondary-inverse);
|
|
|
|
|
font-weight: bolder;
|
|
|
|
|
}
|