bulma/docs/_sass/old/example.sass

257 lines
5.3 KiB
Sass
Raw Normal View History

2017-08-14 11:44:24 +00:00
.bd-example,
2017-08-30 19:44:39 +00:00
.bd-structure,
.bd-snippet
2018-04-10 10:45:48 +00:00
border: 2px solid $background
2017-07-02 22:49:54 +00:00
position: relative
2018-04-08 18:08:39 +00:00
&::before
2017-08-30 19:44:39 +00:00
background: $yellow
2018-04-09 22:53:34 +00:00
border-radius: $radius-small $radius-small 0 0
2017-07-02 22:49:54 +00:00
bottom: 100%
2017-08-30 19:44:39 +00:00
color: $yellow-invert
2017-07-02 22:49:54 +00:00
content: "Example"
display: inline-block
font-size: 7px
font-weight: bold
left: -1px
letter-spacing: 1px
2018-04-10 10:45:48 +00:00
margin-left: -1px
2017-07-02 22:49:54 +00:00
padding: 3px 5px
position: absolute
text-transform: uppercase
vertical-align: top
+tablet
&.is-fullwidth
border-left: none
border-right: none
padding: 0
2017-08-30 19:44:39 +00:00
.bd-example,
.bd-structure
padding: 1.5rem
&:not(:first-child)
margin-top: 2rem
&:not(:last-child)
margin-bottom: 1.5rem
2017-08-14 11:44:24 +00:00
.bd-example
2017-10-09 14:38:12 +00:00
&.bd-is-clipped
border-top-right-radius: $radius-large
2017-07-02 22:49:54 +00:00
& + .highlight
2017-08-30 19:44:39 +00:00
border: 1px solid $yellow
2017-07-02 22:49:54 +00:00
border-radius: 0 0 $radius $radius
border-top: none
margin-top: -1.5rem
&:not(:last-child)
margin-bottom: 1.5rem
2017-08-30 19:44:39 +00:00
// Snippet
.bd-snippet
+block
margin-top: 2rem
position: relative
&::before
content: "Snippet"
align-items: stretch
display: flex
.bd-snippet-preview
padding: 1.5rem
2017-10-09 14:38:12 +00:00
.bd-snippet-code.bd-is-more.bd-is-more-clipped
.highlight
height: 2em
overflow: hidden
pre
overflow: hidden
.bd-show
display: flex
.bd-snippet.bd-is-horizontal
border-radius: $radius-large
border-top-left-radius: 0
2018-04-12 00:02:50 +00:00
.bd-snippet-code
2017-10-09 14:38:12 +00:00
.highlight
2018-04-12 00:02:50 +00:00
border-top-left-radius: 0
border-top-right-radius: 0
&.bd-is-more.bd-is-more-clipped
.highlight
pre
padding-top: 0.325rem
2017-10-09 14:38:12 +00:00
2017-08-30 21:21:30 +00:00
.bd-snippet.bd-is-clipped
.bd-snippet-code
overflow: auto
2018-04-09 15:33:44 +00:00
.bd-snippet.bd-is-fullwidth
border-radius: 0
border-width: 1px 0
2017-08-30 20:33:49 +00:00
+desktop
.bd-snippet.bd-is-vertical
align-items: stretch
2017-10-09 14:38:12 +00:00
border-radius: $radius-large
border-top-left-radius: 0
2017-08-30 20:33:49 +00:00
display: flex
justify-content: center
.bd-snippet-preview,
.bd-snippet-code
width: 50%
.bd-snippet-code
&,
.highlight,
.highlight pre
align-items: stretch
2017-10-09 14:38:12 +00:00
border-radius: 0 $radius-large $radius-large 0
2017-08-30 20:33:49 +00:00
display: flex
flex-direction: column
.highlight,
.highlight pre,
.highlight .language-html
flex-grow: 1
.highlight pre
white-space: pre
2017-10-12 16:25:11 +00:00
&.bd-is-one-fifth
.bd-snippet-preview
align-items: center
display: flex
justify-content: center
width: calc(128px + 3rem)
.bd-snippet-code
width: calc(100% - 128px - 3rem)
&.bd-is-two-fifths
.bd-snippet-preview
align-items: center
display: flex
justify-content: center
width: calc(256px + 3rem)
.bd-snippet-code
width: calc(100% - 256px - 3rem)
2017-08-30 20:33:49 +00:00
&.bd-is-one-third
.bd-snippet-preview
width: 33.3333%
.bd-snippet-code
width: 66.6666%
2017-08-30 19:44:39 +00:00
// Highlight
2017-08-14 17:25:14 +00:00
.highlight.bd-is-hovering
border-radius: 2px
2017-08-30 19:44:39 +00:00
box-shadow: 0 0 0 2px $yellow
2017-08-14 17:25:14 +00:00
2017-07-02 22:49:54 +00:00
.highlight pre
2017-08-30 20:33:49 +00:00
max-height: 320px
2017-07-02 22:49:54 +00:00
margin-bottom: 0 !important
2017-07-11 21:19:06 +00:00
.bd-highlight-full,
2017-07-13 18:44:35 +00:00
#navbarJsExample
2017-08-14 22:52:28 +00:00
&:not(:last-child)
margin-bottom: 1.5rem
2017-07-13 18:44:35 +00:00
.highlight pre
max-height: none
2017-07-02 22:49:54 +00:00
$structure: $danger
$structure-invert: $danger-invert
2017-08-14 11:44:24 +00:00
.bd-structure
2017-07-02 22:49:54 +00:00
border-color: $structure
border-radius: $radius
padding: 1.5rem
2018-04-08 18:08:39 +00:00
&::before
2017-07-02 22:49:54 +00:00
background: $structure
color: $structure-invert
content: "Structure"
2017-08-14 11:44:24 +00:00
.bd-structure-item
2017-07-02 22:49:54 +00:00
position: relative
2018-04-08 18:08:39 +00:00
&::before
2017-07-02 22:49:54 +00:00
+overlay
2019-10-13 15:11:19 +00:00
background: rgba($scheme-invert, 0.7)
2017-07-02 22:49:54 +00:00
background: $background
border: 1px solid $border
content: ""
display: block
z-index: 1
2018-04-08 18:08:39 +00:00
&::after
2017-07-02 22:49:54 +00:00
+overlay
align-items: center
content: attr(title)
display: flex
font-family: $family-monospace
font-size: 11px
justify-content: center
padding: 3px 5px
z-index: 2
2017-08-14 11:44:24 +00:00
&.bd-is-structure-container
2017-07-02 22:49:54 +00:00
padding: 1.5rem 0.75rem 0.75rem
2018-04-08 18:08:39 +00:00
&::after
2017-07-02 22:49:54 +00:00
align-items: flex-start
justify-content: flex-start
padding: 0.5rem 0.75rem
.highlight
position: relative
2017-08-14 11:58:21 +00:00
.bd-copy,
.bd-expand
2017-08-14 17:25:14 +00:00
background: none
border: none
color: $text
2017-07-02 22:49:54 +00:00
cursor: pointer
2017-08-14 17:25:14 +00:00
font-size: 0.625rem
2017-07-02 22:49:54 +00:00
outline: none
2017-08-14 17:25:14 +00:00
padding-bottom: 0
padding-top: 0
2017-07-02 22:49:54 +00:00
position: absolute
2017-08-14 17:25:14 +00:00
right: 0.25rem
top: 0.25rem
2017-07-02 22:49:54 +00:00
&:hover
2017-08-30 19:44:39 +00:00
background-color: $yellow
color: $yellow-invert
2017-08-30 21:21:30 +00:00
&:focus,
&:active
box-shadow: none
2017-08-14 11:58:21 +00:00
.bd-expand
2017-08-14 17:25:14 +00:00
right: 45px
2017-10-09 11:27:08 +00:00
.bd-show
+overlay
align-items: center
2017-10-09 14:38:12 +00:00
background-color: rgba($background, 0.7)
2017-10-09 11:27:08 +00:00
border: none
2017-10-09 14:38:12 +00:00
color: rgba(#000, 0.5)
2017-10-09 11:27:08 +00:00
cursor: pointer
display: none
2017-10-09 14:38:12 +00:00
font-size: $size-small
2017-10-09 11:27:08 +00:00
justify-content: center
width: 100%
strong
color: currentColor
font-weight: $weight-semibold
&:hover
2017-10-09 14:38:12 +00:00
background-color: rgba($yellow, 0.8)
color: rgba(#000, 0.7)
+tablet
2017-10-09 11:27:08 +00:00
pre
2017-10-09 14:38:12 +00:00
white-space: pre-wrap
2017-10-09 11:27:08 +00:00
2017-07-02 22:49:54 +00:00
+tablet
2017-08-14 11:44:24 +00:00
.section:not(.is-fullwidth) > .bd-example:not(.is-fullwidth)
2017-07-02 22:49:54 +00:00
margin-left: 1.5rem
margin-right: 1.5rem
& + .highlight
margin-left: 1.5rem
margin-right: 1.5rem
.section.is-fullwidth
padding: 0 !important
2017-10-09 14:38:12 +00:00
.bd-snippet
border-left: none
border-radius: 0
border-right: none
2017-08-14 11:44:24 +00:00
.bd-example
2017-07-02 22:49:54 +00:00
border-left: none
border-radius: 0
border-right: none
padding: 0
& + .highlight
border-left: none
border-radius: 0
border-right: none