styles.scss 15 KB

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