blocks.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. /*
  2. Theme Name: Libre 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. .singular.no-sidebar {
  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: 1140px) {
  27. .singular.no-sidebar .alignwide,
  28. .singular.no-sidebar .wp-block-group .alignwide {
  29. margin-left: -25%;
  30. margin-right: -25%;
  31. max-width: 1000%;
  32. width: auto;
  33. }
  34. .singular.no-sidebar .wp-block-embed.is-type-video.alignwide iframe {
  35. width: 100% !important;
  36. height: 100% !important;
  37. }
  38. }
  39. /* added .wp-block-cover.alignfull to fix issue GH# 6247 */
  40. .singular.no-sidebar .alignfull,
  41. .singular.no-sidebar .wp-block-group .alignfull,
  42. .wp-block-cover.alignfull {
  43. margin-left: calc(50% - 50vw);
  44. margin-right: calc(50% - 50vw);
  45. max-width: 1000%;
  46. width: auto;
  47. }
  48. /* Make non image-based blocks a bit narrower, so they don't get cut off. */
  49. .singular.no-sidebar .wp-block-columns.alignfull,
  50. .singular.no-sidebar .wp-block-audio.alignfull,
  51. .singular.no-sidebar .wp-block-table.alignfull,
  52. .singular.no-sidebar .wp-block-latest-comments.alignfull,
  53. .singular.no-sidebar .wp-block-categories.alignfull,
  54. .singular.no-sidebar .wp-block-latest-posts.alignfull {
  55. margin-left: calc(50% - 48vw);
  56. margin-right: calc(50% - 48vw);
  57. }
  58. .singular.no-sidebar .wp-block-embed.is-type-video iframe {
  59. max-height: 100%;
  60. }
  61. .singular.no-sidebar .wp-block-embed.is-type-video.alignfull iframe {
  62. width: 100% !important;
  63. height: 100% !important;
  64. }
  65. .singular.no-sidebar *[class^="wp-block"] .alignwide,
  66. .singular.no-sidebar *[class^="wp-block"] .alignfull {
  67. max-width: inherit;
  68. margin-left: inherit;
  69. margin-right: inherit;
  70. }
  71. /*--------------------------------------------------------------
  72. 3.0 Blocks - Common Blocks
  73. --------------------------------------------------------------*/
  74. /* Paragraph */
  75. p.has-drop-cap:not(:focus)::first-letter {
  76. font-size: 5em;
  77. margin-top: 0.15em;
  78. }
  79. /* Quote */
  80. .wp-block-quote p,
  81. .wp-block-quote.is-large p,
  82. .wp-block-quote.is-style-large p {
  83. margin-bottom: 1em;
  84. }
  85. .wp-block-quote.is-large p,
  86. .wp-block-quote.is-style-large p {
  87. font-size: 1.25em;
  88. font-style: normal;
  89. }
  90. .wp-block-quote.is-large,
  91. .wp-block-quote.is-style-large {
  92. border: 0;
  93. padding: 0;
  94. }
  95. .wp-block-quote.is-large:before,
  96. .wp-block-quote.is-style-large:before {
  97. display: none;
  98. }
  99. .wp-block-quote.is-large cite,
  100. .wp-block-quote.is-style-large cite {
  101. font-size: inherit;
  102. text-align: inherit;
  103. }
  104. .wp-block-quote[style*="text-align:right"] {
  105. margin-left: 0;
  106. margin-right: 3.5em;
  107. }
  108. .wp-block-quote[style*="text-align:right"]::before {
  109. left: auto;
  110. right: 0.6em;
  111. }
  112. @media (min-width: 720px) {
  113. .wp-block-quote[style*="text-align:right"]::before {
  114. right: -0.6em;
  115. }
  116. }
  117. .rtl .wp-block-quote[style*="text-align:left"] {
  118. margin-left: 3.5em;
  119. margin-right: 0;
  120. }
  121. .rtl .wp-block-quote[style*="text-align:left"]::before {
  122. left: 0.6em;
  123. right: auto;
  124. }
  125. @media (min-width: 720px) {
  126. .rtl .wp-block-quote[style*="text-align:left"]::before {
  127. left: -0.6em;
  128. }
  129. }
  130. /* Audio */
  131. .wp-block-audio {
  132. margin: 0 0 1.75em;
  133. }
  134. .wp-block-audio audio {
  135. display: block;
  136. width: 100%;
  137. }
  138. /* Cover */
  139. .wp-block-cover.aligncenter,
  140. .wp-block-cover-image.aligncenter,
  141. .wp-block-cover.alignleft,
  142. .wp-block-cover-image.alignleft,
  143. .wp-block-cover.alignright,
  144. .wp-block-cover-image.alignright {
  145. display: flex;
  146. }
  147. .wp-block-cover-image .wp-block-cover-image-text,
  148. .wp-block-cover-image .wp-block-cover-text,
  149. .wp-block-cover-image h2,
  150. .wp-block-cover .wp-block-cover-image-text,
  151. .wp-block-cover .wp-block-cover-text,
  152. .wp-block-cover h2 {
  153. font-size: 1.5em;
  154. }
  155. .wp-block-cover.alignfull .wp-block-cover__inner-container {
  156. max-width: 740px;
  157. margin: 0 auto;
  158. }
  159. /* File */
  160. .wp-block-file a:not(.wp-block-file__button),
  161. .wp-block-file a:not(.wp-block-file__button):hover {
  162. box-shadow: none;
  163. }
  164. .wp-block-file a.wp-block-file__button,
  165. .wp-block-file a.wp-block-file__button:visited {
  166. border: 0 none;
  167. border-radius: 0;
  168. box-shadow: 0 2px 0 0 currentColor;
  169. background: transparent;
  170. color: #404040;
  171. font-size: 18px;
  172. font-size: 1rem;
  173. font-weight: bold;
  174. padding: 0.21875em 0;
  175. transition: 0.2s;
  176. }
  177. .wp-block-file a.wp-block-file__button:hover,
  178. .wp-block-file a.wp-block-file__button:focus,
  179. .wp-block-file a.wp-block-file__button:active {
  180. background: transparent;
  181. box-shadow: 0 4px 0 0 currentColor;
  182. color: #404040;
  183. outline: none;
  184. }
  185. .rtl .wp-block-file * + .wp-block-file__button {
  186. margin-left: 0.75em;
  187. margin-right: 0;
  188. }
  189. /* Video */
  190. .wp-block-video video {
  191. width: 100%;
  192. }
  193. /* Image */
  194. .wp-block-image .aligncenter {
  195. text-align: center;
  196. }
  197. /*--------------------------------------------------------------
  198. 4.0 Blocks - Formatting
  199. --------------------------------------------------------------*/
  200. /* Verse */
  201. .wp-block-verse {
  202. font-family: inherit;
  203. font-style: italic;
  204. padding: 0;
  205. }
  206. /* Code */
  207. /* Preformatted */
  208. /* Pullquote */
  209. .wp-block-pullquote blockquote {
  210. margin-left: inherit;
  211. padding: 0;
  212. }
  213. .wp-block-pullquote blockquote:before {
  214. display: none;
  215. }
  216. .wp-block-pullquote blockquote p {
  217. margin-bottom: 0.75em;
  218. }
  219. .wp-block-pullquote cite,
  220. .wp-block-pullquote.alignleft cite,
  221. .wp-block-pullquote.alignright cite {
  222. font-size: 18px;
  223. }
  224. /* Table */
  225. .wp-block-table th {
  226. text-align: left;
  227. }
  228. @media (min-width: 1140px) {
  229. .singular.no-sidebar .wp-block-table.alignwide {
  230. width: 1100px;
  231. }
  232. }
  233. .singular.no-sidebar .wp-block-table.alignfull {
  234. width: 96vw;
  235. }
  236. .rtl .wp-block-table th {
  237. text-align: right;
  238. }
  239. /*--------------------------------------------------------------
  240. 5.0 Blocks - Layout Elements
  241. --------------------------------------------------------------*/
  242. /* Buttons */
  243. .wp-block-button .wp-block-button__link {
  244. box-shadow: none;
  245. }
  246. .wp-block-button__link {
  247. font-size: 18px;
  248. font-size: 1rem;
  249. font-weight: bold;
  250. padding: 0.5em 1.25em;
  251. transition: 0.2s;
  252. }
  253. .wp-block-button__link,
  254. .wp-block-button__link:visited {
  255. background: #404040;
  256. color: #fff;
  257. }
  258. .is-style-outline .wp-block-button__link {
  259. border-color: currentColor;
  260. background: transparent;
  261. }
  262. .is-style-outline .wp-block-button__link:not(.has-text-color) {
  263. color: #404040;
  264. }
  265. .wp-block-button .wp-block-button__link:hover,
  266. .wp-block-button .wp-block-button__link:focus,
  267. .wp-block-button .wp-block-button__link:active {
  268. opacity: 0.8;
  269. box-shadow: none;
  270. }
  271. /* Group */
  272. .wp-block-group.alignfull .wp-block-group__inner-container {
  273. max-width: 740px;
  274. margin: 0 auto;
  275. }
  276. /* Separator */
  277. .wp-block-separator {
  278. border: 0;
  279. }
  280. .wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
  281. margin-left: auto;
  282. margin-right: auto;
  283. max-width: 100px;
  284. }
  285. /* Media & Text */
  286. .wp-block-media-text {
  287. margin-bottom: 1.75em;
  288. }
  289. .wp-block-media-text *:last-child {
  290. margin-bottom: 0;
  291. }
  292. /*--------------------------------------------------------------
  293. 6.0 Blocks - Widgets
  294. --------------------------------------------------------------*/
  295. /* General Widget styles */
  296. .wp-block-categories.aligncenter,
  297. .wp-block-categories.aligncenter ul,
  298. .wp-block-archives.aligncenter,
  299. .wp-block-latest-posts.aligncenter,
  300. .wp-block-latest-comments.aligncenter {
  301. list-style-position: inside;
  302. text-align: center;
  303. }
  304. /* Latest Comments */
  305. .wp-block-latest-comments__comment a {
  306. box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0);
  307. }
  308. .wp-block-latest-comments__comment-date {
  309. margin-top: 0.5em;
  310. }
  311. /* Latest Posts */
  312. .wp-block-latest-posts.is-grid {
  313. margin-left: 0;
  314. margin-right: 0;
  315. }
  316. /*--------------------------------------------------------------
  317. 7.0 Blocks - Colors
  318. --------------------------------------------------------------*/
  319. .has-pale-pink-color,
  320. .has-pale-pink-color:hover,
  321. .has-pale-pink-color:focus,
  322. .has-pale-pink-color:active {
  323. color: #f78da7;
  324. }
  325. .has-pale-pink-background-color,
  326. .has-pale-pink-background-color:hover. .has-pale-pink-background-color:focus,
  327. .has-pale-pink-background-color:active,
  328. .has-pale-pink-background-color:visited {
  329. background-color: #f78da7;
  330. }
  331. .has-vivid-red-color,
  332. .has-vivid-red-color:hover,
  333. .has-vivid-red-color:focus,
  334. .has-vivid-red-color:active,
  335. .has-vivid-red-color:visited {
  336. color: #cf2e2e;
  337. }
  338. .has-vivid-red-background-color,
  339. .has-vivid-red-background-color:hover,
  340. .has-vivid-red-background-color:focus,
  341. .has-vivid-red-background-color:active,
  342. .has-vivid-red-background-color:visited {
  343. background-color: #cf2e2e;
  344. }
  345. .has-luminous-vivid-orange-color,
  346. .has-luminous-vivid-orange-color:hover,
  347. .has-luminous-vivid-orange-color:focus,
  348. .has-luminous-vivid-orange-color:active,
  349. .has-luminous-vivid-orange-color:visited {
  350. color: #ff6900;
  351. }
  352. .has-luminous-vivid-orange-background-color,
  353. .has-luminous-vivid-orange-background-color:hover,
  354. .has-luminous-vivid-orange-background-color:focus,
  355. .has-luminous-vivid-orange-background-color:active,
  356. .has-luminous-vivid-orange-background-color:visited {
  357. background-color: #ff6900;
  358. }
  359. .has-luminous-vivid-amber-color,
  360. .has-luminous-vivid-amber-color:hover,
  361. .has-luminous-vivid-amber-color:focus,
  362. .has-luminous-vivid-amber-color:active,
  363. .has-luminous-vivid-amber-color:visited {
  364. color: #fcb900;
  365. }
  366. .has-luminous-vivid-amber-background-color,
  367. .has-luminous-vivid-amber-background-color:hover,
  368. .has-luminous-vivid-amber-background-color:focus,
  369. .has-luminous-vivid-amber-background-color:active,
  370. .has-luminous-vivid-amber-background-color:visited {
  371. background-color: #fcb900;
  372. }
  373. .has-light-green-cyan-color,
  374. .has-light-green-cyan-color:hover,
  375. .has-light-green-cyan-color:focus,
  376. .has-light-green-cyan-color:active,
  377. .has-light-green-cyan-color:visited {
  378. color: #7bdcb5;
  379. }
  380. .has-light-green-cyan-background-color,
  381. .has-light-green-cyan-background-color:hover,
  382. .has-light-green-cyan-background-color:focus,
  383. .has-light-green-cyan-background-color:active,
  384. .has-light-green-cyan-background-color:visited {
  385. background-color: #7bdcb5;
  386. }
  387. .has-vivid-green-cyan-color,
  388. .has-vivid-green-cyan-color:hover,
  389. .has-vivid-green-cyan-color:focus,
  390. .has-vivid-green-cyan-color:active,
  391. .has-vivid-green-cyan-color:visited {
  392. color: #00d084;
  393. }
  394. .has-vivid-green-cyan-background-color,
  395. .has-vivid-green-cyan-background-color:hover,
  396. .has-vivid-green-cyan-background-color:focus,
  397. .has-vivid-green-cyan-background-color:active,
  398. .has-vivid-green-cyan-background-color:visited {
  399. background-color: #00d084;
  400. }
  401. .has-pale-cyan-blue-color,
  402. .has-pale-cyan-blue-color:hover,
  403. .has-pale-cyan-blue-color:focus,
  404. .has-pale-cyan-blue-color:active,
  405. .has-pale-cyan-blue-color:visited {
  406. color: #8ed1fc;
  407. }
  408. .has-pale-cyan-blue-background-color,
  409. .has-pale-cyan-blue-background-color:hover,
  410. .has-pale-cyan-blue-background-color:focus,
  411. .has-pale-cyan-blue-background-color:active,
  412. .has-pale-cyan-blue-background-color:visited {
  413. background-color: #8ed1fc;
  414. }
  415. .has-vivid-cyan-blue-color,
  416. .has-vivid-cyan-blue-color:hover,
  417. .has-vivid-cyan-blue-color:focus,
  418. .has-vivid-cyan-blue-color:active,
  419. .has-vivid-cyan-blue-color:visited {
  420. color: #0693e3;
  421. }
  422. .has-vivid-cyan-blue-background-color,
  423. .has-vivid-cyan-blue-background-color:hover,
  424. .has-vivid-cyan-blue-background-color:focus,
  425. .has-vivid-cyan-blue-background-color:active,
  426. .has-vivid-cyan-blue-background-color:visited {
  427. background-color: #0693e3;
  428. }
  429. .has-very-light-gray-color,
  430. .has-very-light-gray-color:hover,
  431. .has-very-light-gray-color:focus,
  432. .has-very-light-gray-color:active,
  433. .has-very-light-gray-color:visited {
  434. color: #eee;
  435. }
  436. .has-very-light-gray-background-color,
  437. .has-very-light-gray-background-color:hover,
  438. .has-very-light-gray-background-color:focus,
  439. .has-very-light-gray-background-color:active,
  440. .has-very-light-gray-background-color:visited {
  441. background-color: #eee;
  442. }
  443. .has-cyan-bluish-gray-color,
  444. .has-cyan-bluish-gray-color:hover,
  445. .has-cyan-bluish-gray-color:focus,
  446. .has-cyan-bluish-gray-color:active,
  447. .has-cyan-bluish-gray-color:visited {
  448. color: #abb8c3;
  449. }
  450. .has-cyan-bluish-gray-background-color,
  451. .has-cyan-bluish-gray-background-color:hover,
  452. .has-cyan-bluish-gray-background-color:focus,
  453. .has-cyan-bluish-gray-background-color:active,
  454. .has-cyan-bluish-gray-background-color:visited {
  455. background-color: #abb8c3;
  456. }
  457. .has-very-dark-gray-color,
  458. .has-very-dark-gray-color:hover,
  459. .has-very-dark-gray-color:focus,
  460. .has-very-dark-gray-color:active,
  461. .has-very-dark-gray-color:visited {
  462. color: #313131;
  463. }
  464. .has-very-dark-gray-background-color,
  465. .has-very-dark-gray-background-color:hover,
  466. .has-very-dark-gray-background-color:focus,
  467. .has-very-dark-gray-background-color:active,
  468. .has-very-dark-gray-background-color:visited {
  469. background-color: #313131;
  470. }