style.css 8.6 KB

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