Files
CWC/styles/base/global.css
T
Keith Solomon ca367364f8
Deploy to Dreamhost (dev) / build (push) Successful in 36s
Sync TODOs with Issues / sync_todos (push) Successful in 6s
feature: Implement dynamic browser chrome tinting for header and footer visibility
2026-07-12 13:57:20 -05:00

107 lines
2.8 KiB
CSS

/* Miscellaneous custom styles */
@theme {
--spacing-menu-top: calc(100% + .9375rem);
--spacing-section: 2rem;
--shadow-menu-shadow: 0 .25rem .375rem rgba(0,0,0,0.1);
/** Breakpoints
* The breakpoints are set to match the default Tailwind breakpoints.
* You can override them here if you want to use different breakpoints.
*
* @see https://tailwindcss.com/docs/breakpoints
*/
--breakpoint-*: initial;
--breakpoint-xxs: 22.5rem; /* 360px */
--breakpoint-xs: 29.6875rem; /* 475px */
--breakpoint-sm: 40rem; /* 640px */
--breakpoint-md: 48rem; /* 768px */
--breakpoint-lg: 64rem; /* 1024px */
--breakpoint-xl: 70rem; /* 1280px */
--breakpoint-2xl: 96rem; /* 1536px */
}
/* Basic layout styles */
main#maincontent {
background-color: var(--color-background);
color: var(--color-text);
margin: 0;
padding: 0 0 5rem;
}
.container {
margin: 0 auto;
max-width: 80.5rem;
padding-inline: clamp(1.5rem, 5vw, 3rem);
width: 100%;
&.wider { max-width: 85rem; }
}
.section {
@apply relative my-section px-section;
&:first-child { @apply mt-0; }
&:last-child, p:last-child { @apply mb-0; }
&.has-background { @apply py-section bg-cover bg-no-repeat; }
}
/** Allows containers inside containers
*
* .container .wp-block-section {
* @apply mx-break-out;
* }
*/
.content-wrapper {
.alignfull { @apply max-w-full; }
.alignwide { @apply max-w-full; }
.alignleft { @apply ml-0 mr-auto float-none; }
.alignright { @apply ml-auto mr-0 float-none; }
.aligncenter { @apply mx-auto; }
}
/* Responsive embeds */
.embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.embed iframe, .embed object, .embed embed, .embed video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/*
* Bottom chrome tint.
*
* On devices with `viewport-fit=cover` (iOS Safari), the area behind
* the home indicator is part of the page background. The fixed
* pseudo-element below fills the `env(safe-area-inset-bottom)` band
* and shows the footer color when the body has the `.footer-in-view`
* class. That class is toggled by static/js/modules/ChromeTint.js
* when the .site-footer is in view.
*
* No effect on browsers without safe-area-inset-bottom (height resolves
* to 0px and the pseudo-element is invisible).
*/
body::after {
background: var(--color-background);
bottom: 0;
content: "";
height: env(safe-area-inset-bottom);
left: 0;
pointer-events: none;
position: fixed;
right: 0;
transition: background-color 200ms ease;
z-index: 9999;
}
body.footer-in-view::after {
background: var(--color-cwc-blue-02);
}
@media (prefers-reduced-motion: reduce) {
body::after { transition: none; }
}