media.css 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .media {
  2. display: grid;
  3. grid-template-areas:
  4. "decoration"
  5. "title"
  6. "body"
  7. "footer";
  8. background-color: var(--media-background);
  9. border: solid 1px var(--media-background-border);
  10. border-radius: 5px;
  11. padding: 0.5em;
  12. }
  13. @media only screen and (min-width: 768px) {
  14. .media {
  15. grid-template-areas:
  16. "title decoration"
  17. "body body"
  18. "footer footer";
  19. grid-template-columns: 4fr 1fr;
  20. }
  21. }
  22. .media__title {
  23. grid-area: title;
  24. margin-top: 0.3em;
  25. }
  26. .media__decoration {
  27. grid-area: decoration;
  28. display: flex;
  29. flex-direction: column;
  30. list-style: none;
  31. justify-self: end;
  32. margin-top: 0.3em;
  33. }
  34. @media only screen and (min-width: 768px) {
  35. .media__decoration {
  36. justify-self: inherit;
  37. }
  38. }
  39. .media__body {
  40. grid-area: body;
  41. display: flex;
  42. }
  43. .media__text {
  44. margin: 0 0.5em;
  45. }
  46. .media__footer {
  47. grid-area: footer;
  48. margin-bottom: 0.3em;
  49. font-size: 90%;
  50. font-style: italic
  51. }
  52. .media__footer--right {
  53. text-align: right;
  54. }
  55. .media:hover {
  56. background-color: var(--media-background-highlight);
  57. }
  58. .media--embedded {
  59. background-color: var(--media-background-embedded);
  60. }