styles.scss 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  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. // ---- replacements for dropped Bootstrap partials (Phase 1 + 2) ----
  59. // images partial: only .img-fluid was used (art page).
  60. .img-fluid {
  61. max-width: 100%;
  62. height: auto;
  63. }
  64. // badge: last.fm stat counts (music) + analytics hit counts. Matches the
  65. // former bootstrap/badge output exactly (incl. the theme's top:-1px nudge).
  66. .badge {
  67. display: inline-block;
  68. padding: 0.35em 0.65em;
  69. font-size: 0.75em;
  70. font-weight: 700;
  71. line-height: 1;
  72. color: #fff;
  73. text-align: center;
  74. white-space: nowrap;
  75. vertical-align: baseline;
  76. border-radius: 0.375rem;
  77. position: relative;
  78. top: -1px;
  79. }
  80. // alert: contact-form success / error messages (inc/tweaks.php). The BS
  81. // colour variants no longer compiled (theme-colors trimmed) — give them
  82. // real green/red here.
  83. .alert {
  84. position: relative;
  85. padding: 1rem;
  86. margin-bottom: 1rem;
  87. border: 1px solid transparent;
  88. border-radius: 0.375rem;
  89. }
  90. .alert-success {
  91. color: #0a3622;
  92. background-color: #d1e7dd;
  93. border-color: #a3cfbb;
  94. }
  95. .alert-danger {
  96. color: #58151c;
  97. background-color: #f8d7da;
  98. border-color: #f1aeb5;
  99. }
  100. // pagination: flex container only. WP paginate_links() emits .page-numbers /
  101. // .pagination a, styled in style.css; margin/padding also live there.
  102. .pagination {
  103. display: flex;
  104. list-style: none;
  105. }
  106. // ---- utilities (hand-rolled; replaces bootstrap utilities/api + helpers) ----
  107. // Only the ~35 utility classes actually used in the theme markup; values match
  108. // the former Bootstrap output exactly. Spacers: 1=.25 2=.5 3=1 4=1.5 5=3rem.
  109. // Breakpoints: md=768px, lg=992px, xl=1200px. (mb-n1 was a no-op — BS doesn't
  110. // generate negative margins by default — so it's intentionally omitted.)
  111. .mt-0 { margin-top: 0 !important; }
  112. .mt-1 { margin-top: .25rem !important; }
  113. .mt-2 { margin-top: .5rem !important; }
  114. .mt-3 { margin-top: 1rem !important; }
  115. .mt-4 { margin-top: 1.5rem !important; }
  116. .mt-5 { margin-top: 3rem !important; }
  117. .mb-1 { margin-bottom: .25rem !important; }
  118. .mb-2 { margin-bottom: .5rem !important; }
  119. .mb-3 { margin-bottom: 1rem !important; }
  120. .mb-5 { margin-bottom: 3rem !important; }
  121. .my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
  122. .pt-3 { padding-top: 1rem !important; }
  123. .pt-5 { padding-top: 3rem !important; }
  124. .pb-2 { padding-bottom: .5rem !important; }
  125. .pb-5 { padding-bottom: 3rem !important; }
  126. .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  127. .d-flex { display: flex !important; }
  128. .fixed-top { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; } // was in bootstrap/helpers (position); header navbar full-width fixed
  129. .align-items-end { align-items: flex-end !important; }
  130. .justify-content-center { justify-content: center !important; }
  131. .float-end { float: right !important; }
  132. .overflow-hidden { overflow: hidden !important; }
  133. .fs-2 { font-size: calc(1.325rem + .9vw) !important; }
  134. .fs-5 { font-size: 1.25rem !important; }
  135. .fw-bold { font-weight: 700 !important; }
  136. .fw-light { font-weight: 300 !important; }
  137. .lh-base { line-height: 1.5 !important; }
  138. .text-muted { color: rgba(33, 37, 41, .75) !important; }
  139. .bg-dark { background-color: rgb(83, 87, 99) !important; }
  140. @media (min-width: 768px) {
  141. .mt-md-0 { margin-top: 0 !important; }
  142. .text-md-start { text-align: left !important; }
  143. .text-md-end { text-align: right !important; }
  144. }
  145. @media (min-width: 992px) {
  146. .d-lg-block { display: block !important; }
  147. }
  148. @media (min-width: 1200px) {
  149. .fs-2 { font-size: 2rem !important; }
  150. }
  151. // ---- grid (hand-rolled 12-col flexbox; replaces bootstrap/grid + containers) ----
  152. // .container base widths/padding are custom in style.css (fixed per breakpoint);
  153. // only .container-fluid (full-width bands) + the flex grid live here.
  154. .container-fluid {
  155. width: 100%;
  156. padding-right: .75rem;
  157. padding-left: .75rem;
  158. margin-right: auto;
  159. margin-left: auto;
  160. }
  161. .row {
  162. --bs-gutter-x: 1.5rem;
  163. --bs-gutter-y: 0;
  164. display: flex;
  165. flex-wrap: wrap;
  166. margin-top: calc(-1 * var(--bs-gutter-y));
  167. margin-right: calc(-.5 * var(--bs-gutter-x));
  168. margin-left: calc(-.5 * var(--bs-gutter-x));
  169. }
  170. .row > * {
  171. box-sizing: border-box;
  172. flex-shrink: 0;
  173. width: 100%;
  174. max-width: 100%;
  175. padding-right: calc(var(--bs-gutter-x) * .5);
  176. padding-left: calc(var(--bs-gutter-x) * .5);
  177. margin-top: var(--bs-gutter-y);
  178. }
  179. $dw-cols: 8.333333%, 16.666667%, 25%, 33.333333%, 41.666667%, 50%, 58.333333%, 66.666667%, 75%, 83.333333%, 91.666667%, 100%;
  180. .col { flex: 1 0 0%; }
  181. @for $i from 1 through 12 {
  182. .col-#{$i} { flex: 0 0 auto; width: nth($dw-cols, $i); }
  183. }
  184. @each $bp, $w in (sm: 576px, md: 768px, lg: 992px) {
  185. @media (min-width: $w) {
  186. .col-#{$bp} { flex: 1 0 0%; }
  187. @for $i from 1 through 12 {
  188. .col-#{$bp}-#{$i} { flex: 0 0 auto; width: nth($dw-cols, $i); }
  189. }
  190. }
  191. }
  192. @media (min-width: 768px) { .offset-md-1 { margin-left: 8.333333%; } }
  193. @media (min-width: 992px) { .offset-lg-1 { margin-left: 8.333333%; } }
  194. // ---- list-group (hand-rolled; replaces bootstrap/list-group) ----
  195. // Base only; context overrides (ul.nav, .list-group-horizontal, #music) live in
  196. // style.css. Resolved values: body-color #232323, body-bg #d3d3d3 (the gray
  197. // rows on music/analytics), border #dee2e6, radius .375rem.
  198. .list-group {
  199. display: flex;
  200. flex-direction: column;
  201. padding-left: 0;
  202. margin-bottom: 0;
  203. border-radius: 0.375rem;
  204. }
  205. .list-group-item {
  206. position: relative;
  207. display: block;
  208. padding: 0.5rem 1rem;
  209. color: #232323;
  210. background-color: #d3d3d3;
  211. border: 1px solid #dee2e6;
  212. text-decoration: none;
  213. }
  214. .list-group-item:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
  215. .list-group-item:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
  216. .list-group-item + .list-group-item { border-top-width: 0; }
  217. .list-group-horizontal { flex-direction: row; }
  218. .list-group-horizontal > .list-group-item:first-child:not(:last-child) { border-bottom-left-radius: 0.375rem; border-top-right-radius: 0; }
  219. .list-group-horizontal > .list-group-item:last-child:not(:first-child) { border-bottom-left-radius: 0; border-top-right-radius: 0.375rem; }
  220. // ---- nav / navbar / card (hand-rolled; replaces those partials) ----
  221. // Base only; the theme customizes navbar heavily (.navbar.fixed/.visible,
  222. // .navbar .container, .site-title a) and self-styles the front-page .card.
  223. // transitions partial dropped entirely (no .fade/.collapse used).
  224. .nav {
  225. display: flex;
  226. flex-wrap: wrap;
  227. list-style: none;
  228. margin-bottom: 0;
  229. padding-left: 0;
  230. }
  231. .navbar {
  232. position: relative;
  233. display: flex;
  234. flex-wrap: wrap;
  235. align-items: center;
  236. justify-content: space-between;
  237. padding: 0.5rem 0;
  238. }
  239. .navbar-brand {
  240. padding-top: 0.3125rem;
  241. padding-bottom: 0.3125rem;
  242. margin-right: 1rem;
  243. font-size: 1.25rem;
  244. white-space: nowrap;
  245. text-decoration: none;
  246. }
  247. .card { // front-page only; matches former bootstrap output (bg = body-bg #d3d3d3)
  248. position: relative;
  249. display: flex;
  250. flex-direction: column;
  251. min-width: 0;
  252. word-wrap: break-word;
  253. color: #232323;
  254. background-color: #d3d3d3;
  255. border: 1px solid rgba(0, 0, 0, 0.175);
  256. border-radius: 0.375rem;
  257. }
  258. // ---- forms + buttons (hand-rolled; replaces those partials) ----
  259. // Only used classes. btn-default/btn-danger never compiled (theme-colors
  260. // trimmed) so they fall back to the base .btn, same as before.
  261. .form-control {
  262. display: block;
  263. width: 100%;
  264. padding: 0.375rem 0.75rem;
  265. font-size: 1rem;
  266. font-weight: 400;
  267. line-height: 1.5;
  268. color: #232323;
  269. background-color: #d3d3d3;
  270. background-clip: padding-box;
  271. border: 1px solid #dee2e6;
  272. border-radius: 0.375rem;
  273. appearance: none;
  274. transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  275. }
  276. .form-control:focus {
  277. color: #232323;
  278. background-color: #d3d3d3;
  279. border-color: #86b7fe;
  280. outline: 0;
  281. box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  282. }
  283. .input-group {
  284. position: relative;
  285. display: flex;
  286. flex-wrap: wrap;
  287. align-items: stretch;
  288. width: 100%;
  289. }
  290. .btn {
  291. display: inline-block;
  292. padding: 0.375rem 0.75rem;
  293. font-size: 1rem;
  294. font-weight: 400;
  295. line-height: 1.5;
  296. color: #232323;
  297. text-align: center;
  298. text-decoration: none;
  299. vertical-align: middle;
  300. cursor: pointer;
  301. user-select: none;
  302. background-color: transparent;
  303. border: 1px solid transparent;
  304. border-radius: 0.375rem;
  305. transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  306. }
  307. .btn-dark {
  308. color: #fff;
  309. background-color: #535763;
  310. border-color: #535763;
  311. }
  312. .btn-dark:hover {
  313. color: #fff;
  314. background-color: #6d707a;
  315. border-color: #646873;
  316. }
  317. .btn-lg {
  318. padding: 0.5rem 1rem;
  319. font-size: 1.25rem;
  320. border-radius: 0.5rem;
  321. }
  322. /* Bootstrap Icons font dropped (2026-06-19): the header's 8 nav icons are now
  323. inline SVG in parts/header.html, so the full icon font + its ~2000 CSS rules
  324. are no longer imported. */
  325. /***********************************************************
  326. ##################### Overrides ############################
  327. ************************************************************/
  328. // Bootstrap 5.3 changed .table to default --bs-table-bg to --bs-body-bg
  329. // (it was transparent in 5.2). Keep the About icon grid transparent.
  330. .table.icons {
  331. --bs-table-bg: transparent;
  332. }
  333. // Sprite icons (dw_icon() / <use href="#dw-…">, from the FA Pro kit → icons.svg).
  334. // Sized like a font icon: 1em square, inherits text color.
  335. .dw-icon {
  336. width: 1em;
  337. height: 1em;
  338. fill: currentColor;
  339. vertical-align: -0.125em;
  340. }
  341. // Social icons (was fa-2x). Baseline-aligned since they stand alone.
  342. .dw-icon-2x {
  343. width: 2em;
  344. height: 2em;
  345. vertical-align: middle;
  346. }
  347. // Offcanvas top-nav — self-contained, CSS-only (replaces Bootstrap's offcanvas
  348. // component + JS). The brand link is <a href="#nav">, so :target drives
  349. // the open state; a backdrop <a href="#"> and the × link close it. Tradeoffs vs
  350. // the BS JS version: no ESC-to-close, no focus-trap, no body-scroll-lock.
  351. .dw-offcanvas {
  352. position: fixed;
  353. top: 0;
  354. left: 0;
  355. right: 0;
  356. z-index: 1045; // above .navbar.fixed-top (1030)
  357. display: flex;
  358. flex-direction: column;
  359. height: 85px; // match the scroll-up navbar dropdown (~84.6px)
  360. visibility: hidden;
  361. transform: translateY(-100%);
  362. transition: transform 0.3s ease-in-out, visibility 0.3s;
  363. overflow-y: auto;
  364. background: rgba(72, 76, 87, 0.7); // footer color (#484c57), translucent
  365. backdrop-filter: blur(6px);
  366. }
  367. .dw-offcanvas:target {
  368. visibility: visible;
  369. transform: none;
  370. }
  371. .dw-offcanvas-backdrop {
  372. display: none;
  373. position: fixed;
  374. inset: 0;
  375. z-index: 1040; // below .dw-offcanvas
  376. background: rgba(0, 0, 0, 0.4);
  377. }
  378. .dw-offcanvas:target ~ .dw-offcanvas-backdrop {
  379. display: block;
  380. }
  381. @media (prefers-reduced-motion: reduce) {
  382. .dw-offcanvas {
  383. transition: none;
  384. }
  385. }
  386. // Gallery carousel — CSS scroll-snap (replaces the Bootstrap carousel on the
  387. // art page). Swipe / trackpad / scrollbar natively; prev-next + arrow keys via
  388. // a tiny vanilla script (js/art.js). No autoplay (was 5s) by design.
  389. .dw-carousel {
  390. position: relative;
  391. }
  392. .dw-carousel-track {
  393. display: flex;
  394. overflow-x: auto;
  395. scroll-snap-type: x mandatory;
  396. scroll-behavior: smooth;
  397. scrollbar-width: none; // Firefox
  398. &::-webkit-scrollbar {
  399. display: none; // WebKit
  400. }
  401. }
  402. .dw-carousel-slide {
  403. flex: 0 0 100%;
  404. scroll-snap-align: center;
  405. display: flex;
  406. justify-content: center;
  407. }
  408. .dw-carousel-prev,
  409. .dw-carousel-next {
  410. position: absolute;
  411. top: 50%;
  412. transform: translateY(-50%);
  413. z-index: 2;
  414. width: 3rem;
  415. height: 3rem;
  416. border: 0;
  417. border-radius: 50%;
  418. background: rgba(0, 0, 0, 0.5);
  419. color: #fff;
  420. font-size: 1.75rem;
  421. line-height: 1;
  422. cursor: pointer;
  423. }
  424. .dw-carousel-prev {
  425. left: 1rem;
  426. }
  427. .dw-carousel-next {
  428. right: 1rem;
  429. }
  430. @media (prefers-reduced-motion: reduce) {
  431. .dw-carousel-track {
  432. scroll-behavior: auto;
  433. }
  434. }
  435. // Studio hero — vanilla fade-carousel (replaces Bootstrap carousel-fade + the
  436. // backstretch background). #studio-caro keeps its caro-grad* solid-colour
  437. // classes + 1s transition from style.css; the bg layer / <video> show through
  438. // when the gradient is caro-grad5 (transparent). Driven by js/studio.js.
  439. #studio-caro {
  440. position: relative;
  441. overflow: hidden;
  442. min-height: 80vh;
  443. }
  444. .dw-studio-bg {
  445. position: absolute;
  446. inset: 0;
  447. z-index: 0;
  448. background-size: cover;
  449. background-position: center;
  450. }
  451. .dw-studio-video,
  452. .dw-studio-tv {
  453. position: absolute;
  454. inset: 0;
  455. width: 100%;
  456. height: 100%;
  457. object-fit: cover;
  458. display: none; // shown per-slide by studio.js (camera → Media, tv → fact intro)
  459. }
  460. .dw-studio-tv {
  461. filter: saturate(0); // grayscale, as it was behind the About fact slides
  462. }
  463. .dw-fade-carousel {
  464. position: relative;
  465. z-index: 1;
  466. }
  467. .dw-fade-slide {
  468. position: absolute;
  469. inset: 0;
  470. opacity: 0;
  471. visibility: hidden;
  472. transition: opacity 0.8s ease;
  473. }
  474. .dw-fade-slide.active {
  475. position: relative; // the active slide defines the track height
  476. opacity: 1;
  477. visibility: visible;
  478. }
  479. @media (prefers-reduced-motion: reduce) {
  480. .dw-fade-slide {
  481. transition: none;
  482. }
  483. }
  484. // Studio tab panes — vanilla show/hide (replaces Bootstrap Tab).
  485. #studio-tab .tab-pane {
  486. display: none;
  487. }
  488. #studio-tab .tab-pane.active {
  489. display: block;
  490. }
  491. // About fade-carousel indicator dots (replaces Bootstrap .carousel-indicators).
  492. .dw-fade-dots {
  493. position: absolute;
  494. bottom: 1.5rem;
  495. left: 0;
  496. right: 0;
  497. z-index: 3;
  498. display: flex;
  499. justify-content: center;
  500. gap: 0.5rem;
  501. }
  502. .dw-fade-dot {
  503. width: 12px;
  504. height: 12px;
  505. padding: 0;
  506. border: 1px solid #fff;
  507. border-radius: 50%;
  508. background: transparent;
  509. opacity: 0.6;
  510. cursor: pointer;
  511. }
  512. .dw-fade-dot.active {
  513. background: #fff;
  514. opacity: 1;
  515. }