django.css 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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 */
  61. .awesome-django-footer {
  62. padding: 1rem 0.8rem 0;
  63. font-size: 0.7rem;
  64. line-height: 1.5;
  65. text-align: center;
  66. }
  67. /* Capped to match the webring below it, so neither spans the whole footer. */
  68. .awesome-django-newsletter {
  69. margin: 0 auto;
  70. max-width: 34rem;
  71. }
  72. .awesome-django-newsletter iframe {
  73. width: 100%;
  74. height: 220px;
  75. border: 1px solid #ccc;
  76. }
  77. .awesome-django-footer p {
  78. margin: 0.6rem 0;
  79. }
  80. /*
  81. * The webring is a custom element with a shadow root. Its :host rule sets
  82. * display: block, so it grows to the full width of the footer. Outer document
  83. * rules beat :host rules, so constrain it here and keep it centered.
  84. */
  85. .awesome-django-webring {
  86. margin: 1rem auto;
  87. max-width: 34rem;
  88. }
  89. .awesome-django-webring webring-css {
  90. display: block;
  91. margin: 0 auto;
  92. max-width: 100%;
  93. }