styles.scss 15 KB

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