daml/docs/theme/sass/_theme_highlighter.sass
Bernhard Elsner f0b98a85b9
Docs style alignment (#8134)
* Flashier top-level menu

* Flashy buttons

CHANGELOG_BEGIN
CHANGELOG_END

* Increase top-level nav font-size

* Make the entire landing page box clickable

* Fix code block alignment and copy button with line numbers

* Fix code blocks with line numbers on mobile

* Reengineer code blocks properly

* More fixes to code-blocks

* Add a vertical line after line numbers
2020-12-04 08:50:08 +01:00

152 lines
2.9 KiB
Sass

.rst-content
pre.literal-block, div[class^="highlight"]
background-color: #171B26
overflow-x: auto
margin: 35px 0 35px -47px
+media($tablet)
margin-left: -25px
+media($mobile)
margin-left: -30px
div[class^='highlight']
padding: 0
border: none
margin: 0
padding-left: 47px
overflow-x: visible
+media($tablet)
padding-left: 25px
+media($mobile)
padding-left: 30px
pre
padding-right: 2em
a.copybtn.o-tooltip--left
position: absolute
opacity: 1
top: 0.7em
+media($desktop)
left: 15px
+media($tablet)
right: 2em
&:before
content: ""
background: url("../images/copy-button.svg") no-repeat
position: absolute
vertical-align: top
margin: 0
top: 0
left: 0
height: 20px
width: 20px
&:after
padding: 6px
top: -7px
background: $gray-lighter
color: $text-dark
+media($desktop)
left: 4.5em
+media($tablet)
left: -0.5em
img
display: none
.linenos
padding: 0
width: 27px
.linenodiv
width: 100%
position: relative
left: 38px
overflow: visible
z-index: 1
padding-right: 10px
border-right: solid 1px $gray
+media($tablet)
left: 16px
+media($mobile)
left: 21px
pre
text-align: end
padding-left: 0
.highlighttable
width: 100%
table-layout: fixed
div[class^='highlight']
a.copybtn.o-tooltip--left
+media($desktop)
left: -11px
.literal-block-wrapper, .literal-block-wrapper:last-child
margin-top: 35px
margin-bottom: 35px
div[class^="highlight"]
margin-top: 0
margin-bottom: 0
.highlight, .highlight:last-child
background-color: #171B26
color: #eeeeee
margin-top: 35px
margin-bottom: 35px
.hll
background-color: #2F3649
.kr, .k, .kd
color: #cf82c7
.kt, .si, .p
color: #2A95E0
.kc, .mf, .s1, .mi, .sb, .s
color: #AFD0A1
.m
color: #4ae0b3
.c1
color: #508D3E
.n, .o, .nt, .nf, .ow, .nb
color: #FFFFFF
.nx
color: #DCDCA4
dd, li
pre.literal-block, div[class^='highlight']
padding-left: 1.6em
margin-left: calc(-47px - 1.6em)
+media($tablet)
margin-left: calc(-25px - 1.6em)
+media($mobile)
margin-left: calc(-40px - 1.6em)
dd, li
pre.literal-block, div[class^='highlight']
padding-left: 3.2em
margin-left: calc(-47px - 2 * 1.6em)
+media($tablet)
margin-left: calc(-25px - 2 * 1.6em)
+media($mobile)
margin-left: calc(-40px - 2 * 1.6em)