style.css 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. /*
  2. Theme Name: Pendant
  3. Theme URI: https://wordpress.com/theme/pendant
  4. Author: Automattic
  5. Author URI: https://automattic.com
  6. Description: An elegant product-focused theme
  7. Requires at least: 5.9
  8. Tested up to: 5.9
  9. Requires PHP: 5.7
  10. Requires Gutenberg: 13.1
  11. Version: 1.0.2
  12. License: GNU General Public License v2 or later
  13. License URI: https://raw.githubusercontent.com/Automattic/themes/trunk/LICENSE
  14. Template:
  15. Text Domain: pendant
  16. 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
  17. */
  18. /*
  19. * Font smoothing
  20. */
  21. body {
  22. -moz-osx-font-smoothing: grayscale;
  23. -webkit-font-smoothing: antialiased;
  24. }
  25. /*
  26. * Opinionated Style for Anchors.
  27. * Anchors get a thin underline offset more than default.
  28. * Headings get slightly different dimensions.
  29. * Any anchors IN the content are underlined by default, then none on hover.
  30. * Any anchors OUT of the content behave the opposite.
  31. * Buttons have no underlines.
  32. */
  33. a {
  34. cursor: pointer;
  35. text-underline-offset: 0.3em;
  36. text-decoration-thickness: 0.05em;
  37. text-decoration-line: none;
  38. }
  39. h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  40. text-underline-offset: 0.15em;
  41. text-decoration-thickness: 0.02em;
  42. }
  43. a:hover,
  44. a:focus {
  45. text-decoration-line: underline;
  46. }
  47. .block-editor-block-list__layout a,
  48. .wp-block-post-content a {
  49. text-decoration-line: underline;
  50. }
  51. .block-editor-block-list__layout a:hover,
  52. .block-editor-block-list__layout a:focus,
  53. .wp-block-post-content a:focus,
  54. .wp-block-post-content a:hover {
  55. text-decoration: none;
  56. }
  57. .wp-block-button a {
  58. text-decoration: none;
  59. }
  60. /*
  61. * Button hover styles.
  62. * Necessary until the following issue is resolved in Gutenberg:
  63. * https://github.com/WordPress/gutenberg/issues/27075
  64. */
  65. .wp-block-button__link {
  66. padding: calc(1.2em + 2px) calc(2em + 2px);
  67. }
  68. .wp-block-button.is-style-outline .wp-block-button__link {
  69. padding: 1.2em 2em;
  70. }
  71. .wp-block-search__button:hover,
  72. .wp-block-file .wp-block-file__button:hover,
  73. .wp-block-post-comments input[type=submit]:hover,
  74. .wp-block-button__link:hover {
  75. background-color: var(--wp--preset--color--background);
  76. color: var(--wp--preset--color--foreground);
  77. border: 2px solid var(--wp--preset--color--foreground);
  78. padding: 1.2em 2em;
  79. }
  80. .wp-block-button.is-style-outline .wp-block-button__link:hover {
  81. background-color: var(--wp--preset--color--foreground);
  82. color: var(--wp--preset--color--background);
  83. border: 2px solid var(--wp--preset--color--foreground);
  84. }
  85. /* Special Condition for buttons inside of groups where the background color is set to the foreground palette color */
  86. .wp-block-group.has-foreground-background-color .wp-block-button .wp-block-button__link:not(.has-background-color) {
  87. background-color: var(--wp--preset--color--background);
  88. color: var(--wp--preset--color--foreground);
  89. }
  90. .wp-block-group.has-foreground-background-color .wp-block-button .wp-block-button__link:not(.has-background-color):hover {
  91. background-color: var(--wp--preset--color--foreground);
  92. color: var(--wp--preset--color--background);
  93. border: 2px solid var(--wp--preset--color--background);
  94. }
  95. .wp-block-group.has-foreground-background-color .wp-block-button.is-style-outline .wp-block-button__link:not(.has-background-color) {
  96. background-color: var(--wp--preset--color--foreground);
  97. color: var(--wp--preset--color--background);
  98. }
  99. .wp-block-group.has-foreground-background-color .wp-block-button.is-style-outline .wp-block-button__link:not(.has-background-color):hover {
  100. background-color: var(--wp--preset--color--background);
  101. color: var(--wp--preset--color--foreground);
  102. }
  103. /*
  104. * Search and File Block button styles.
  105. * Necessary until the following issues are resolved in Gutenberg:
  106. * https://github.com/WordPress/gutenberg/issues/36444
  107. * https://github.com/WordPress/gutenberg/issues/27760
  108. */
  109. .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper {
  110. padding: 0;
  111. border-color: var(--wp--preset--color--foreground);
  112. }
  113. .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input {
  114. padding-left: 1em;
  115. }
  116. .wp-block-search__button,
  117. .wp-block-file .wp-block-file__button {
  118. background-color: var(--wp--preset--color--foreground);
  119. color: var(--wp--preset--color--background);
  120. font-size: var(--wp--preset--typography--font-size--medium);
  121. letter-spacing: 0.1em;
  122. text-transform: uppercase;
  123. font-weight: 600;
  124. line-height: 1.7;
  125. border:none;
  126. padding: calc(0.667em + 2px) calc(1.333em + 2px) !important;
  127. }
  128. /*
  129. * Decrease the size of social icons
  130. */
  131. .wp-block-social-links.is-style-logos-only .wp-social-link svg {
  132. height: 1em;
  133. width: 1em;
  134. }
  135. /*
  136. * Alignment styles, borrowed from Twenty Twenty-Two.
  137. * These rules are temporary, and should not be relied on or
  138. * modified too heavily by themes or plugins that build on
  139. * Twenty Twenty-Two. These are meant to be a precursor to
  140. * a global solution provided by the Block Editor.
  141. *
  142. * Relevant issues:
  143. * https://github.com/WordPress/gutenberg/issues/35607
  144. * https://github.com/WordPress/gutenberg/issues/35884
  145. */
  146. .wp-site-blocks,
  147. body > .is-root-container,
  148. .edit-post-visual-editor__post-title-wrapper,
  149. .wp-block-group.alignfull,
  150. .wp-block-group.has-background,
  151. .wp-block-columns.alignfull.has-background,
  152. .wp-block-cover.alignfull,
  153. .is-root-container .wp-block[data-align='full'] > .wp-block-group,
  154. .is-root-container .wp-block[data-align='full'] > .wp-block-columns.has-background,
  155. .is-root-container .wp-block[data-align='full'] > .wp-block-cover {
  156. padding-left: var(--wp--custom--gap--horizontal);
  157. padding-right: var(--wp--custom--gap--horizontal);
  158. }
  159. .wp-site-blocks .alignfull,
  160. .wp-site-blocks > .wp-block-group.has-background,
  161. .wp-site-blocks > .wp-block-cover,
  162. .wp-site-blocks > .wp-block-template-part > .wp-block-group.has-background,
  163. .wp-site-blocks > .wp-block-template-part > .wp-block-cover,
  164. body > .is-root-container > .wp-block-cover,
  165. body > .is-root-container > .wp-block-template-part > .wp-block-group.has-background,
  166. body > .is-root-container > .wp-block-template-part > .wp-block-cover,
  167. .is-root-container .wp-block[data-align='full'] {
  168. margin-left: calc(-1 * var(--wp--custom--gap--horizontal)) !important;
  169. margin-right: calc(-1 * var(--wp--custom--gap--horizontal)) !important;
  170. max-width: unset;
  171. width: unset;
  172. }
  173. /* Blocks inside columns don't have negative margins. */
  174. .wp-site-blocks .wp-block-columns .wp-block-column .alignfull,
  175. .is-root-container .wp-block-columns .wp-block-column .wp-block[data-align="full"],
  176. /* We also want to avoid stacking negative margins. */
  177. .wp-site-blocks .alignfull:not(.wp-block-group) .alignfull,
  178. .is-root-container .wp-block[data-align="full"] > *:not(.wp-block-group) .wp-block[data-align="full"] {
  179. margin-left: auto !important;
  180. margin-right: auto !important;
  181. width: inherit;
  182. }
  183. /* We are unable to style the "cite" element in the quote block */
  184. .wp-block-quote cite {
  185. font-family: var(--wp--preset--font-family--body-font);
  186. font-style: italic;
  187. font-size: 0.9rem;
  188. }
  189. /* The plain quote block has a left-padding that doesn't work well with our design */
  190. .wp-block-quote.is-style-plain {
  191. padding-left: 0;
  192. }
  193. /** Navigation text-decoration correction **/
  194. .wp-block-navigation:where(:not([class*=has-text-decoration])) a {
  195. text-decoration-thickness: 1px;
  196. }
  197. /** Navigation sub-menu items **/
  198. .wp-block-navigation .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container {
  199. text-transform: uppercase;
  200. font-weight: 500;
  201. line-height: 2.6;
  202. font-size: 0.9rem;
  203. letter-spacing: 0.1em;
  204. }
  205. /** Desktop responsive navigation layout **/
  206. .wp-block-navigation.is-responsive .is-menu-open.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
  207. margin: 0 auto;
  208. max-width: 820px;
  209. height: 100%;
  210. padding-top: 2rem;
  211. padding-bottom: 2rem;
  212. }
  213. .wp-block-navigation .wp-block-navigation__responsive-dialog,
  214. .wp-block-navigation .wp-block-navigation__responsive-close {
  215. height: 100%;
  216. }
  217. .wp-block-navigation.is-responsive .is-menu-open.wp-block-navigation__responsive-container .wp-block-navigation__container {
  218. justify-content: center;
  219. }
  220. .wp-block-navigation .wp-block-navigation__responsive-container-close {
  221. left: 0;
  222. }
  223. .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
  224. padding-left: var(--wp--custom--gap--horizontal);
  225. padding-right: var(--wp--custom--gap--horizontal);
  226. padding-top: 3vw;
  227. }
  228. /** Categories list block: remove list decoration **/
  229. .wp-block-categories {
  230. list-style-type: none;
  231. }
  232. /** Post Navigation Styles **/
  233. .pendant-post-navigation .wp-block-post-navigation-link .post-navigation-link__label {
  234. font-family: var(--wp--preset--font-family--body-font);
  235. font-size: 0.9rem;
  236. font-weight: 600;
  237. letter-spacing: 0.1em;
  238. text-transform: uppercase;
  239. line-height: 3;
  240. }
  241. @media (max-width: 599px) {
  242. .pendant-post-navigation .post-navigation-link__title {
  243. display: none;
  244. }
  245. .pendant-post-navigation .wp-block-column:nth-of-type(2) {
  246. display: none;
  247. }
  248. .pendant-post-navigation .post-navigation-link-previous {
  249. text-align: left;
  250. }
  251. .pendant-post-navigation .post-navigation-link-next {
  252. text-align: right;
  253. }
  254. }