Improve snippet

This commit is contained in:
Jeremy Thomas
2017-10-09 15:38:12 +01:00
parent 8d6a0a43dc
commit c4c3c32a83
5 changed files with 112 additions and 53 deletions

View File

@@ -42,10 +42,6 @@
margin-top: -1.5rem
&:not(:last-child)
margin-bottom: 1.5rem
& + .bd-highlight-clipped
margin-top: -1.5rem
&:not(:last-child)
margin-bottom: 1.5rem
// Snippet
.bd-snippet
@@ -218,28 +214,23 @@ $structure-invert: $danger-invert
.bd-show
+overlay
align-items: center
background-color: rgba(#000, 0.9)
background-image: linear-gradient(rgba(#000, 0), rgba(#000, 0) 90%, rgba(#000, 1))
background-color: rgba($background, 0.7)
border: none
color: $white
color: rgba(#000, 0.5)
cursor: pointer
display: none
font-size: $size-6
font-size: $size-small
justify-content: center
opacity: 0.7
width: 100%
strong
color: currentColor
font-weight: $weight-semibold
&:hover
opacity: 0.8
.highlight.bd-is-clipped
height: 4em
overflow: hidden
background-color: rgba($yellow, 0.8)
color: rgba(#000, 0.7)
+tablet
pre
overflow: hidden
.bd-show
display: flex
white-space: pre-wrap
+tablet
.section:not(.is-fullwidth) > .bd-example:not(.is-fullwidth)