django.css 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*
  2. * Django brand palette, ported from the old Jekyll theme at
  3. * _sass/color_schemes/django.scss
  4. */
  5. /*
  6. * The light palette sits on :root, not on [data-md-color-scheme="default"].
  7. * The theme only puts that attribute on <html> once its JavaScript runs, so a
  8. * scheme-scoped rule leaves the header indigo on the first paint.
  9. */
  10. :root {
  11. --django-green-dark: #0c4b33;
  12. --django-green-mid: #20aa76;
  13. --django-green-light: #44b78b;
  14. --django-green-pale: #e8f5f0;
  15. --django-cream: #f9f7f3;
  16. --md-primary-fg-color: var(--django-green-dark);
  17. --md-primary-fg-color--light: var(--django-green-mid);
  18. --md-primary-fg-color--dark: #072e1f;
  19. --md-primary-bg-color: #ffffff;
  20. --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
  21. --md-accent-fg-color: var(--django-green-mid);
  22. --md-accent-fg-color--transparent: rgba(32, 170, 118, 0.1);
  23. --md-typeset-a-color: var(--django-green-mid);
  24. --md-code-bg-color: var(--django-cream);
  25. }
  26. /* Dark scheme */
  27. [data-md-color-scheme="slate"] {
  28. --md-primary-fg-color: var(--django-green-dark);
  29. --md-primary-fg-color--light: var(--django-green-light);
  30. --md-primary-fg-color--dark: #051f15;
  31. --md-primary-bg-color: #ffffff;
  32. --md-accent-fg-color: var(--django-green-light);
  33. --md-accent-fg-color--transparent: rgba(68, 183, 139, 0.1);
  34. --md-typeset-a-color: var(--django-green-light);
  35. }
  36. /* Headings use the dark Django green, as they did in the Jekyll theme. */
  37. .md-typeset h1,
  38. .md-typeset h2,
  39. .md-typeset h3,
  40. .md-typeset h4 {
  41. color: var(--django-green-dark);
  42. }
  43. /* Dark green is unreadable on the dark background, so lighten it. */
  44. [data-md-color-scheme="slate"] .md-typeset h1,
  45. [data-md-color-scheme="slate"] .md-typeset h2,
  46. [data-md-color-scheme="slate"] .md-typeset h3,
  47. [data-md-color-scheme="slate"] .md-typeset h4 {
  48. color: var(--django-green-light);
  49. }
  50. /* The Django logo is a wide SVG. Keep it from overflowing on small screens. */
  51. .md-typeset picture img {
  52. max-width: 320px;
  53. height: auto;
  54. }
  55. /* The list is long and mostly one-line entries. Tighten the leading so more
  56. of each category fits on screen. */
  57. .md-typeset ul li {
  58. margin-bottom: 0.2rem;
  59. }
  60. /* Footer additions. These sit inside .md-footer, which has a dark background,
  61. so the text needs the footer foreground colors. */
  62. .awesome-django-footer {
  63. padding: 1.2rem 0.8rem;
  64. color: var(--md-footer-fg-color--light);
  65. font-size: 0.7rem;
  66. line-height: 1.5;
  67. text-align: center;
  68. }
  69. .awesome-django-footer a {
  70. color: var(--md-footer-fg-color);
  71. text-decoration: underline;
  72. }
  73. .awesome-django-footer a:hover {
  74. color: var(--md-accent-fg-color);
  75. }
  76. /* Capped to match the webring below it, so neither spans the whole footer. */
  77. .awesome-django-newsletter {
  78. margin: 0 auto;
  79. max-width: 34rem;
  80. }
  81. .awesome-django-newsletter iframe {
  82. width: 100%;
  83. height: 220px;
  84. border: 1px solid #ccc;
  85. }
  86. .awesome-django-footer p {
  87. margin: 0.6rem 0;
  88. }
  89. /*
  90. * The webring is a custom element with a shadow root. Its :host rule sets
  91. * display: block, so it grows to the full width of the footer. Outer document
  92. * rules beat :host rules, so constrain it here and keep it centered.
  93. */
  94. .awesome-django-webring {
  95. margin: 1rem auto;
  96. max-width: 34rem;
  97. }
  98. .awesome-django-webring webring-css {
  99. display: block;
  100. margin: 0 auto;
  101. max-width: 100%;
  102. }