blocks.css 12 KB

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