style.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. /*
  2. Theme Name: Disco
  3. Theme URI: https://wordpress.com/theme/disco/
  4. Author: Automattic
  5. Author URI: https://automattic.com/
  6. Description: Disco is a funky, vibrant, opinionated theme with a monospaced font. Both its styles and spacing form an edgy aesthetic perfect for those looking to build a quirky website.
  7. Requires at least: 5.8
  8. Tested up to: 6.0.1
  9. Requires PHP: 5.7
  10. Version: 1.0.4
  11. License: GNU General Public License v2 or later
  12. License URI: http://www.gnu.org/licenses/gpl-2.0.html
  13. Text Domain: disco
  14. Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks, auto-loading-homepage, blog-homepage
  15. Disco WordPress Theme, (C) 2021 Automattic, Inc.
  16. Disco is distributed under the terms of the GNU GPL.
  17. This program is free software: you can redistribute it and/or modify
  18. it under the terms of the GNU General Public License as published by
  19. the Free Software Foundation, either version 2 of the License, or
  20. (at your option) any later version.
  21. This program is distributed in the hope that it will be useful,
  22. but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. GNU General Public License for more details.
  25. */
  26. /*
  27. * Font smoothing
  28. */
  29. body {
  30. -moz-osx-font-smoothing: grayscale;
  31. -webkit-font-smoothing: antialiased;
  32. }
  33. a {
  34. text-underline-offset: .15em;
  35. /* We add text-decoration- here instead in theme.json because webkit browsers as Safari are not compatible with text-decoration shorthand syntax */
  36. text-decoration-thickness: 1px!important;
  37. }
  38. .wp-block-site-title a {
  39. /* We add text-decoration- here instead in theme.json because webkit browsers as Safari are not compatible with text-decoration shorthand syntax */
  40. text-decoration-thickness: 1.5px!important;
  41. }
  42. /*
  43. * Button hover styles.
  44. * Necessary until the following issue is resolved in Gutenberg:
  45. * https://github.com/WordPress/gutenberg/issues/27075
  46. */
  47. .wp-block-read-more:is(:hover, :focus) {
  48. background-color: var(--wp--preset--color--foreground);
  49. color: var(--wp--preset--color--background);
  50. }
  51. :is(
  52. .wp-block-search__button,
  53. .wp-block-file .wp-block-file__button,
  54. .wp-block-button__link,
  55. .wp-elements-button,
  56. ):where(:hover, :focus, :active) {
  57. background-color: var(--wp--preset--color--background);
  58. color: var(--wp--preset--color--foreground);
  59. border: 1.5px solid var(--wp--preset--color--foreground);
  60. }
  61. :is(
  62. .wp-block-search__button,
  63. .wp-block-file .wp-block-file__button,
  64. .wp-block-button__link,
  65. .wp-elements-button,
  66. .wp-block-read-more,
  67. ):where(:active) {
  68. border-style: dashed;
  69. }
  70. /* Overrides the Gutenberg styles for the outline button */
  71. .wp-block-button.is-style-outline>.wp-block-button__link {
  72. padding-top: calc(0.05em + 2px);
  73. padding-right: calc(1.333em + 2px);
  74. padding-bottom: calc(0.05em + 2px);
  75. padding-left: calc(1.333em + 2px);
  76. border: 1.5px solid var(--wp--preset--color--foreground);
  77. }
  78. :is(
  79. .is-style-outline .wp-block-button__link,
  80. .is-style-outline .wp-element-button,
  81. .wp-block-post-comments-form input[type=submit],
  82. .wp-block-button.is-style-outline>.wp-block-button__link, /* < - Overrides the Gutenberg styles for the outline button */
  83. ):is(
  84. :hover,
  85. :focus
  86. ) {
  87. background: var(--wp--preset--color--foreground);
  88. color: var(--wp--preset--color--background);
  89. }
  90. :is(
  91. .is-style-outline .wp-block-button__link,
  92. .is-style-outline .wp-element-button,
  93. .wp-block-post-comments-form input[type=submit],
  94. ):is(
  95. :active
  96. ) {
  97. background: var(--wp--preset--color--background);
  98. color: var(--wp--preset--color--foreground);
  99. border-style: dashed;
  100. }
  101. /* This is necesary to fix the outline style for the button in the editor */
  102. :where(.is-style-outline)
  103. :is(
  104. .wp-block-button__link,
  105. .wp-element-button
  106. ) {
  107. border: 1px solid var(--wp--preset--color--foreground);
  108. }
  109. /*
  110. * Styles for the post list pattern
  111. */
  112. .disco-post-list-pattern .wp-block-post-title {
  113. /* This is necesary to make the post list item the same height when the post has or lacks a featured image */
  114. min-height: 60px; /* 60px is the height of the featured image used */
  115. display: flex;
  116. justify-content: center;
  117. flex-direction: column;
  118. }
  119. .disco-post-list-pattern .wp-block-post-date {
  120. white-space: nowrap;
  121. }
  122. .disco-post-list-pattern .wp-block-read-more {
  123. text-align: center;
  124. word-break: keep-all;
  125. width: 100%;
  126. white-space: nowrap;
  127. }
  128. .disco-post-list-pattern .wp-block-post .post-date-container {
  129. flex-basis: min-content;
  130. flex-grow: unset;
  131. }
  132. .disco-post-list-pattern .wp-block-columns {
  133. height: 100%;
  134. }
  135. .disco-post-list-pattern .wp-block-column {
  136. align-items: center;
  137. display: flex;
  138. min-width: unset;
  139. }
  140. .disco-post-list-pattern .wp-block-post > .wp-block-group > .wp-block-columns > .wp-block-column:first-child {
  141. flex-grow: 3;
  142. }
  143. .disco-post-list-pattern .wp-block-post > .wp-block-group > .wp-block-columns > .wp-block-column:last-child > .wp-block-columns {
  144. width: 100%;
  145. }
  146. .disco-post-list-pattern .wp-block-column:empty {
  147. display: none;
  148. }
  149. /* Single post */
  150. .featured-image-container:empty {
  151. display: none;
  152. }
  153. /*
  154. * Footer
  155. */
  156. footer .wp-block-site-title a {
  157. text-decoration: none;
  158. }
  159. /*
  160. * Quote
  161. */
  162. .wp-block-quote p {
  163. margin-bottom: 0
  164. }
  165. .wp-block-quote cite {
  166. font-style: normal;
  167. font-size: var(--wp--preset--font-size--small);
  168. }
  169. .wp-block-quote cite::before {
  170. content: "— ";
  171. }
  172. /*
  173. * Selection
  174. */
  175. ::selection{
  176. background: var(--wp--preset--color--foreground);
  177. color: var(--wp--preset--color--background);
  178. }
  179. /*
  180. * Navigation
  181. */
  182. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
  183. gap: 1rem;
  184. }
  185. .wp-block-navigation .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container {
  186. font-size: var(--wp--preset--font-size--medium);
  187. border: 1px solid var(--wp--preset--color--foreground);
  188. }
  189. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
  190. font-size: 2.5rem;
  191. }
  192. .wp-block-navigation-item__content {
  193. font-size: var(--wp--preset--font-size--large);
  194. }
  195. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container {
  196. padding: 0.5rem 1rem 0 1rem;
  197. gap: 0.5rem;
  198. }
  199. .wp-block-navigation__submenu-icon::after {
  200. content: "";
  201. width: 1em;
  202. height: 1em;
  203. background-color: currentColor;
  204. -webkit-mask-image: url(assets/icons/arrow.svg);
  205. mask-image: url(assets/icons/arrow.svg);
  206. -webkit-mask-repeat: no-repeat;
  207. mask-repeat: no-repeat;
  208. display: block;
  209. -webkit-mask-size: 0.5em;
  210. mask-size: 0.5em;
  211. mask-position: left 30%;
  212. -webkit-mask-position: left 30%;
  213. }
  214. .wp-block-navigation__submenu-icon svg {
  215. display: none !important;
  216. }
  217. /*
  218. * Block search
  219. */
  220. .wp-block-search__input {
  221. color: var(--wp--preset--color--foreground);
  222. }
  223. .wp-block-search__input:focus-visible {
  224. outline: 1.5px solid var(--wp--preset--color--foreground);
  225. }
  226. /*
  227. * Comments
  228. */
  229. .wp-block-post-comments-form :is(textarea, input:not([type="submit"]) ) {
  230. background-color: var(--wp--preset--color--background);
  231. border: 1px solid var(--wp--preset--color--foreground);
  232. color: 1px solid var(--wp--preset--color--foreground);
  233. border-radius: 50px;
  234. padding: 2em;
  235. }
  236. .wp-block-post-comments-form :is(textarea, input:not([type="submit"]) ):focus-visible {
  237. outline: 1.5px solid var(--wp--preset--color--foreground);
  238. }
  239. .wp-block-comments-query-loop .depth-1 .wp-block-column:empty {
  240. display: none;
  241. }
  242. .wp-block-post-comments-form input[type="checkbox"] {
  243. appearance: none;
  244. height: 1.5rem;
  245. min-width: 1.5rem;
  246. padding: 0;
  247. border-radius: 1rem;
  248. position: relative;
  249. }
  250. .wp-block-post-comments-form input[type="checkbox"]:checked::after {
  251. background-color: var(--wp--preset--color--foreground);
  252. content: "";
  253. position: absolute;
  254. width: 75%;
  255. height: 75%;
  256. border-radius: 1rem;
  257. top: 0;
  258. left: 0;
  259. bottom: 0;
  260. right: 0;
  261. margin: auto;
  262. }
  263. /*
  264. * Pullquote
  265. */
  266. .wp-block-pullquote blockquote {
  267. margin: 0;
  268. }
  269. .wp-block-pullquote p {
  270. margin-block-start: var(--wp--custom--gap--vertical);
  271. margin-block-end: var(--wp--custom--gap--vertical);
  272. font-size: inherit;
  273. }
  274. .wp-block-pullquote cite {
  275. display: block;
  276. margin-block-end: var(--wp--custom--gap--vertical);
  277. font-style: normal;
  278. font-size: var(--wp--preset--font-size--small);
  279. font-weight: 400;
  280. }
  281. .wp-block-pullquote cite::before {
  282. content: "— ";
  283. }
  284. /*
  285. * Alignment styles, borrowed from Twenty Twenty-Two.
  286. * These rules are temporary, and should not be relied on or
  287. * modified too heavily by themes or plugins that build on
  288. * Twenty Twenty-Two. These are meant to be a precursor to
  289. * a global solution provided by the Block Editor.
  290. *
  291. * Relevant issues:
  292. * https://github.com/WordPress/gutenberg/issues/35607
  293. * https://github.com/WordPress/gutenberg/issues/35884
  294. */
  295. .wp-site-blocks,
  296. body > .is-root-container,
  297. .edit-post-visual-editor__post-title-wrapper,
  298. .wp-block-group.alignfull,
  299. .wp-block-group.has-background,
  300. .wp-block-columns.alignfull.has-background,
  301. .wp-block-cover.alignfull,
  302. .is-root-container .wp-block[data-align='full'] > .wp-block-group,
  303. .is-root-container .wp-block[data-align='full'] > .wp-block-columns.has-background,
  304. .is-root-container .wp-block[data-align='full'] > .wp-block-cover {
  305. padding-left: var(--wp--custom--gap--horizontal);
  306. padding-right: var(--wp--custom--gap--horizontal);
  307. }
  308. .wp-site-blocks .alignfull,
  309. .wp-site-blocks > .wp-block-group.has-background,
  310. .wp-site-blocks > .wp-block-cover,
  311. .wp-site-blocks > .wp-block-template-part > .wp-block-group.has-background,
  312. .wp-site-blocks > .wp-block-template-part > .wp-block-cover,
  313. body > .is-root-container > .wp-block-cover,
  314. body > .is-root-container > .wp-block-template-part > .wp-block-group.has-background,
  315. body > .is-root-container > .wp-block-template-part > .wp-block-cover,
  316. .is-root-container .wp-block[data-align='full'] {
  317. margin-left: calc(-1 * var(--wp--custom--gap--horizontal)) !important;
  318. margin-right: calc(-1 * var(--wp--custom--gap--horizontal)) !important;
  319. max-width: unset;
  320. width: unset;
  321. }
  322. /* Blocks inside columns don't have negative margins. */
  323. .wp-site-blocks .wp-block-columns .wp-block-column .alignfull,
  324. .is-root-container .wp-block-columns .wp-block-column .wp-block[data-align="full"],
  325. /* We also want to avoid stacking negative margins. */
  326. .wp-site-blocks .alignfull:not(.wp-block-group) .alignfull,
  327. .is-root-container .wp-block[data-align="full"] > *:not(.wp-block-group) .wp-block[data-align="full"] {
  328. margin-left: auto !important;
  329. margin-right: auto !important;
  330. width: inherit;
  331. }
  332. /*
  333. * Responsive menu container padding.
  334. * This ensures the responsive container inherits the same
  335. * spacing defined above. This behavior may be built into
  336. * the Block Editor in the future.
  337. */
  338. .wp-block-navigation__responsive-container.is-menu-open {
  339. padding-top: var(--wp--custom--gap--horizontal);
  340. padding-bottom: var(--wp--custom--gap--vertical);
  341. padding-right: var(--wp--custom--gap--horizontal);
  342. padding-left: var(--wp--custom--gap--horizontal);
  343. }
  344. /*
  345. * style seach input
  346. */
  347. .wp-block-search__input {
  348. border-radius: 999px;
  349. padding: .5rem 2rem;
  350. background-color: transparent;
  351. border-color: var(--wp--preset--color--foreground);
  352. border-width: 1.5px;
  353. }
  354. @media screen and (max-width: 768px) {
  355. .wp-block-search__inside-wrapper {
  356. flex-wrap: wrap
  357. }
  358. .wp-block-search__button {
  359. flex-grow: 1;
  360. margin-left: 0;
  361. margin-top: .625rem;
  362. }
  363. }
  364. /*
  365. * Editor
  366. */
  367. /* This will be necessary until this is fixed https://github.com/WordPress/gutenberg/issues/42441 */
  368. .edit-post-visual-editor__post-title-wrapper .wp-block-post-title {
  369. font-size: clamp(2.5rem, calc(2.5rem + ((1vw - 0.48rem) * 8.4135)), 6.875rem);
  370. line-height: 1em;
  371. letter-spacing: -0.04em;
  372. }