bulma/docs/_sass/example.sass

141 lines
2.8 KiB
Sass
Raw Normal View History

2017-08-14 11:44:24 +00:00
.bd-example,
.bd-structure
2017-07-02 22:49:54 +00:00
border: 1px solid $warning
border-top-right-radius: $radius
color: $warning-invert
padding: 1.5rem
position: relative
&:not(:first-child)
margin-top: 2rem
&:not(:last-child)
margin-bottom: 1.5rem
&:before
background: $warning
border-radius: $radius $radius 0 0
bottom: 100%
content: "Example"
display: inline-block
font-size: 7px
font-weight: bold
left: -1px
letter-spacing: 1px
padding: 3px 5px
position: absolute
text-transform: uppercase
vertical-align: top
+tablet
&.is-fullwidth
border-left: none
border-right: none
padding: 0
2017-08-14 11:44:24 +00:00
.bd-example
2017-07-02 22:49:54 +00:00
& + .highlight
border: 1px solid $warning
border-radius: 0 0 $radius $radius
border-top: none
margin-top: -1.5rem
&:not(:last-child)
margin-bottom: 1.5rem
2017-08-14 17:25:14 +00:00
.highlight.bd-is-hovering
border-radius: 2px
box-shadow: 0 0 0 3px $border
2017-07-02 22:49:54 +00:00
.highlight pre
2017-07-11 21:19:06 +00:00
max-height: 480px
2017-07-02 22:49:54 +00:00
margin-bottom: 0 !important
2017-07-11 21:19:06 +00:00
padding: 0
2017-07-02 22:49:54 +00:00
code
2017-07-11 21:19:06 +00:00
padding: 1.25em 1.5em
2017-07-13 18:44:35 +00:00
.highlight-full,
#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
&:before
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
&:before
+overlay
background: rgba($black, 0.7)
background: $background
border: 1px solid $border
content: ""
display: block
z-index: 1
&:after
+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
&:after
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-14 17:25:14 +00:00
background-color: $text
color: $white
2017-08-14 11:58:21 +00:00
.bd-expand
2017-08-14 17:25:14 +00:00
right: 45px
2017-07-02 22:49:54 +00:00
+tablet
pre
white-space: pre-wrap
+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-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