diff --git a/core/themes/bartik/css/components/captions.css b/core/themes/bartik/css/components/captions.css index a8b1d8f..9d55e4b 100644 --- a/core/themes/bartik/css/components/captions.css +++ b/core/themes/bartik/css/components/captions.css @@ -1,33 +1,36 @@ +/** + * @file + * Bartik styling for captions. + */ .caption { margin-bottom: 1.2em; + max-width: calc(100% - 80px); + display: inline-block; } .caption > * { background: #f3f3f3; - padding: 0.25em; + padding: 0.5em; border: 1px solid #ccc; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + display:block; + max-width: calc(100% - 1em - 2px); } .caption > figcaption { - font-size: 0.85em; - text-align: center; -} -.caption:not(.caption-pre) > figcaption { + border: 1px solid #ccc; border-top: none; + padding-top: 0.5em; + font-size: 0.9em; + max-width: calc(100% - 1em - 2px); + text-align: center; + display: block; } + /* Override Bartik's default blockquote and pre styles when captioned. */ .caption > pre, .caption > blockquote { margin: 0; } .caption-blockquote > figcaption::before { - content: "— "; + content: "- "; } .caption-blockquote > figcaption { text-align: left; /* LTR */ diff --git a/core/themes/bartik/css/components/captions.css~ b/core/themes/bartik/css/components/captions.css~ new file mode 100644 index 0000000..f09d565 --- /dev/null +++ b/core/themes/bartik/css/components/captions.css~ @@ -0,0 +1,41 @@ +/* +* @file +* Bartik styling for captions. +*/ +.caption { + margin-bottom: 1.2em; + max-width: calc(100% - 80px); + display: inline-block; +} +.caption > * { + background: #f3f3f3; + padding: 0.5em; + border: 1px solid #ccc; + display:block; + max-width: calc(100% - 1em - 2px); +} +.caption > figcaption { + border: 1px solid #ccc; + border-top: none; + padding-top: 0.5em; + font-size: 0.9em; + max-width: calc(100% - 1em - 2px); + text-align: center; + display: block; +} + +/* Override Bartik's default blockquote and pre styles when captioned. */ +.caption > pre, +.caption > blockquote { + margin: 0; +} +.caption-blockquote > figcaption::before { + content: "- "; +} +.caption-blockquote > figcaption { + text-align: left; /* LTR */ +} +[dir="rtl"] .caption-blockquote > figcaption { + text-align: right; +} +