bulma/sass/elements/content.sass

163 lines
3.8 KiB
Sass
Raw Normal View History

2020-10-31 23:52:27 +00:00
@import "../utilities/mixins"
2017-07-28 20:05:15 +00:00
$content-heading-color: $text-strong !default
2018-04-11 23:20:58 +00:00
$content-heading-weight: $weight-semibold !default
2017-07-28 20:05:15 +00:00
$content-heading-line-height: 1.125 !default
$content-block-margin-bottom: 1em !default
2017-07-28 20:05:15 +00:00
$content-blockquote-background-color: $background !default
$content-blockquote-border-left: 5px solid $border !default
$content-blockquote-padding: 1.25em 1.5em !default
$content-pre-padding: 1.25em 1.5em !default
$content-table-cell-border: 1px solid $border !default
$content-table-cell-border-width: 0 0 1px !default
$content-table-cell-padding: 0.5em 0.75em !default
$content-table-cell-heading-color: $text-strong !default
$content-table-head-cell-border-width: 0 0 2px !default
$content-table-head-cell-color: $text-strong !default
$content-table-body-last-row-cell-border-bottom-width: 0 !default
2017-07-28 20:05:15 +00:00
$content-table-foot-cell-border-width: 2px 0 0 !default
$content-table-foot-cell-color: $text-strong !default
2016-01-24 00:03:43 +00:00
.content
2018-09-04 13:24:50 +00:00
@extend %block
2016-04-10 15:56:27 +00:00
// Inline
li + li
margin-top: 0.25em
// Block
p,
2017-04-02 13:51:40 +00:00
dl,
2016-04-10 15:56:27 +00:00
ol,
2016-10-30 14:59:46 +00:00
ul,
blockquote,
2017-04-02 13:51:40 +00:00
pre,
2016-10-30 14:59:46 +00:00
table
2016-04-10 15:56:27 +00:00
&:not(:last-child)
margin-bottom: $content-block-margin-bottom
2016-01-24 00:03:43 +00:00
h1,
h2,
h3,
h4,
h5,
h6
2017-07-28 20:05:15 +00:00
color: $content-heading-color
font-weight: $content-heading-weight
line-height: $content-heading-line-height
2016-01-24 00:03:43 +00:00
h1
font-size: 2em
2016-10-29 17:53:30 +00:00
margin-bottom: 0.5em
&:not(:first-child)
margin-top: 1em
2016-01-24 00:03:43 +00:00
h2
font-size: 1.75em
2016-10-29 17:53:30 +00:00
margin-bottom: 0.5714em
&:not(:first-child)
margin-top: 1.1428em
2016-01-24 00:03:43 +00:00
h3
font-size: 1.5em
2016-10-29 17:53:30 +00:00
margin-bottom: 0.6666em
&:not(:first-child)
margin-top: 1.3333em
2016-01-24 00:03:43 +00:00
h4
font-size: 1.25em
2016-10-29 17:53:30 +00:00
margin-bottom: 0.8em
2016-01-24 00:03:43 +00:00
h5
font-size: 1.125em
2016-10-29 17:53:30 +00:00
margin-bottom: 0.8888em
2016-01-24 00:03:43 +00:00
h6
font-size: 1em
2016-10-29 17:53:30 +00:00
margin-bottom: 1em
blockquote
2017-07-28 20:05:15 +00:00
background-color: $content-blockquote-background-color
2020-01-22 09:14:04 +00:00
+ltr-property("border", $content-blockquote-border-left, false)
2017-07-28 20:05:15 +00:00
padding: $content-blockquote-padding
2016-01-24 00:03:43 +00:00
ol
2018-10-07 17:04:09 +00:00
list-style-position: outside
2020-01-22 09:14:04 +00:00
+ltr-property("margin", 2em, false)
2016-04-10 15:56:27 +00:00
margin-top: 1em
2018-10-07 17:04:09 +00:00
&:not([type])
list-style-type: decimal
&.is-lower-alpha
list-style-type: lower-alpha
&.is-lower-roman
list-style-type: lower-roman
&.is-upper-alpha
list-style-type: upper-alpha
&.is-upper-roman
list-style-type: upper-roman
2016-01-24 00:03:43 +00:00
ul
list-style: disc outside
2020-01-22 09:14:04 +00:00
+ltr-property("margin", 2em, false)
2016-04-10 15:56:27 +00:00
margin-top: 1em
2016-01-24 00:03:43 +00:00
ul
list-style-type: circle
margin-top: 0.5em
ul
2019-05-18 15:24:42 +00:00
list-style-type: square
2017-04-02 13:51:40 +00:00
dd
2020-01-22 09:14:04 +00:00
+ltr-property("margin", 2em, false)
2017-07-02 15:52:20 +00:00
figure
2017-09-09 21:56:54 +00:00
margin-left: 2em
margin-right: 2em
2017-07-02 15:52:20 +00:00
text-align: center
2017-09-09 21:56:54 +00:00
&:not(:first-child)
margin-top: 2em
&:not(:last-child)
margin-bottom: 2em
2017-07-02 15:52:20 +00:00
img
display: inline-block
figcaption
font-style: italic
pre
2017-04-02 13:51:40 +00:00
+overflow-touch
overflow-x: auto
2017-07-28 20:05:15 +00:00
padding: $content-pre-padding
2017-04-02 13:51:40 +00:00
white-space: pre
2017-07-02 15:52:20 +00:00
word-wrap: normal
sup,
sub
2017-07-28 20:05:15 +00:00
font-size: 75%
2016-10-30 14:59:46 +00:00
table
width: 100%
td,
th
2017-07-28 20:05:15 +00:00
border: $content-table-cell-border
border-width: $content-table-cell-border-width
padding: $content-table-cell-padding
2016-10-30 14:59:46 +00:00
vertical-align: top
th
2017-07-28 20:05:15 +00:00
color: $content-table-cell-heading-color
&:not([align])
2020-01-20 19:39:09 +00:00
text-align: inherit
2016-10-30 14:59:46 +00:00
thead
td,
th
2017-07-28 20:05:15 +00:00
border-width: $content-table-head-cell-border-width
color: $content-table-head-cell-color
2016-10-30 14:59:46 +00:00
tfoot
td,
th
2017-07-28 20:05:15 +00:00
border-width: $content-table-foot-cell-border-width
color: $content-table-foot-cell-color
2016-10-30 14:59:46 +00:00
tbody
tr
&:last-child
td,
th
border-bottom-width: $content-table-body-last-row-cell-border-bottom-width
.tabs
li + li
2019-05-18 15:24:42 +00:00
margin-top: 0
2016-04-10 15:56:27 +00:00
// Sizes
2016-10-29 17:53:30 +00:00
&.is-small
font-size: $size-small
&.is-normal
font-size: $size-normal
2016-04-10 15:56:27 +00:00
&.is-medium
2016-10-29 17:53:30 +00:00
font-size: $size-medium
2016-04-10 15:56:27 +00:00
&.is-large
2016-10-29 17:53:30 +00:00
font-size: $size-large