angular-cn/public/resources/css/module/_code.scss

233 lines
3.3 KiB
SCSS
Raw Normal View History

2015-03-01 23:00:19 -05:00
/*
* Code Syntax Highlighting & Formatting
2015-03-01 23:00:19 -05:00
*
*/
2015-03-05 09:21:56 -05:00
/*
* Variables
*/
$prettyprint-background: $white;
$prettyprint-color: $blue-grey-700;
/*
* Copy Code Button
*/
.copy-container-template {
position: relative;
&:hover .copy-button .md-button {
opacity: 1;
}
.copy-button {
&.is-copied .md-button {
background: $blue-grey-50;
box-shadow: none;
color: $cyan-500;
min-width: 98px;
}
.md-button {
background: $cyan-500;
border-radius: 2px;
box-shadow: 0 2px 2px rgba($black, 0.24), 0 0 2px rgba($black, 0.12);
color: $white;
font-size: 12px;
height: $unit * 4;
line-height: $unit * 4;
min-height: $unit * 4;
min-width: 98px;
margin: 0;
opacity: 0;
right: $unit * 2;
padding: 0 ($unit * 2);
position: absolute;
top: $unit * 2;
z-index: 1;
transition: all .2s;
}
2015-03-05 09:21:56 -05:00
}
2015-03-01 23:00:19 -05:00
}
/*
* Pretty Print Styles
2015-03-01 23:00:19 -05:00
*/
.prettyprint {
background: $prettyprint-background;
white-space: pre-wrap;
color: $prettyprint-color;
2015-03-01 23:00:19 -05:00
font-family: $mono-font;
font-size: 14px;
line-height: 24px;
margin: 0;
overflow: auto;
2015-03-01 23:00:19 -05:00
position: relative;
padding: 0px;
2015-03-03 02:14:05 -05:00
padding: ($unit * 2) ($unit * 4);
width: auto;
2015-03-03 02:14:05 -05:00
2015-03-11 20:56:08 -04:00
&.linenums,
&[class^="linenums:"],
&[class*=" linenums:"] {
2015-03-03 02:14:05 -05:00
padding: 0px;
}
2015-03-01 23:00:19 -05:00
2015-03-05 10:21:58 -05:00
&.is-showcase {
border: 4px solid $blue-600;
2015-03-05 10:21:58 -05:00
}
2015-04-22 09:59:02 -04:00
code {
background: none;
font-size: 13px;
2015-05-19 11:48:26 -04:00
padding: 0px;
2015-04-22 09:59:02 -04:00
}
2015-03-01 23:00:19 -05:00
ol {
background: rgba($blue-grey-50, .24);
color: $blue-grey-200;
padding: 0 0 0 ($unit * 5);
2015-03-01 23:00:19 -05:00
margin: 0px;
overflow: auto;
font-size: 11px;
2015-03-01 23:00:19 -05:00
li {
background: $white;
margin: 0;
line-height: $unit * 3;
2015-03-01 23:00:19 -05:00
list-style-type: decimal;
padding: 0 0 0 ($unit * 2);
2015-03-01 23:00:19 -05:00
&:first-child {
padding-top: $unit * 3;
}
2015-03-01 23:00:19 -05:00
&:last-child {
margin-bottom: 0;
padding-bottom: $unit * 3;
2015-03-01 23:00:19 -05:00
}
code {
background: none;
color: $blue-grey-700;
font-size: 13px;
2015-03-01 23:00:19 -05:00
}
}
}
/*
* Screen Colors
*
*/
2015-03-16 00:34:38 -04:00
.pnk,
.blk {
2015-12-11 21:49:31 -05:00
border-radius: 4px;
2015-03-16 00:34:38 -04:00
padding: 2px 4px;
}
.pnk {
background: $blue-grey-50;
color: $blue-grey-900;
2015-03-16 00:34:38 -04:00
}
.blk {
background: $blue-grey-900;
2015-03-16 00:34:38 -04:00
}
.otl {
outline: 1px solid rgba($blue-grey-700, .56);
2015-03-16 00:34:38 -04:00
}
2015-03-01 23:00:19 -05:00
.kwd {
color: $pink-600;
2015-03-01 23:00:19 -05:00
}
.typ,
.tag {
color: $pink-600;
2015-03-01 23:00:19 -05:00
}
.str,
.atv {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
.atn {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
.com {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
.lit {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
.pun {
color: $blue-grey-700;
2015-03-01 23:00:19 -05:00
}
.pln {
color: $blue-grey-700;
2015-03-01 23:00:19 -05:00
}
.dec {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
/*
* Print Colors
*
*/
@media print {
2015-03-05 01:54:30 -05:00
border: none;
box-shadow: none;
ol {
background: $white;
2015-03-05 01:54:30 -05:00
}
2015-03-01 23:00:19 -05:00
.kwd {
color: $pink-600;
2015-03-01 23:00:19 -05:00
}
.typ,
.tag {
color: $pink-600;
2015-03-01 23:00:19 -05:00
}
.str,
.atv {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
.atn {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
.com {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
.lit {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
.pun {
color: $blue-grey-700;
2015-03-01 23:00:19 -05:00
}
.pln {
color: $blue-grey-700;
2015-03-01 23:00:19 -05:00
}
.dec {
color: $teal-700;
2015-03-01 23:00:19 -05:00
}
}
2015-12-11 21:49:31 -05:00
}
/*
* Embedded Code
*
* Style for embedded code examples
*/
.cp_embed_iframe {
overflow: hidden;
@include respond-to('mobile') {
width: 240px !important;
}
}