blocks.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. /*
  2. Theme Name: Dyad 2
  3. Description: Used to style Gutenberg Blocks.
  4. */
  5. /*--------------------------------------------------------------
  6. >>> TABLE OF CONTENTS:
  7. ----------------------------------------------------------------
  8. 1.0 Block Alignments
  9. 2.0 General Block Styles
  10. 3.0 Blocks - Common Blocks
  11. 4.0 Blocks - Formatting
  12. 5.0 Blocks - Layout Elements
  13. 6.0 Blocks - Widgets
  14. 7.0 Blocks - Colors
  15. --------------------------------------------------------------*/
  16. /*--------------------------------------------------------------
  17. 1.0 Block Alignments
  18. --------------------------------------------------------------*/
  19. .single .hentry {
  20. overflow-x: hidden; /* prevents side-scrolling caused by use of vw */
  21. }
  22. .alignfull,
  23. .alignwide {
  24. clear: both;
  25. }
  26. @media (min-width: 1000px) {
  27. body:not(.has-post-thumbnail) .alignwide {
  28. margin-left: -20%;
  29. margin-right: -20%;
  30. width: auto;
  31. }
  32. body:not(.has-post-thumbnail) .alignfull *[class*="__inner-container"] .alignwide {
  33. margin-left: auto;
  34. margin-right: auto;
  35. max-width: calc(700px + 40%);
  36. }
  37. body:not(.has-post-thumbnail) *[class*="__inner-container"] .alignwide {
  38. margin-left: auto;
  39. margin-right: auto;
  40. }
  41. body:not(.has-post-thumbnail) *[class*="__inner-container"] > *:not(.alignwide):not(.alignfull) {
  42. margin-left: auto;
  43. margin-right: auto;
  44. max-width: 700px;
  45. }
  46. }
  47. body:not(.has-post-thumbnail) .alignfull {
  48. margin-left: calc(50% - 50vw);
  49. margin-right: calc(50% - 50vw);
  50. width: auto;
  51. }
  52. body:not(.has-post-thumbnail) *[class*="__inner-container"] .alignfull {
  53. margin-left: 0;
  54. margin-right: 0;
  55. }
  56. /* Prevent children of columns from expanding outside of their container */
  57. body:not(.has-post-thumbnail) .wp-block-column .alignfull,
  58. body:not(.has-post-thumbnail) .wp-block-column .alignwide {
  59. margin-left: 0;
  60. margin-right: 0;
  61. max-width: 100%;
  62. width: 100%;
  63. }
  64. /* Make non image-based blocks a bit narrower, so they don't get cut off. */
  65. body:not(.has-post-thumbnail) .wp-block-columns.alignfull,
  66. body:not(.has-post-thumbnail) .wp-block-audio.alignfull,
  67. body:not(.has-post-thumbnail) .wp-block-table.alignfull,
  68. body:not(.has-post-thumbnail) .wp-block-latest-comments.alignfull,
  69. body:not(.has-post-thumbnail) .wp-block-categories.alignfull,
  70. body:not(.has-post-thumbnail) .wp-block-latest-posts.alignfull {
  71. margin-left: calc(50% - 48vw);
  72. margin-right: calc(50% - 48vw);
  73. }
  74. /* Make sure video embeds actually fill the full available space. */
  75. .wp-block-embed.is-type-video.alignfull iframe {
  76. height: 100% !important;
  77. width: 100% !important;
  78. }
  79. /*--------------------------------------------------------------
  80. 2.0 General Block Styles
  81. --------------------------------------------------------------*/
  82. /* Captions */
  83. /*--------------------------------------------------------------
  84. 3.0 Blocks - Common Blocks
  85. --------------------------------------------------------------*/
  86. /* Paragraph */
  87. p.has-drop-cap:not(:focus)::first-letter {
  88. font-size: 5em;
  89. margin-top: 0.1em;
  90. }
  91. /* Image */
  92. .wp-block-image {
  93. margin-bottom: 0;
  94. max-width: 1000%;
  95. }
  96. .wp-block-image.is-resized {
  97. margin-left: auto;
  98. margin-right: auto;
  99. }
  100. /* Gallery */
  101. .wp-block-gallery {
  102. margin: 0 0 1.5em;
  103. }
  104. /* Quote */
  105. .wp-block-quote {
  106. margin-bottom: 1.5em;
  107. }
  108. .wp-block-quote:not(.is-large):not(.is-style-large),
  109. .rtl .wp-block-quote:not(.is-large):not(.is-style-large)[style="text-align:left"] {
  110. border-left: 3px solid #ddd;
  111. border-right: 0;
  112. margin: 0 0 1.5em 1.5em;
  113. padding-left: 1.5em;
  114. padding-right: 0;
  115. }
  116. .rtl .wp-block-quote:not(.is-large):not(.is-style-large),
  117. .wp-block-quote:not(.is-large):not(.is-style-large)[style="text-align:right"] {
  118. border-left: 0;
  119. border-right: 3px solid #ddd;
  120. margin-left: 0;
  121. margin-right: 1.5em;
  122. padding-left: 0;
  123. padding-right: 1.5em;
  124. }
  125. .wp-block-quote:not(.is-large):not(.is-style-large)[style="text-align:center"] {
  126. border: 0;
  127. margin-left: 0;
  128. margin-right: 0;
  129. padding-left: 0;
  130. padding-right: 0;
  131. }
  132. .wp-block-quote p:not(:last-child) {
  133. margin-bottom: 0;
  134. padding-bottom: 0;
  135. }
  136. .wp-block-quote.is-large,
  137. .wp-block-quote.is-style-large {
  138. border: 0;
  139. padding-left: 1.5em;
  140. padding-right: 1.5em;
  141. }
  142. .wp-block-quote.is-large cite,
  143. .wp-block-quote.is-style-large cite {
  144. font-size: 80%;
  145. text-align: inherit;
  146. }
  147. /* Audio */
  148. .wp-block-audio {
  149. margin-bottom: 1.5em;
  150. }
  151. .wp-block-audio audio {
  152. display: block;
  153. width: 100%;
  154. }
  155. /* Cover */
  156. .wp-block-cover.aligncenter,
  157. .wp-block-cover-image.aligncenter,
  158. .wp-block-cover.alignleft,
  159. .wp-block-cover-image.alignleft,
  160. .wp-block-cover.alignright,
  161. .wp-block-cover-image.alignright {
  162. display: flex;
  163. }
  164. .wp-block-cover .wp-block-cover-text,
  165. .wp-block-cover-image .wp-block-cover-image-text {
  166. font-size: 24px;
  167. }
  168. /* File */
  169. .wp-block-file .wp-block-file__button {
  170. background-color: #678db8;
  171. border-color: #678db8;
  172. border-radius: 0;
  173. color: #fff;
  174. font-size: 1.4rem;
  175. letter-spacing: 0.1em;
  176. padding: 1em;
  177. text-transform: uppercase;
  178. }
  179. .wp-block-file__button:hover,
  180. .wp-block-file__button:focus {
  181. background-color: #678db8;
  182. opacity: 0.75;
  183. }
  184. .wp-block-file a.wp-block-file__button:active {
  185. opacity: 0.9;
  186. }
  187. .rtl .wp-block-file * + .wp-block-file__button {
  188. margin-left: 0.75em;
  189. margin-right: 0;
  190. }
  191. /*--------------------------------------------------------------
  192. 4.0 Blocks - Formatting Blocks
  193. --------------------------------------------------------------*/
  194. /* Verse */
  195. .wp-block-verse {
  196. background: none;
  197. color: #393d41;
  198. font-family: "Noto Serif", Georgia, serif;
  199. font-size: inherit;
  200. font-style: italic;
  201. padding: 0;
  202. }
  203. .wp-block-verse:before {
  204. display: none;
  205. }
  206. /* Code */
  207. .wp-block-code {
  208. border: 0;
  209. color: #6a6c6e;
  210. border-radius: 0;
  211. }
  212. /* Pullquote */
  213. .wp-block-pullquote {
  214. border-color: #ddd;
  215. margin-bottom: 1.5em;
  216. }
  217. .wp-block-pullquote blockquote {
  218. border: 0;
  219. margin: 0;
  220. padding: 0;
  221. }
  222. .wp-block-pullquote cite {
  223. color: #6c7781;
  224. font-size: 13px;
  225. text-transform: none;
  226. }
  227. /* Table */
  228. .wp-block-table td,
  229. .wp-block-table th {
  230. border-color: #ddd;
  231. }
  232. body:not(.has-post-thumbnail) .wp-block-table.alignwide {
  233. width: 960px; /* 700px + ( 20% * 2 ) */
  234. }
  235. body:not(.has-post-thumbnail) .wp-block-table.alignfull {
  236. width: 96vw;
  237. }
  238. /*--------------------------------------------------------------
  239. 5.0 Blocks - Layout Elements
  240. --------------------------------------------------------------*/
  241. /* Buttons */
  242. .wp-block-button .wp-block-button__link {
  243. font-size: 1.4rem;
  244. letter-spacing: 0.1em;
  245. padding: 1em 1.5em;
  246. text-transform: uppercase;
  247. text-decoration: none;
  248. }
  249. .wp-block-button.aligncenter {
  250. text-align: center;
  251. margin-bottom: 1.5em;
  252. }
  253. .wp-block-button__link {
  254. background-color: #678db8;
  255. color: #fff;
  256. }
  257. .is-style-outline .wp-block-button__link {
  258. border-color: currentColor;
  259. }
  260. .is-style-outline .wp-block-button__link:not(.has-text-color) {
  261. color: #678db8;
  262. }
  263. .wp-block-button .wp-block-button__link:hover,
  264. .wp-block-button .wp-block-button__link:focus {
  265. opacity: 0.75;
  266. }
  267. .wp-block-button .wp-block-button__link:active {
  268. opacity: 0.9;
  269. }
  270. /* Separator */
  271. .wp-block-separator {
  272. border: 0;
  273. }
  274. /*--------------------------------------------------------------
  275. 6.0 Blocks - Widget Blocks
  276. --------------------------------------------------------------*/
  277. /* General Widget styles */
  278. .wp-block-categories.aligncenter,
  279. .wp-block-categories.aligncenter ul,
  280. .wp-block-archives.aligncenter,
  281. .wp-block-latest-posts.aligncenter,
  282. .wp-block-latest-comments.aligncenter {
  283. list-style-position: inside;
  284. text-align: center;
  285. }
  286. /* Latest Posts */
  287. .wp-block-latest-posts.is-grid {
  288. margin-left: 0;
  289. margin-right: 0;
  290. }
  291. /* Latest Comments */
  292. .wp-block-latest-comments {
  293. font-size: 17px;
  294. margin-left: 0;
  295. margin-right: 0;
  296. }
  297. .wp-block-latest-comments a {
  298. text-decoration: none;
  299. }
  300. .wp-block-latest-comments__comment-date {
  301. font-size: 15px;
  302. }
  303. .wp-block-latest-comments__comment-author,
  304. .wp-block-latest-comments__comment-link {
  305. font-weight: 700;
  306. text-decoration: none;
  307. }
  308. .wp-block-latest-comments__comment-excerpt p {
  309. font-size: inherit;
  310. margin: 0;
  311. }
  312. /*--------------------------------------------------------------
  313. 7.0 Blocks - Colors
  314. --------------------------------------------------------------*/
  315. .has-bright-blue-color,
  316. .has-bright-blue-color:hover,
  317. .has-bright-blue-color:focus,
  318. .has-bright-blue-color:active,
  319. .has-bright-blue-color:visited {
  320. color: #678db8;
  321. }
  322. .has-bright-blue-background-color,
  323. .has-bright-blue-background-color:hover,
  324. .has-bright-blue-background-color:focus,
  325. .has-bright-blue-background-color:active,
  326. .has-bright-blue-background-color:visited {
  327. background-color: #678db8;
  328. }
  329. .has-yellow-color,
  330. .has-yellow-color:hover,
  331. .has-yellow-color:focus,
  332. .has-yellow-color:active,
  333. .has-yellow-color:visited {
  334. color: #e7ae01;
  335. }
  336. .has-yellow-background-color,
  337. .has-yellow-background-color:hover,
  338. .has-yellow-background-color:focus,
  339. .has-yellow-background-color:active,
  340. .has-yellow-background-color:visited {
  341. background-color: #e7ae01;
  342. }
  343. .has-light-gray-blue-color,
  344. .has-light-gray-blue-color:hover,
  345. .has-light-gray-blue-color:focus,
  346. .has-light-gray-blue-color:active,
  347. .has-light-gray-blue-color:visited {
  348. color: #abb7c3;
  349. }
  350. .has-light-gray-blue-background-color,
  351. .has-light-gray-blue-background-color:hover,
  352. .has-light-gray-blue-background-color:focus,
  353. .has-light-gray-blue-background-color:active,
  354. .has-light-gray-blue-background-color:visited {
  355. background-color: #abb7c3;
  356. }
  357. .has-medium-gray-color,
  358. .has-medium-gray-color:hover,
  359. .has-medium-gray-color:focus,
  360. .has-medium-gray-color:active,
  361. .has-medium-gray-color:visited {
  362. color: #6a6c6e;
  363. }
  364. .has-medium-gray-background-color,
  365. .has-medium-gray-background-color:hover,
  366. .has-medium-gray-background-color:focus,
  367. .has-medium-gray-background-color:active,
  368. .has-medium-gray-background-color:visited {
  369. background-color: #6a6c6e;
  370. }
  371. .has-dark-gray-color,
  372. .has-dark-gray-color:hover,
  373. .has-dark-gray-color:focus,
  374. .has-dark-gray-color:active,
  375. .has-dark-gray-color:visited {
  376. color: #1a1c1e;
  377. }
  378. .has-dark-gray-background-color,
  379. .has-dark-gray-background-color:hover,
  380. .has-dark-gray-background-color:focus,
  381. .has-dark-gray-background-color:active,
  382. .has-dark-gray-background-color:visited {
  383. background-color: #1a1c1e;
  384. }
  385. .has-dark-gray-blue-color,
  386. .has-dark-gray-blue-color:hover,
  387. .has-dark-gray-blue-color:focus,
  388. .has-dark-gray-blue-color:active,
  389. .has-dark-gray-blue-color:visited {
  390. color: #292c2f;
  391. }
  392. .has-dark-gray-blue-background-color,
  393. .has-dark-gray-blue-background-color:hover,
  394. .has-dark-gray-blue-background-color:focus,
  395. .has-dark-gray-blue-background-color:active,
  396. .has-dark-gray-blue-background-color:visited {
  397. background-color: #292c2f;
  398. }
  399. .has-white-color,
  400. .has-white-color:hover,
  401. .has-white-color:focus,
  402. .has-white-color:active,
  403. .has-white-color:visited {
  404. color: #fff;
  405. }
  406. .has-white-background-color,
  407. .has-white-background-color:hover,
  408. .has-white-background-color:focus,
  409. .has-white-background-color:active,
  410. .has-white-background-color:visited {
  411. background-color: #fff;
  412. }