bulma/sass/elements/content.sass

175 lines
5.1 KiB
Sass
Raw Normal View History

2020-08-15 23:40:51 +00:00
$content-font-size: var(--size-normal, #{$size-normal}) !default
$content-heading-color: var(--text-strong, #{$text-strong}) !default
$content-heading-weight: var(--weight-semibold, #{$weight-semibold}) !default
2017-07-28 20:05:15 +00:00
$content-heading-line-height: 1.125 !default
2020-08-15 23:40:51 +00:00
$content-blockquote-background-color: var(--background, #{$background}) !default
$content-blockquote-border-left: 5px solid var(--border, #{$border}) !default
2017-07-28 20:05:15 +00:00
$content-blockquote-padding: 1.25em 1.5em !default
$content-pre-padding: 1.25em 1.5em !default
2020-08-15 23:40:51 +00:00
$content-table-cell-border: 1px solid var(--border, #{$border}) !default
2017-07-28 20:05:15 +00:00
$content-table-cell-border-width: 0 0 1px !default
$content-table-cell-padding: 0.5em 0.75em !default
2020-08-15 23:40:51 +00:00
$content-table-cell-heading-color: var(--text-strong, #{$text-strong}) !default
2017-07-28 20:05:15 +00:00
$content-table-head-cell-border-width: 0 0 2px !default
2020-08-15 23:40:51 +00:00
$content-table-head-cell-color: var(--text-strong, #{$text-strong}) !default
2017-07-28 20:05:15 +00:00
$content-table-foot-cell-border-width: 2px 0 0 !default
2020-08-15 23:40:51 +00:00
$content-table-foot-cell-color: var(--text-strong, #{$text-strong}) !default
2017-07-28 20:05:15 +00:00
2016-01-24 00:03:43 +00:00
.content
2020-08-15 23:40:51 +00:00
--content-font-size: #{$content-font-size}
--content-heading-color: #{$content-heading-color}
--content-heading-weight: #{$content-heading-weight}
--content-heading-line-height: #{$content-heading-line-height}
--content-blockquote-background-color: #{$content-blockquote-background-color}
--content-blockquote-border-left: #{$content-blockquote-border-left}
--content-blockquote-padding: #{$content-blockquote-padding}
--content-pre-padding: #{$content-pre-padding}
--content-table-cell-border: #{$content-table-cell-border}
--content-table-cell-border-width: #{$content-table-cell-border-width}
--content-table-cell-padding: #{$content-table-cell-padding}
--content-table-cell-heading-color: #{$content-table-cell-heading-color}
--content-table-head-cell-border-width: #{$content-table-head-cell-border-width}
--content-table-head-cell-color: #{$content-table-head-cell-color}
--content-table-foot-cell-border-width: #{$content-table-foot-cell-border-width}
--content-table-foot-cell-color: #{$content-table-foot-cell-color}
2018-09-04 13:24:50 +00:00
@extend %block
2020-08-15 23:40:51 +00:00
font-size: var(--content-font-size)
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: 1em
2016-01-24 00:03:43 +00:00
h1,
h2,
h3,
h4,
h5,
h6
2020-08-15 23:40:51 +00:00
color: var(--content-heading-color)
font-weight: var(--content-heading-weight)
line-height: var(--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
2020-08-15 23:40:51 +00:00
background-color: var(--content-blockquote-background-color)
+ltr-property("border", var(--content-blockquote-border-left), false)
padding: var(--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
2020-08-15 23:40:51 +00:00
padding: var(--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
2020-08-15 23:40:51 +00:00
border: var(--content-table-cell-border)
border-width: var(--content-table-cell-border-width)
padding: var(--content-table-cell-padding)
2016-10-30 14:59:46 +00:00
vertical-align: top
th
2020-08-15 23:40:51 +00:00
color: var(--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
2020-08-15 23:40:51 +00:00
border-width: var(--content-table-head-cell-border-width)
color: var(--content-table-head-cell-color)
2016-10-30 14:59:46 +00:00
tfoot
td,
th
2020-08-15 23:40:51 +00:00
border-width: var(--content-table-foot-cell-border-width)
color: var(--content-table-foot-cell-color)
2016-10-30 14:59:46 +00:00
tbody
tr
&:last-child
td,
th
border-bottom-width: 0
.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
2020-08-15 23:40:51 +00:00
--content-font-size: var(--size-small, #{$size-small})
2016-04-10 15:56:27 +00:00
&.is-medium
2020-08-15 23:40:51 +00:00
--content-font-size: var(--size-medium, #{$size-medium})
2016-04-10 15:56:27 +00:00
&.is-large
2020-08-15 23:40:51 +00:00
--content-font-size: var(--size-large, #{$size-large})