Files
Kingsborough-LibGuide/groups/home/bootstrap5/home1.css
T
Mark EatonandClaude Opus 4.6 149004f267 fix dropdown fade by moving transition to higher-specificity selector
The .fade transition (one class) was being overridden by a later
.dropdown-menu rule (also one class) that set transition to only
background-color. Moving the opacity transition into .dropdown-menu.fade
(two classes) ensures it wins regardless of cascade order.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 11:30:59 -05:00

736 lines
15 KiB
CSS

<style>
:root {
--kbccblue: #003466;
--kbccorange: #ff4e00;
--text: #111;
--bg: #fff;
--bg-surface: #fff;
--hover-dark: #444;
--focus-outline: #0056b3;
--link-color: black;
}
[data-bs-theme="dark"] {
--text: #e0e0e0;
--bg: #1a1a2e;
--bg-surface: #25253e;
--hover-dark: #555;
--focus-outline: #ff4e00;
--link-color: #ccc;
}
body {
color: var(--text);
background-color: var(--bg);
overflow-x: hidden;
transition: background-color 0.2s ease, color 0.2s ease;
}
a,
a:hover {
text-decoration: none;
}
/* Skip link styles (WCAG 2.4.1) */
.skip-link {
position: absolute;
top: -40px;
left: 0;
background: var(--kbccblue);
color: #fff;
padding: 8px 16px;
z-index: 10000;
text-decoration: none;
font-weight: bold;
}
.skip-link:focus {
top: 0;
outline: 3px solid var(--kbccorange);
outline-offset: 2px;
}
/* visually-hidden is provided natively by Bootstrap 5 */
/* style slide out chat */
#lcs_slide_out_button-21944 {
font-size: 1.5em;
}
/* style header */
#header-div {
padding: 30px;
}
/* style the hamburger menu */
#hamburger-container {
float: left;
}
#hamburger,
#hamburger:active {
border: none;
outline: none;
background-color: var(--bg-surface);
color: var(--kbccblue);
}
#hamburger::after {
display: none;
}
#hamburger-ul > li > .searchmenu {
background-color: var(--bg-surface);
}
#hamburger-ul {
padding: 25px 0;
}
/* have bootstrap dropdowns fade in and out */
.dropdown-menu.fade {
display: block;
opacity: 0;
pointer-events: none;
position: absolute;
top: 100%;
margin-top: 0;
transition: opacity 0.5s ease, background-color 0.2s ease;
-webkit-transition: opacity 0.5s ease, background-color 0.2s ease;
}
.show > .dropdown-menu.fade,
.dropdown-menu.fade.show {
pointer-events: auto;
opacity: 1;
}
/* Show dropdown on hover AND keyboard focus (WCAG 2.1.1) */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
display: block;
}
/* Navigation dropdown keyboard support (WCAG 2.1.1) */
.main-nav-dropdown:focus-within > .dropdown-menu.fade {
pointer-events: auto;
opacity: 1;
}
/* style the login at the top right */
#login-div {
float: right;
padding: 8px 15px 0 0;
color: var(--kbccblue);
font-size: 1.5em;
}
#login-text {
display: inline-block;
vertical-align: -2px;
}
#login-icon {
display: inline-block;
margin-left: 5px;
}
[data-bs-theme="dark"] #hamburger,
[data-bs-theme="dark"] #hamburger:active {
background-color: var(--bg);
color: white;
}
[data-bs-theme="dark"] #login-div {
color: white;
}
/* Ensure jumbotron links fill full width (prevents shrinking on focus) */
a.ga-by-jumbotron {
display: block;
}
/* Accessible focus indicators for all interactive elements */
a:focus,
a:focus-visible,
button:focus,
button:focus-visible,
input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
[tabindex]:focus,
[tabindex]:focus-visible {
outline: 3px solid var(--focus-outline) !important;
outline-offset: 2px !important;
}
/* style alert */
#hours-content-container { /* this id comes from the components libguide */
background-color: var(--kbccblue);
color: #fff;
text-align: center;
font-size: 1.5em;
padding: 4px;
margin: -10px -11px -30px -11px;
border-radius: 3px;
}
#hours-content-container > a {
color: #fff
}
[data-bs-theme="dark"] #hours-content-container {
background-color: var(--kbccblue);
color: var(--text);
}
[data-bs-theme="dark"] #hours-content-container > a {
color: var(--text);
}
/* style navbar */
nav.navbar-light.main-nav-container {
background-color: var(--bg-surface) !important;
background: var(--bg-surface) !important;
border: none;
font-size: 1.4em;
color: var(--text);
border-radius: 0;
padding: 5px 0;
margin-left: 12px;
margin-right: 12px;
}
[data-bs-theme="dark"] nav.navbar-light.main-nav-container {
background-color: var(--kbccblue) !important;
background: var(--bg) !important;
color: white;
border-radius: 5px;
margin-left: 12px;
margin-right: 12px;
}
[data-bs-theme="dark"] .navbar-light .navbar-nav > li > a,
[data-bs-theme="dark"] .caret-text {
color: white;
}
.main-nav-dropdown {
margin: 0 8px;
}
.nav .show > a,
.nav .show > a:focus,
.nav .show > a:hover {
background-color: var(--bg-surface);
}
.nav > li > a:hover {
outline: none;
}
.navbar-light .navbar-nav > li > a {
color: var(--text);
}
#navbar-center {
display: flex;
flex-direction: row;
justify-content: left;
float: none;
}
.ga-main-navbar {
font-size: 1.3em;
background-color: transparent;
border: none;
}
.ga-main-navbar.dropdown-toggle::after {
display: none;
}
#dropdownMenu1 {
border-radius: 0;
}
a.searchmenu {
color: var(--text);
}
.highlight-menu-item {
padding: 5px;
}
.highlight-menu-item:hover {
cursor: pointer;
}
/* style background image */
.kbcc-background-image {
background-position: 50% 71%;
padding: 20px 0;
border-radius: 5px;
background-size: cover;
margin: 0 0 30px 0;
}
/* style jumbotron */
.onesearch-jumbotron {
text-align: center;
margin-top: -40px;
}
#app2 {
margin: auto;
width: 80%;
}
#onesearch-header {
font-size: 10em;
margin-bottom: 0;
line-height: 1;
padding-top: 30px;
}
.form-width {
width: 100%;
}
.zero-margin {
margin: -2px;
}
#radios {
float: left;
}
.radiocontainer {
margin-left: 10px;
}
.radiocontainer {
display: inline-block;
}
#booksradio, #articlesradio, #everythingradio {
margin-right: 3px;
}
#radios label {
font-weight: bolder;
}
[data-bs-theme="dark"] #radios label {
color: white;
}
[data-bs-theme="dark"] #radios input[type="radio"] {
accent-color: white;
}
#advanced {
float: right;
margin-top: 10px;
}
#advanced > strong > a {
color: var(--link-color);
}
/* add flex so that blue box-shadows line up */
#flex-search-form {
display: flex;
flex-direction: row;
justify-content: center;
margin-bottom: 15px; /* BS3 .form-group provided this; BS5 removed the class */
}
.inherit-height-from-flex {
height: inherit;
}
/* Match BS3 search form sizing */
#primoQueryTemp {
border-radius: 0;
}
[data-bs-theme="dark"] #primoQueryTemp {
background-color: #fff;
color: #111;
}
[data-bs-theme="dark"] #primoQueryTemp::placeholder {
color: #666;
}
.onesearchsubmit {
border-radius: 0;
padding: 6px 12px;
}
[data-bs-theme="dark"] .onesearchsubmit {
margin: 1px;
}
#blue-border2 {
flex: 5;
}
#blue-border3 {
flex: 1;
padding: 0;
}
/* shadow for the search bar */
#blue-border2 {
box-shadow: 0 5px 0 var(--kbccblue), 0 -5px 0 var(--kbccblue),
-5px -5px 0 var(--kbccblue), -5px 5px 0 var(--kbccblue);
}
/*#blue-border2 {
box-shadow: 0 -5px 0 var(--kbccblue), 0 5px 0 var(--kbccblue);
}*/
#blue-border3 {
box-shadow: 0 5px 0 var(--kbccblue), 0 -5px 0 var(--kbccblue),
5px -5px 0 var(--kbccblue), 5px 5px 0 var(--kbccblue);
}
/* style for nav by the jumbotron */
.kbcc-background-image > .col-sm-4 {
margin-top: 10px;
}
.nav-divs-by-jumbotron {
text-align: center;
padding: 6px;
margin: 6px 0;
color: white;
background-color: var(--kbccblue);
border-radius: 3px;
}
.nav-divs-by-jumbotron > h2 {
font-size: 1.5em;
margin-bottom: 4px;
margin-top: 4px;
}
.nav-divs-by-jumbotron:hover {
background-color: var(--hover-dark);
}
#eq_32886 {
background-color: var(--kbccblue);
border: none;
}
.nav-divs-by-jumbotron:hover > h2 > #eq_32886,
#eq_32886:hover {
background-color: var(--hover-dark);
}
#bookastudyroom {
cursor: pointer;
}
/* Ensure nav-jumbotron buttons match link width */
.nav-jumbotron-link.btn-link {
display: block;
width: 100%;
padding: 0; /* remove default Bootstrap padding */
border: none; /* ensure no extra border height */
background: none; /* keep background controlled by inner div */
text-decoration: none;
}
/* Remove default heading margin for uniform button height */
#bookastudyroom-heading {
margin: 0px;
}
/* style link list */
.link-list {
font-size: 1.7em;
}
[data-bs-theme="dark"] .link-list a {
color: white;
}
/* External link icon styling (WCAG 2.4.4) */
.external-link-icon {
font-size: 0.7em;
margin-left: 4px;
vertical-align: middle;
}
/* style the cards with the text content */
.card > .show-panel {
background-color: var(--kbccblue);
text-align: center;
}
.hide-body-border {
border: none;
box-shadow: none;
}
.content-panel-title {
color: white;
font-size: 2em;
}
.content-panel-title > h2 {
margin: 7px 0;
font-size: 1em;
}
.card-header {
padding: 2px;
}
/* style the gallery */
.slick-slide img {
padding: 2px;
max-height: 350px !important;
object-fit: contain;
margin: 0;
}
.s-lib-public-side-header {
display: none;
}
.slick-active {
outline: 0;
}
/* make the slick arrows bigger; adjust margin and padding around big arrows */
.slick-prev:before, .slick-next:before {
font-size: 40px !important;
}
.slick-prev:before {
margin-left: -30px;
}
button.slick-next.slick-arrow, button.slick-prev.slick-arrow {
height: 40px !important;
width: 40px !important;
}
button.slick-next.slick-arrow {
padding-top: 3px;
}
button.slick-prev.slick-arrow {
padding: 3px;
padding-left: 30px;
}
[data-bs-theme="dark"] .slick-prev:before,
[data-bs-theme="dark"] .slick-next:before {
color: white;
}
/* style to make all imported boxes floating */
.s-lib-box-title {
display: none;
}
.s-lg-box {
box-shadow: none !important;
}
.s-lib-box .s-lib-box-title {
display: none;
}
.s-lib-box {
box-shadow: none !important;
border: 0 !important;
}
[data-bs-theme="dark"] .s-lib-box,
[data-bs-theme="dark"] .s-lg-box {
background-color: var(--bg);
}
/* style the dropdown menus */
.dropdown-margin {
padding: 20px 0;
}
.bigger-fancy-text {
font-size: 1.2em;
padding: 5px;
}
.bigger-icon {
font-size: 1.5em;
margin-right: 8px;
}
.caret-text {
display: inline-block;
color: var(--kbccblue);
font-weight: bold;
}
.fancy-caret {
display: inline-block;
margin-left: 8px;
color: var(--kbccorange);
}
button.show > .fancy-caret {
position: relative;
top: 4px;
}
/* style footer */
.orange-line {
height: 10px;
background-color: var(--kbccorange);
}
#main-blue-footer {
background-color: var(--kbccblue);
color: white;
padding: 30px;
}
[data-bs-theme="dark"] #main-blue-footer {
background-color: var(--bg);
}
.whiteahrefs a:link,
.whiteahrefs a:hover,
.whiteahrefs a:visited,
.whiteahrefs a:active {
color: white;
}
.whiteahrefs a i {
margin: 4px 5px 0 0;
font-size: 1.5em;
}
.whiteahrefs {
margin-top: 10px;
}
#lighthouse-logo > a > img {
max-width: 150px;
}
/* dark mode toggle button */
#theme-toggle {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 9999;
background: none;
border: 2px solid var(--kbccblue);
color: var(--kbccblue);
border-radius: 50%;
width: 44px;
height: 44px;
font-size: 1.2em;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
background-color: var(--bg);
}
#theme-toggle:hover {
background-color: var(--kbccblue);
color: #fff;
}
[data-bs-theme="dark"] #theme-toggle {
border-color: #ffc107;
color: #ffc107;
}
[data-bs-theme="dark"] #theme-toggle:hover {
background-color: #ffc107;
color: #1a1a2e;
}
/* card body dark mode background */
.card-body {
background-color: var(--bg);
transition: background-color 0.2s ease;
}
/* dropdown menu dark mode background */
.dropdown-menu {
background-color: var(--bg-surface);
transition: background-color 0.2s ease;
}
/* media queries */
@media only screen and (min-width: 1px) {
#library-logo {
max-width: 100%;
max-height: 150px;
}
nav.navbar-light.main-nav-container {
margin-top: -20px;
}
.nav-by-jumbotron {
margin-top: 40px !important;
}
#main-blue-footer {
min-height: 450px;
}
.library-address {
float: left;
}
#cuny-logo {
float: left;
clear: both;
margin-top: 10px;
}
.libapps {
float: left;
clear: left;
}
}
@media only screen and (max-width: 472px) {
#app2 { margin-bottom: 65px; }
#radios > label, #radios > div > label { margin-bottom: -5px; }
}
@media only screen and (max-width: 360px) {
#app2 { margin-bottom: 85px; }
}
@media only screen and (max-width: 992px) {
#advanced {
display: none;
}
}
@media only screen and (max-width: 768px) {
#login-text {
display: none;
}
#radios, #advanced {
margin-top: -8px;
margin-bottom: 50px;
}
#defineYourSearch {
display: none;
}
}
@media only screen and (min-width: 768px) {
#flex-search-form {
margin-bottom: 0;
}
#radios {
margin-top: 8px;
}
.nav-by-jumbotron {
margin-top: 0 !important;
}
#lighthouse-logo {
display: inline-block;
float: left;
}
#main-blue-footer {
min-height: 210px;
}
.library-address {
display: inline-block;
margin: -10px 30px;
font-size: 1.1em;
}
#cuny-logo {
float: right;
clear: none;
margin: -10px 0;
}
.libapps {
float: right;
clear: both;
}
.libapps.whiteahrefs {
margin-top: -10px;
}
}
@media only screen and (min-width: 1px) and (max-width: 992px) {
#hamburger-alternative {
display: none;
}
}
@media only screen and (min-width: 992px) {
#header-div {
text-align: center;
}
#hamburger,
#hamburger-ul {
display: none;
}
#library-logo {
max-width: 100%;
max-height: 350px;
}
}
@media only screen and (min-width: 1200px) {
#library-logo {
margin-top: -3px;
}
}
</style>
<!-- scripts to make the Book a Study Room widget run -->
<script src="https://kbcc-cuny.libcal.com/js/equipment.min.js"></script>
<script>
jQuery(function () {
jQuery("#eq_32886, #bookastudyroom").LibCalEquipmentBooking({
iid: 5570,
gid: 32886,
eid: 0,
width: 560,
height: 680,
});
});
</script>
<!-- FontAwesome -->
<script
src="https://kit.fontawesome.com/4c28f38a07.js"
crossorigin="anonymous"
></script>