filter.caption.css

Same filename in this branch
  1. 8.9.x core/themes/stable/css/media/filter.caption.css
  2. 8.9.x core/themes/stable/css/filter/filter.caption.css
  3. 8.9.x core/modules/media/css/filter.caption.css
Same filename in other branches
  1. 9 core/themes/stable9/css/media/filter.caption.css
  2. 9 core/themes/stable9/css/filter/filter.caption.css
  3. 9 core/themes/stable/css/media/filter.caption.css
  4. 9 core/themes/stable/css/filter/filter.caption.css
  5. 9 core/modules/media/css/filter.caption.css
  6. 9 core/modules/filter/css/filter.caption.css
  7. 10 core/themes/stable9/css/media/filter.caption.css
  8. 10 core/themes/stable9/css/filter/filter.caption.css
  9. 10 core/modules/media/css/filter.caption.css
  10. 10 core/modules/filter/css/filter.caption.css
  11. 11.x core/themes/stable9/css/media/filter.caption.css
  12. 11.x core/themes/stable9/css/filter/filter.caption.css
  13. 11.x core/modules/media/css/filter.caption.css
  14. 11.x core/modules/filter/css/filter.caption.css

Caption filter: default styling for displaying image captions.

File

core/modules/filter/css/filter.caption.css

View source
  1. /**
  2. * @file
  3. * Caption filter: default styling for displaying image captions.
  4. */
  5. /**
  6. * Essentials, based on http://stackoverflow.com/a/13363408.
  7. */
  8. .caption {
  9. display: table;
  10. }
  11. .caption > * {
  12. display: block;
  13. max-width: 100%;
  14. }
  15. .caption > figcaption {
  16. display: table-caption;
  17. max-width: none;
  18. caption-side: bottom;
  19. }
  20. /**
  21. * While editing and whenever the caption is empty, show a placeholder.
  22. *
  23. * Based on http://codepen.io/flesler/pen/AEIFc.
  24. */
  25. .caption > figcaption[contenteditable=true]:empty:before {
  26. content: attr(data-placeholder);
  27. font-style: italic;
  28. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.