styles.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. /***********************************************************
  2. ############################################################
  3. . . . . . .
  4. . . ...-..-| |-. .-. .-.-..-| .-.. ...-|
  5. ` ` '' '`-'-' '-`-`-' ' '`-'-`-`-` '`-'-
  6. url - https://davidawindham.com
  7. git - https://github.com/windhamdavid/daw
  8. need to test
  9. ############################################################
  10. ************************************************************/
  11. /***********************************************************
  12. ################### Bootstrap Functions ####################
  13. ************************************************************/
  14. @import '../node_modules/bootstrap/scss/functions';
  15. @import '../node_modules/bootstrap/scss/variables';
  16. @import '../node_modules/bootstrap/scss/variables-dark';
  17. @import '../node_modules/bootstrap/scss/maps';
  18. @import '../node_modules/bootstrap/scss/mixins';
  19. /***********************************************************
  20. ####################### Custom ############################
  21. ************************************************************/
  22. $body-bg: #d3d3d3;
  23. $body-color: #232323;
  24. $link-color: #67000a;
  25. $theme-colors: (
  26. "dark": #535763,
  27. );
  28. $custom-colors: (
  29. 'dw-blue-dark': #484C57,
  30. 'dw-blue':#535763,
  31. 'dw-light':#e2e2e2,
  32. 'dw-bright':#e3e3e3,
  33. );
  34. $theme-colors: map-merge($theme-colors, $custom-colors);
  35. $theme-colors: map-remove($theme-colors, 'primary','secondary','success','warning', 'info');
  36. $colors: map-remove($colors, 'white','black','gray','gray-dark','dark','blue','indigo','purple','pink', 'orange', 'yellow', 'green', 'teal', 'cyan');
  37. $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value");
  38. $utilities-colors: map-merge($utilities-colors, $theme-colors-rgb);
  39. $utilities-text-colors: map-loop($utilities-colors, rgba-css-var, "$key", "text");
  40. $utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, "$key", "bg");
  41. $enable-negative-margins: true;
  42. /***********************************************************
  43. ########## Bootstrap 5 — subset to used parts #############
  44. Being removed incrementally (Phases 1-3, 2026-07-13).
  45. Dropped (unused / migrated): dropdown, button-group, accordion,
  46. breadcrumb, progress, toasts, modal, tooltip, popover, spinners,
  47. placeholders, carousel (→ native .dw-carousel), tables, close,
  48. images, badge, alert, pagination (→ custom CSS below), helpers,
  49. and the whole utilities API (→ hand-rolled ~35-class layer below —
  50. the API generated hundreds of responsive variants; the theme uses ~35).
  51. Kept for now: grid + nav/navbar + forms/buttons + list-group + card.
  52. Phase 4 target: grid → WordPress block grid, then drop Bootstrap.
  53. (offcanvas nav is self-contained CSS via :target — see .dw-offcanvas.)
  54. ************************************************************/
  55. @import '../node_modules/bootstrap/scss/root';
  56. @import '../node_modules/bootstrap/scss/reboot';
  57. @import '../node_modules/bootstrap/scss/type';
  58. @import '../node_modules/bootstrap/scss/containers';
  59. @import '../node_modules/bootstrap/scss/grid';
  60. @import '../node_modules/bootstrap/scss/forms';
  61. @import '../node_modules/bootstrap/scss/buttons';
  62. @import '../node_modules/bootstrap/scss/transitions';
  63. @import '../node_modules/bootstrap/scss/nav';
  64. @import '../node_modules/bootstrap/scss/navbar';
  65. @import '../node_modules/bootstrap/scss/card';
  66. @import '../node_modules/bootstrap/scss/list-group';
  67. // ---- replacements for dropped Bootstrap partials (Phase 1 + 2) ----
  68. // images partial: only .img-fluid was used (art page).
  69. .img-fluid {
  70. max-width: 100%;
  71. height: auto;
  72. }
  73. // badge: last.fm stat counts (music) + analytics hit counts. Matches the
  74. // former bootstrap/badge output exactly (incl. the theme's top:-1px nudge).
  75. .badge {
  76. display: inline-block;
  77. padding: 0.35em 0.65em;
  78. font-size: 0.75em;
  79. font-weight: 700;
  80. line-height: 1;
  81. color: #fff;
  82. text-align: center;
  83. white-space: nowrap;
  84. vertical-align: baseline;
  85. border-radius: 0.375rem;
  86. position: relative;
  87. top: -1px;
  88. }
  89. // alert: contact-form success / error messages (inc/tweaks.php). The BS
  90. // colour variants no longer compiled (theme-colors trimmed) — give them
  91. // real green/red here.
  92. .alert {
  93. position: relative;
  94. padding: 1rem;
  95. margin-bottom: 1rem;
  96. border: 1px solid transparent;
  97. border-radius: 0.375rem;
  98. }
  99. .alert-success {
  100. color: #0a3622;
  101. background-color: #d1e7dd;
  102. border-color: #a3cfbb;
  103. }
  104. .alert-danger {
  105. color: #58151c;
  106. background-color: #f8d7da;
  107. border-color: #f1aeb5;
  108. }
  109. // pagination: flex container only. WP paginate_links() emits .page-numbers /
  110. // .pagination a, styled in style.css; margin/padding also live there.
  111. .pagination {
  112. display: flex;
  113. list-style: none;
  114. }
  115. // ---- utilities (hand-rolled; replaces bootstrap utilities/api + helpers) ----
  116. // Only the ~35 utility classes actually used in the theme markup; values match
  117. // the former Bootstrap output exactly. Spacers: 1=.25 2=.5 3=1 4=1.5 5=3rem.
  118. // Breakpoints: md=768px, lg=992px, xl=1200px. (mb-n1 was a no-op — BS doesn't
  119. // generate negative margins by default — so it's intentionally omitted.)
  120. .mt-0 { margin-top: 0 !important; }
  121. .mt-1 { margin-top: .25rem !important; }
  122. .mt-2 { margin-top: .5rem !important; }
  123. .mt-3 { margin-top: 1rem !important; }
  124. .mt-4 { margin-top: 1.5rem !important; }
  125. .mt-5 { margin-top: 3rem !important; }
  126. .mb-1 { margin-bottom: .25rem !important; }
  127. .mb-2 { margin-bottom: .5rem !important; }
  128. .mb-3 { margin-bottom: 1rem !important; }
  129. .mb-5 { margin-bottom: 3rem !important; }
  130. .my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
  131. .pt-3 { padding-top: 1rem !important; }
  132. .pt-5 { padding-top: 3rem !important; }
  133. .pb-2 { padding-bottom: .5rem !important; }
  134. .pb-5 { padding-bottom: 3rem !important; }
  135. .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  136. .d-flex { display: flex !important; }
  137. .align-items-end { align-items: flex-end !important; }
  138. .justify-content-center { justify-content: center !important; }
  139. .float-end { float: right !important; }
  140. .overflow-hidden { overflow: hidden !important; }
  141. .fs-2 { font-size: calc(1.325rem + .9vw) !important; }
  142. .fs-5 { font-size: 1.25rem !important; }
  143. .fw-bold { font-weight: 700 !important; }
  144. .fw-light { font-weight: 300 !important; }
  145. .lh-base { line-height: 1.5 !important; }
  146. .text-muted { color: rgba(33, 37, 41, .75) !important; }
  147. .bg-dark { background-color: rgb(83, 87, 99) !important; }
  148. @media (min-width: 768px) {
  149. .mt-md-0 { margin-top: 0 !important; }
  150. .text-md-start { text-align: left !important; }
  151. .text-md-end { text-align: right !important; }
  152. }
  153. @media (min-width: 992px) {
  154. .d-lg-block { display: block !important; }
  155. }
  156. @media (min-width: 1200px) {
  157. .fs-2 { font-size: 2rem !important; }
  158. }
  159. /* Bootstrap Icons font dropped (2026-06-19): the header's 8 nav icons are now
  160. inline SVG in parts/header.html, so the full icon font + its ~2000 CSS rules
  161. are no longer imported. */
  162. /***********************************************************
  163. ##################### Overrides ############################
  164. ************************************************************/
  165. // Bootstrap 5.3 changed .table to default --bs-table-bg to --bs-body-bg
  166. // (it was transparent in 5.2). Keep the About icon grid transparent.
  167. .table.icons {
  168. --bs-table-bg: transparent;
  169. }
  170. // Sprite icons (dw_icon() / <use href="#dw-…">, from the FA Pro kit → icons.svg).
  171. // Sized like a font icon: 1em square, inherits text color.
  172. .dw-icon {
  173. width: 1em;
  174. height: 1em;
  175. fill: currentColor;
  176. vertical-align: -0.125em;
  177. }
  178. // Social icons (was fa-2x). Baseline-aligned since they stand alone.
  179. .dw-icon-2x {
  180. width: 2em;
  181. height: 2em;
  182. vertical-align: middle;
  183. }
  184. // Offcanvas top-nav — self-contained, CSS-only (replaces Bootstrap's offcanvas
  185. // component + JS). The brand link is <a href="#nav">, so :target drives
  186. // the open state; a backdrop <a href="#"> and the × link close it. Tradeoffs vs
  187. // the BS JS version: no ESC-to-close, no focus-trap, no body-scroll-lock.
  188. .dw-offcanvas {
  189. position: fixed;
  190. top: 0;
  191. left: 0;
  192. right: 0;
  193. z-index: 1045; // above .navbar.fixed-top (1030)
  194. display: flex;
  195. flex-direction: column;
  196. height: 85px; // match the scroll-up navbar dropdown (~84.6px)
  197. visibility: hidden;
  198. transform: translateY(-100%);
  199. transition: transform 0.3s ease-in-out, visibility 0.3s;
  200. overflow-y: auto;
  201. background: rgba(72, 76, 87, 0.7); // footer color (#484c57), translucent
  202. backdrop-filter: blur(6px);
  203. }
  204. .dw-offcanvas:target {
  205. visibility: visible;
  206. transform: none;
  207. }
  208. .dw-offcanvas-backdrop {
  209. display: none;
  210. position: fixed;
  211. inset: 0;
  212. z-index: 1040; // below .dw-offcanvas
  213. background: rgba(0, 0, 0, 0.4);
  214. }
  215. .dw-offcanvas:target ~ .dw-offcanvas-backdrop {
  216. display: block;
  217. }
  218. @media (prefers-reduced-motion: reduce) {
  219. .dw-offcanvas {
  220. transition: none;
  221. }
  222. }
  223. // Gallery carousel — CSS scroll-snap (replaces the Bootstrap carousel on the
  224. // art page). Swipe / trackpad / scrollbar natively; prev-next + arrow keys via
  225. // a tiny vanilla script (js/art.js). No autoplay (was 5s) by design.
  226. .dw-carousel {
  227. position: relative;
  228. }
  229. .dw-carousel-track {
  230. display: flex;
  231. overflow-x: auto;
  232. scroll-snap-type: x mandatory;
  233. scroll-behavior: smooth;
  234. scrollbar-width: none; // Firefox
  235. &::-webkit-scrollbar {
  236. display: none; // WebKit
  237. }
  238. }
  239. .dw-carousel-slide {
  240. flex: 0 0 100%;
  241. scroll-snap-align: center;
  242. display: flex;
  243. justify-content: center;
  244. }
  245. .dw-carousel-prev,
  246. .dw-carousel-next {
  247. position: absolute;
  248. top: 50%;
  249. transform: translateY(-50%);
  250. z-index: 2;
  251. width: 3rem;
  252. height: 3rem;
  253. border: 0;
  254. border-radius: 50%;
  255. background: rgba(0, 0, 0, 0.5);
  256. color: #fff;
  257. font-size: 1.75rem;
  258. line-height: 1;
  259. cursor: pointer;
  260. }
  261. .dw-carousel-prev {
  262. left: 1rem;
  263. }
  264. .dw-carousel-next {
  265. right: 1rem;
  266. }
  267. @media (prefers-reduced-motion: reduce) {
  268. .dw-carousel-track {
  269. scroll-behavior: auto;
  270. }
  271. }
  272. // Studio hero — vanilla fade-carousel (replaces Bootstrap carousel-fade + the
  273. // backstretch background). #studio-caro keeps its caro-grad* solid-colour
  274. // classes + 1s transition from style.css; the bg layer / <video> show through
  275. // when the gradient is caro-grad5 (transparent). Driven by js/studio.js.
  276. #studio-caro {
  277. position: relative;
  278. overflow: hidden;
  279. min-height: 80vh;
  280. }
  281. .dw-studio-bg {
  282. position: absolute;
  283. inset: 0;
  284. z-index: 0;
  285. background-size: cover;
  286. background-position: center;
  287. }
  288. .dw-studio-video,
  289. .dw-studio-tv {
  290. position: absolute;
  291. inset: 0;
  292. width: 100%;
  293. height: 100%;
  294. object-fit: cover;
  295. display: none; // shown per-slide by studio.js (camera → Media, tv → fact intro)
  296. }
  297. .dw-studio-tv {
  298. filter: saturate(0); // grayscale, as it was behind the About fact slides
  299. }
  300. .dw-fade-carousel {
  301. position: relative;
  302. z-index: 1;
  303. }
  304. .dw-fade-slide {
  305. position: absolute;
  306. inset: 0;
  307. opacity: 0;
  308. visibility: hidden;
  309. transition: opacity 0.8s ease;
  310. }
  311. .dw-fade-slide.active {
  312. position: relative; // the active slide defines the track height
  313. opacity: 1;
  314. visibility: visible;
  315. }
  316. @media (prefers-reduced-motion: reduce) {
  317. .dw-fade-slide {
  318. transition: none;
  319. }
  320. }
  321. // Studio tab panes — vanilla show/hide (replaces Bootstrap Tab).
  322. #studio-tab .tab-pane {
  323. display: none;
  324. }
  325. #studio-tab .tab-pane.active {
  326. display: block;
  327. }
  328. // About fade-carousel indicator dots (replaces Bootstrap .carousel-indicators).
  329. .dw-fade-dots {
  330. position: absolute;
  331. bottom: 1.5rem;
  332. left: 0;
  333. right: 0;
  334. z-index: 3;
  335. display: flex;
  336. justify-content: center;
  337. gap: 0.5rem;
  338. }
  339. .dw-fade-dot {
  340. width: 12px;
  341. height: 12px;
  342. padding: 0;
  343. border: 1px solid #fff;
  344. border-radius: 50%;
  345. background: transparent;
  346. opacity: 0.6;
  347. cursor: pointer;
  348. }
  349. .dw-fade-dot.active {
  350. background: #fff;
  351. opacity: 1;
  352. }