styles.scss 13 KB

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