styles.scss 14 KB

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