editor-blocks.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. /*
  2. Theme Name: Libre 2
  3. Description: Used to style Gutenberg Blocks in the editor.
  4. */
  5. /*--------------------------------------------------------------
  6. >>> TABLE OF CONTENTS:
  7. ----------------------------------------------------------------
  8. 1.0 General Typography
  9. 2.0 General Block Settings
  10. 3.0 Blocks - Common Blocks
  11. 4.0 Blocks - Formatting
  12. 5.0 Blocks - Layout Elements
  13. 6.0 Blocks - Widgets
  14. --------------------------------------------------------------*/
  15. /*--------------------------------------------------------------
  16. 1.0 General Typography
  17. --------------------------------------------------------------*/
  18. .edit-post-visual-editor .editor-block-list__block,
  19. .editor-default-block-appender textarea.editor-default-block-appender__content {
  20. font-family: "Libre Baskerville", Libre, Georgia, Times, serif;
  21. }
  22. .edit-post-visual-editor .editor-block-list__block,
  23. .edit-post-visual-editor .editor-block-list__block p,
  24. .editor-default-block-appender textarea.editor-default-block-appender__content {
  25. font-size: 16px;
  26. }
  27. .edit-post-visual-editor .editor-block-list__block {
  28. color: #404040;
  29. }
  30. /* Post title */
  31. .editor-post-title__block .editor-post-title__input {
  32. color: #404040;
  33. font-family: "Libre Baskerville", Libre, Georgia, Times, serif;
  34. font-size: 29px;
  35. }
  36. @media screen and ( min-width: 720px ) {
  37. .editor-post-title__block .editor-post-title__input {
  38. font-size: 47px;
  39. }
  40. }
  41. /* Headings */
  42. .edit-post-visual-editor h1,
  43. .wp-block-freeform.block-library-rich-text__tinymce h1 {
  44. font-size: 29px;
  45. }
  46. .edit-post-visual-editor h2,
  47. .wp-block-freeform.block-library-rich-text__tinymce h2 {
  48. font-size: 23px;
  49. }
  50. .edit-post-visual-editor h3,
  51. .wp-block-freeform.block-library-rich-text__tinymce h3 {
  52. font-size: 18px;
  53. }
  54. .edit-post-visual-editor h4,
  55. .wp-block-freeform.block-library-rich-text__tinymce h4 {
  56. font-size: 14px;
  57. }
  58. .edit-post-visual-editor h5,
  59. .wp-block-freeform.block-library-rich-text__tinymce h5 {
  60. font-size: 13px;
  61. }
  62. .edit-post-visual-editor h6,
  63. .wp-block-freeform.block-library-rich-text__tinymce h6 {
  64. font-size: 12px;
  65. }
  66. @media (min-width: 720px) {
  67. .editor-styles-wrapper.edit-post-visual-editor h1,
  68. .wp-block-freeform.block-library-rich-text__tinymce h1 {
  69. font-size: 47px;
  70. }
  71. .editor-styles-wrapper.edit-post-visual-editor h2,
  72. .wp-block-freeform.block-library-rich-text__tinymce h2 {
  73. font-size: 29px;
  74. }
  75. .editor-styles-wrapper.edit-post-visual-editor h3,
  76. .wp-block-freeform.block-library-rich-text__tinymce h3 {
  77. font-size: 23px;
  78. }
  79. .editor-styles-wrapper.edit-post-visual-editor h4,
  80. .wp-block-freeform.block-library-rich-text__tinymce h4 {
  81. font-size: 18px;
  82. }
  83. .editor-styles-wrapper.edit-post-visual-editor h5,
  84. .wp-block-freeform.block-library-rich-text__tinymce h5 {
  85. font-size: 14px;
  86. }
  87. .editor-styles-wrapper.edit-post-visual-editor h6,
  88. .wp-block-freeform.block-library-rich-text__tinymce h6 {
  89. font-size: 13px;
  90. }
  91. }
  92. /*--------------------------------------------------------------
  93. 2.0 General Block Settings
  94. --------------------------------------------------------------*/
  95. /* Main content width */
  96. .wp-block {
  97. max-width: 705px; /* 675px + 30px to account for padding */
  98. }
  99. /* Link styles */
  100. .edit-post-visual-editor a,
  101. .editor-block-list__block a,
  102. .wp-block-freeform.block-library-rich-text__tinymce a {
  103. box-shadow: 0 1px 0 0 currentColor;
  104. color: #404040;
  105. text-decoration: none;
  106. transition: 0.2s;
  107. }
  108. /* Caption styles */
  109. [class^="wp-block-"] figcaption {
  110. color: inherit;
  111. font-size: 14px;
  112. font-style: italic;
  113. position: relative;
  114. }
  115. [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
  116. text-align: left;
  117. }
  118. [class^="wp-block-"]:not(.wp-block-gallery) figcaption::after {
  119. border-top: 1px solid;
  120. clear: both;
  121. content: "";
  122. display: block;
  123. margin-top: .875em;
  124. padding-top: .875em;
  125. width: 25%;
  126. }
  127. .rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
  128. text-align: right;
  129. }
  130. /* Table styles */
  131. .wp-block-freeform.block-library-rich-text__tinymce table,
  132. .wp-block-freeform.block-library-rich-text__tinymce table th,
  133. .wp-block-freeform.block-library-rich-text__tinymce table td {
  134. border: 0;
  135. }
  136. .rtl .wp-block-freeform.block-library-rich-text__tinymce td,
  137. .rtl .wp-block-freeform.block-library-rich-text__tinymce th {
  138. text-align: right;
  139. }
  140. /* Quote styles */
  141. .wp-block-freeform.block-library-rich-text__tinymce blockquote {
  142. border: 0;
  143. padding-left: 2.5em;
  144. }
  145. .wp-block-freeform.block-library-rich-text__tinymce blockquote:before {
  146. content: "\201c";
  147. display: block;
  148. font-size: 72px;
  149. line-height: 1;
  150. position: absolute;
  151. top: 0;
  152. left: 0;
  153. }
  154. .wp-block-freeform.block-library-rich-text__tinymce blockquote cite {
  155. font-style: italic;
  156. }
  157. .rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote {
  158. padding-left: 0;
  159. padding-right: 2.5em;
  160. }
  161. .rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote:before {
  162. left: auto;
  163. right: 0;
  164. }
  165. @media (min-width: 720px) {
  166. .wp-block-freeform.block-library-rich-text__tinymce blockquote {
  167. padding-left: 4em;
  168. }
  169. .rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote {
  170. padding-left: 0;
  171. padding-right: 4em;
  172. }
  173. .wp-block-freeform.block-library-rich-text__tinymce blockquote p {
  174. font-size: 23px;
  175. }
  176. .wp-block-freeform.block-library-rich-text__tinymce blockquote:before {
  177. font-size: 129px;
  178. }
  179. }
  180. /* Definition List styles */
  181. .wp-block-freeform.block-library-rich-text__tinymce dt {
  182. font-weight: bold;
  183. }
  184. /* Pre styles */
  185. .editor-styles-wrapper .wp-block-freeform.block-library-rich-text__tinymce pre {
  186. font-family: "Libre Baskerville", Libre, Georgia, Times, serif;
  187. font-size: inherit;
  188. }
  189. /*--------------------------------------------------------------
  190. 3.0 Blocks - Common Blocks
  191. --------------------------------------------------------------*/
  192. /* Paragraph */
  193. p.has-drop-cap:not(:focus)::first-letter {
  194. font-size: 5em;
  195. margin-top: 0.15em;
  196. }
  197. /* Quote */
  198. .wp-block-quote p,
  199. .wp-block-quote.is-large p,
  200. .wp-block-quote.is-style-large p {
  201. margin-bottom: 1.0em;
  202. }
  203. .wp-block-quote:not(.is-large):not(.is-style-large) {
  204. border: 0;
  205. padding-left: 0.5em;
  206. }
  207. .wp-block-quote:before {
  208. left: -40.5px;
  209. }
  210. .wp-block-quote.is-large:before,
  211. .wp-block-quote.is-style-large:before {
  212. display: none
  213. }
  214. .wp-block-quote__citation {
  215. color: inherit;
  216. font-size: inherit;
  217. font-style: italic;
  218. }
  219. .wp-block-quote.is-large,
  220. .wp-block-quote.is-style-large {
  221. font-style: normal;
  222. padding: 0;
  223. }
  224. .edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-large p,
  225. .edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-style-large p {
  226. font-size: 20px;
  227. font-style: normal;
  228. }
  229. .wp-block-quote.is-large .wp-block-quote__citation,
  230. .wp-block-quote.is-style-large .wp-block-quote__citation {
  231. font-size: 18px;
  232. }
  233. .rtl .wp-block-quote:before,
  234. .wp-block-quote[style*="text-align:right"]:before,
  235. .wp-block-quote[style*="text-align: right"]:before {
  236. left: auto;
  237. right: -40.5px;
  238. }
  239. .rtl .wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align:left"],
  240. .rtl .wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align: left"] {
  241. padding-left: 0.5em;
  242. padding-right: 0;
  243. }
  244. .rtl .wp-block-quote:not(.is-large):not(.is-style-large),
  245. .wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align:right"],
  246. .wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align: right"] {
  247. padding-left: 0;
  248. padding-right: 0.5em;
  249. }
  250. .rtl .wp-block-quote[style*="text-align:left"]:before,
  251. .rtl .wp-block-quote[style*="text-align: left"]:before {
  252. left: -40.5px;
  253. right: auto;
  254. }
  255. @media (min-width: 720px) {
  256. .edit-post-visual-editor .editor-block-list__block .wp-block-quote p {
  257. font-size: 23px;
  258. }
  259. .editor-styles-wrapper .wp-block-quote:before {
  260. font-size: 129px;
  261. }
  262. .edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-large p,
  263. .edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-style-large p {
  264. font-size: 28.75px;
  265. }
  266. .wp-block-quote.is-large .wp-block-quote__citation,
  267. .wp-block-quote.is-style-large .wp-block-quote__citation {
  268. font-size: 23px;
  269. }
  270. .rtl .wp-block-quote:before,
  271. .wp-block-quote[style*="text-align:right"]:before,
  272. .wp-block-quote[style*="text-align: right"]:before {
  273. right: -70.5px;
  274. }
  275. .rtl .wp-block-quote[style*="text-align:left"]:before,
  276. .rtl .wp-block-quote[style*="text-align: left"]:before {
  277. left: -70.5px;
  278. }
  279. }
  280. /* Audio */
  281. .editor-styles-wrapper .wp-block-audio {
  282. margin-left: 0;
  283. margin-right: 0;
  284. }
  285. /* Cover */
  286. .edit-post-visual-editor .editor-block-list__block .wp-block-cover-image .wp-block-cover-image-text,
  287. .edit-post-visual-editor .editor-block-list__block .wp-block-cover-image .wp-block-cover-text,
  288. .edit-post-visual-editor .editor-block-list__block .wp-block-cover-image h2,
  289. .edit-post-visual-editor .editor-block-list__block .wp-block-cover .wp-block-cover-image-text,
  290. .edit-post-visual-editor .editor-block-list__block .wp-block-cover .wp-block-cover-text,
  291. .edit-post-visual-editor .editor-block-list__block .wp-block-cover h2 {
  292. font-size: 1.5em;
  293. }
  294. /* File */
  295. .wp-block-file :not(.wp-block-file__button) {
  296. box-shadow: none;
  297. }
  298. .wp-block-file .wp-block-file__button {
  299. border: 0 none;
  300. border-radius: 0;
  301. box-shadow: 0 2px 0 0 currentColor;
  302. background: transparent;
  303. color: #404040;
  304. font-size: 18px;
  305. font-size: 1rem;
  306. font-weight: bold;
  307. padding: 0.21875em 0;
  308. transition: 0.2s;
  309. }
  310. /*--------------------------------------------------------------
  311. 4.0 Blocks - Formatting
  312. --------------------------------------------------------------*/
  313. /* Verse */
  314. .wp-block-verse {
  315. font-style: italic;
  316. }
  317. .editor-styles-wrapper .wp-block-verse pre {
  318. font-family: "Libre Baskerville", Libre, Georgia, Times, serif;
  319. }
  320. .wp-block-verse pre {
  321. padding: 0;
  322. }
  323. /* Code */
  324. .wp-block-code {
  325. border: none;
  326. border-radius: 0;
  327. }
  328. .wp-block-code textarea {
  329. background: transparent;
  330. }
  331. /* Preformatted */
  332. .editor-styles-wrapper .wp-block-preformatted pre {
  333. font-family: "Libre Baskerville", Libre, Georgia, Times, serif;
  334. }
  335. /* Pullquote */
  336. .wp-block-pullquote {
  337. border: 0;
  338. }
  339. .editor-styles-wrapper .wp-block-pullquote blockquote {
  340. margin-left: inherit;
  341. padding: 0;
  342. }
  343. .editor-styles-wrapper .wp-block-pullquote blockquote:before {
  344. display: none;
  345. }
  346. .wp-block-pullquote blockquote p {
  347. margin-bottom: 0.75em;
  348. }
  349. .wp-block-pullquote .wp-block-pullquote__citation {
  350. font-size: inherit;
  351. font-style: italic;
  352. text-transform: none;
  353. }
  354. .wp-block-pullquote.alignleft blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty="true"]::before,
  355. .wp-block-pullquote.alignright blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty="true"]::before,
  356. .wp-block-pullquote.alignleft blockquote > .editor-rich-text p,
  357. .wp-block-pullquote.alignright blockquote > .editor-rich-text p {
  358. font-size: 20px;
  359. }
  360. /* Table */
  361. .wp-block-table,
  362. .wp-block-table td,
  363. .wp-block-table th {
  364. border: 0;
  365. }
  366. .wp-block-table th {
  367. text-align: left;
  368. }
  369. .rtl .wp-block-table th {
  370. text-align: right;
  371. }
  372. .wp-block-table__cell-content {
  373. padding: 0;
  374. }
  375. /*--------------------------------------------------------------
  376. 5.0 Blocks - Layout Elements
  377. --------------------------------------------------------------*/
  378. /* Buttons */
  379. .wp-block-button .wp-block-button__link {
  380. box-shadow: none;
  381. }
  382. .wp-block-button__link {
  383. background: #404040;
  384. color: #fff;
  385. font-size: 18px;
  386. font-size: 1rem;
  387. font-weight: bold;
  388. padding: 0.5em 1.25em;
  389. transition: 0.2s;
  390. }
  391. .is-style-outline .wp-block-button__link {
  392. border-color: currentColor;
  393. background-color: transparent;
  394. }
  395. .is-style-outline .wp-block-button__link:not(.has-text-color) {
  396. color: #222;
  397. }
  398. /* Separator */
  399. .wp-block-separator {
  400. background-color: #ccc;
  401. border: 0;
  402. height: 1px;
  403. }
  404. /*--------------------------------------------------------------
  405. 6.0 Blocks - Widgets
  406. --------------------------------------------------------------*/
  407. /* General Widget styles */
  408. .edit-post-visual-editor [data-align="center"] .wp-block-categories__list,
  409. .edit-post-visual-editor [data-align="center"] .wp-block-archives,
  410. .edit-post-visual-editor [data-align="center"] .wp-block-lastest-posts {
  411. list-style-position: inside;
  412. }
  413. /* Latest Comments */
  414. .editor-styles-wrapper .wp-block-latest-comments {
  415. padding-left: 0;
  416. padding-right: 0;
  417. }
  418. .wp-block-latest-comments__comment a {
  419. box-shadow: 0 1px 0 0 rgba(0,0,0,0);
  420. }