You are here

filter.caption.css in Editor 7

Caption filter: default styling for displaying image captions.

File

css/filter/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. caption-side: bottom;
  18. max-width: none;
  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. }