style.css 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*
  2. Theme Name: Spearhead
  3. Theme URI: https://wordpress.com/theme/spearhead-blocks/
  4. Author: Automattic
  5. Author URI: https://automattic.com
  6. Description: Spearhead Blocks is the block based version of the original Spearhead theme.
  7. Requires at least: 5.8
  8. Tested up to: 5.9
  9. Requires PHP: 5.7
  10. Version: 1.0.5
  11. License: GNU General Public License v2 or later
  12. License URI: https://raw.githubusercontent.com/Automattic/themes/trunk/LICENSE
  13. Template:
  14. Text Domain: spearhead-blocks
  15. Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks
  16. */
  17. /*
  18. * Dark Mode, front-end and editor
  19. */
  20. @media (prefers-color-scheme: dark) {
  21. body.editor-styles-wrapper,
  22. body {
  23. --wp--preset--color--primary: var(--wp--preset--color--primary-dark);
  24. --wp--preset--color--secondary: var(--wp--preset--color--secondary-dark);
  25. --wp--preset--color--foreground: var(--wp--preset--color--foreground-dark);
  26. --wp--preset--color--background: var(--wp--preset--color--background-dark);
  27. }
  28. }
  29. /*
  30. * Excerpt audio block spacing and width match w the original Spearhead
  31. */
  32. .excerpt-audio-block .wp-block-audio {
  33. margin-left: 0;
  34. margin-right: 0;
  35. margin-top: 2rem;
  36. }
  37. .excerpt-audio-block .wp-block-audio audio {
  38. width: 100%;
  39. }
  40. /*
  41. * Font smoothing
  42. */
  43. body {
  44. -moz-osx-font-smoothing: grayscale;
  45. -webkit-font-smoothing: antialiased;
  46. }
  47. /*
  48. * Button hover styles.
  49. * Necessary until the following issue is resolved in Gutenberg:
  50. * https://github.com/WordPress/gutenberg/issues/27075
  51. */
  52. .wp-block-search__button:hover,
  53. .wp-block-file .wp-block-file__button:hover,
  54. .wp-block-button__link:hover {
  55. background-color: var(--wp--preset--color--secondary);
  56. }
  57. /*
  58. * Alignment styles, borrowed from Twenty Twenty-Two.
  59. * These rules are temporary, and should not be relied on or
  60. * modified too heavily by themes or plugins that build on
  61. * Twenty Twenty-Two. These are meant to be a precursor to
  62. * a global solution provided by the Block Editor.
  63. *
  64. * Relevant issues:
  65. * https://github.com/WordPress/gutenberg/issues/35607
  66. * https://github.com/WordPress/gutenberg/issues/35884
  67. */
  68. .wp-site-blocks,
  69. body > .is-root-container,
  70. .edit-post-visual-editor__post-title-wrapper,
  71. .wp-block-group.alignfull,
  72. .wp-block-group.has-background,
  73. .wp-block-columns.alignfull.has-background,
  74. .wp-block-cover.alignfull,
  75. .is-root-container .wp-block[data-align=full] > .wp-block-group,
  76. .is-root-container .wp-block[data-align=full] > .wp-block-columns.has-background,
  77. .is-root-container .wp-block[data-align=full] > .wp-block-cover {
  78. padding-left: var(--wp--custom--gap--horizontal);
  79. padding-right: var(--wp--custom--gap--horizontal);
  80. }
  81. .wp-site-blocks .alignfull,
  82. .wp-site-blocks > .wp-block-group.has-background,
  83. .wp-site-blocks > .wp-block-cover,
  84. .wp-site-blocks > .wp-block-template-part > .wp-block-group.has-background,
  85. .wp-site-blocks > .wp-block-template-part > .wp-block-cover,
  86. body > .is-root-container > .wp-block-cover,
  87. body > .is-root-container > .wp-block-template-part > .wp-block-group.has-background,
  88. body > .is-root-container > .wp-block-template-part > .wp-block-cover,
  89. .is-root-container .wp-block[data-align=full] {
  90. margin-left: calc(-1 * var(--wp--custom--gap--horizontal)) !important;
  91. margin-right: calc(-1 * var(--wp--custom--gap--horizontal)) !important;
  92. max-width: unset;
  93. width: unset;
  94. }
  95. /* Blocks inside columns don't have negative margins. */
  96. .wp-site-blocks .wp-block-columns .wp-block-column .alignfull,
  97. .is-root-container .wp-block-columns .wp-block-column .wp-block[data-align=full],
  98. .wp-site-blocks .alignfull:not(.wp-block-group) .alignfull,
  99. .is-root-container .wp-block[data-align=full] > *:not(.wp-block-group) .wp-block[data-align=full] {
  100. margin-left: auto !important;
  101. margin-right: auto !important;
  102. width: inherit;
  103. }
  104. /*
  105. * Responsive menu container padding.
  106. * This ensures the responsive container inherits the same
  107. * spacing defined above. This behavior may be built into
  108. * the Block Editor in the future.
  109. */
  110. .wp-block-navigation__responsive-container.is-menu-open {
  111. padding-top: var(--wp--custom--gap--horizontal);
  112. padding-bottom: var(--wp--custom--gap--vertical);
  113. padding-right: var(--wp--custom--gap--horizontal);
  114. padding-left: var(--wp--custom--gap--horizontal);
  115. }