diff --git a/core/modules/filter/css/filter.caption-rtl.css b/core/modules/filter/css/filter.caption-rtl.css new file mode 100644 index 0000000..f4ed201 --- /dev/null +++ b/core/modules/filter/css/filter.caption-rtl.css @@ -0,0 +1,18 @@ +/** + * @file + * Caption filter: rtl styling for displaying image captions. + */ + +/** + * Caption alignment. + */ +.caption-left { + float: right; + margin-left: auto; + margin-right: 0; +} +.caption-right { + float: left; + margin-left: 0; + margin-right: auto; +} diff --git a/core/modules/filter/css/filter.caption.css b/core/modules/filter/css/filter.caption.css index c66d4b1..374cb5db 100644 --- a/core/modules/filter/css/filter.caption.css +++ b/core/modules/filter/css/filter.caption.css @@ -3,40 +3,32 @@ * Caption filter: default styling for displaying image captions. */ -div.caption-inner { - border: 1px solid #CCC; - padding: 4px; - background: #F3F3F3; - font-size: 0.857em; /* assuming you have a base font size of 14px, this is 12px */ - text-align: center; -} - -div.caption p { - margin: .25em 0; +.caption { + -moz-box-sizing: border-box + -webkit-box-sizing: border-box + box-sizing: border-box; } -div.caption img, -div.caption object { - margin-bottom: 5px; - display: block; -} - -/** aligned captions **/ -div.caption-left { - float: left; - margin: 10px 10px 10px 0; +/** + * Caption alignment. + */ +.caption-left { + float: left; /* LTR */ + margin-left: 0; /* LTR */ } - -div.caption-right { - float: right; - margin: 10px 0 10px 10px; +.caption-right { + float: right; /* LTR */ + margin-right: 0; /* LTR */ } - -div.caption-center { - display: block; +.caption-center { + margin-left: 0; + margin-right: 0; text-align: center; } - -div.caption-center .caption-inner { +.caption-center, +.caption-center .caption-inner { display: inline-block; } +.caption-center { + width: 100%; +} diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 6c77b1c..47e8c05 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -1449,11 +1449,12 @@ function theme_filter_caption($variables) { $caption = $variables['caption']; $align = $variables['align']; $width = $variables['width']; - return '
' . + return '
' . '
'. $image . - '
' . $caption . '
' . - '
'; + '
' . $caption . '
' . + '' . + ''; } /** diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css index e312fc7..fb3be54 100644 --- a/core/themes/bartik/css/style.css +++ b/core/themes/bartik/css/style.css @@ -1417,6 +1417,19 @@ ol.search-results { padding-left: 0; } +/* -------------- Captions -------------- */ + +.caption-inner { + background: #F3F3F3; + border: 1px solid #CCC; + font-size: small; + padding: 0.5ex; + text-align: center; +} +.caption .caption-text { + margin-top: 1.5ex; +} + /* -------------- Shortcut Links -------------- */ .shortcut-wrapper {