Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame^] | 1 | /* |
| 2 | The CSS in this style tag is based off of Bear Blog's default CSS. |
| 3 | https://github.com/HermanMartinus/bearblog/blob/297026a877bc2ab2b3bdfbd6b9f7961c350917dd/templates/styles/blog/default.css |
| 4 | License MIT: https://github.com/HermanMartinus/bearblog/blob/master/LICENSE.md |
| 5 | */ |
| 6 | |
| 7 | :root { |
| 8 | --accent: #2337ff; |
| 9 | --accent-dark: #000d8a; |
| 10 | --black: 15, 18, 25; |
| 11 | --gray: 96, 115, 159; |
| 12 | --gray-light: 229, 233, 240; |
| 13 | --gray-dark: 34, 41, 57; |
| 14 | --gray-gradient: rgba(var(--gray-light), 50%), #fff; |
| 15 | --box-shadow: 0 2px 6px rgba(var(--gray), 25%), 0 8px 24px rgba(var(--gray), 33%), |
| 16 | 0 16px 32px rgba(var(--gray), 33%); |
| 17 | } |
| 18 | @font-face { |
| 19 | font-family: 'Atkinson'; |
| 20 | src: url('/fonts/atkinson-regular.woff') format('woff'); |
| 21 | font-weight: 400; |
| 22 | font-style: normal; |
| 23 | font-display: swap; |
| 24 | } |
| 25 | @font-face { |
| 26 | font-family: 'Atkinson'; |
| 27 | src: url('/fonts/atkinson-bold.woff') format('woff'); |
| 28 | font-weight: 700; |
| 29 | font-style: normal; |
| 30 | font-display: swap; |
| 31 | } |
| 32 | body { |
| 33 | font-family: 'Atkinson', sans-serif; |
| 34 | margin: 0; |
| 35 | padding: 0; |
| 36 | text-align: left; |
| 37 | background: linear-gradient(var(--gray-gradient)) no-repeat; |
| 38 | background-size: 100% 600px; |
| 39 | word-wrap: break-word; |
| 40 | overflow-wrap: break-word; |
| 41 | color: rgb(var(--gray-dark)); |
| 42 | font-size: 20px; |
| 43 | line-height: 1.7; |
| 44 | } |
| 45 | main { |
| 46 | width: 720px; |
| 47 | max-width: calc(100% - 2em); |
| 48 | margin: auto; |
| 49 | padding: 3em 1em; |
| 50 | } |
| 51 | h1, |
| 52 | h2, |
| 53 | h3, |
| 54 | h4, |
| 55 | h5, |
| 56 | h6 { |
| 57 | margin: 0 0 0.5rem 0; |
| 58 | color: rgb(var(--black)); |
| 59 | line-height: 1.2; |
| 60 | } |
| 61 | h1 { |
| 62 | font-size: 3.052em; |
| 63 | } |
| 64 | h2 { |
| 65 | font-size: 2.441em; |
| 66 | } |
| 67 | h3 { |
| 68 | font-size: 1.953em; |
| 69 | } |
| 70 | h4 { |
| 71 | font-size: 1.563em; |
| 72 | } |
| 73 | h5 { |
| 74 | font-size: 1.25em; |
| 75 | } |
| 76 | strong, |
| 77 | b { |
| 78 | font-weight: 700; |
| 79 | } |
| 80 | a { |
| 81 | color: var(--accent); |
| 82 | } |
| 83 | a:hover { |
| 84 | color: var(--accent); |
| 85 | } |
| 86 | p { |
| 87 | margin-bottom: 1em; |
| 88 | } |
| 89 | .prose p { |
| 90 | margin-bottom: 2em; |
| 91 | } |
| 92 | textarea { |
| 93 | width: 100%; |
| 94 | font-size: 16px; |
| 95 | } |
| 96 | input { |
| 97 | font-size: 16px; |
| 98 | } |
| 99 | table { |
| 100 | width: 100%; |
| 101 | } |
| 102 | img { |
| 103 | max-width: 100%; |
| 104 | height: auto; |
| 105 | border-radius: 8px; |
| 106 | } |
| 107 | code { |
| 108 | padding: 2px 5px; |
| 109 | background-color: rgb(var(--gray-light)); |
| 110 | border-radius: 2px; |
| 111 | } |
| 112 | pre { |
| 113 | padding: 1.5em; |
| 114 | border-radius: 8px; |
| 115 | } |
| 116 | pre > code { |
| 117 | all: unset; |
| 118 | } |
| 119 | blockquote { |
| 120 | border-left: 4px solid var(--accent); |
| 121 | padding: 0 0 0 20px; |
| 122 | margin: 0px; |
| 123 | font-size: 1.333em; |
| 124 | } |
| 125 | hr { |
| 126 | border: none; |
| 127 | border-top: 1px solid rgb(var(--gray-light)); |
| 128 | } |
| 129 | @media (max-width: 720px) { |
| 130 | body { |
| 131 | font-size: 18px; |
| 132 | } |
| 133 | main { |
| 134 | padding: 1em; |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | .sr-only { |
| 139 | border: 0; |
| 140 | padding: 0; |
| 141 | margin: 0; |
| 142 | position: absolute !important; |
| 143 | height: 1px; |
| 144 | width: 1px; |
| 145 | overflow: hidden; |
| 146 | /* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */ |
| 147 | clip: rect(1px 1px 1px 1px); |
| 148 | /* maybe deprecated but we need to support legacy browsers */ |
| 149 | clip: rect(1px, 1px, 1px, 1px); |
| 150 | /* modern browsers, clip-path works inwards from each corner */ |
| 151 | clip-path: inset(50%); |
| 152 | /* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */ |
| 153 | white-space: nowrap; |
| 154 | } |