Skip to content

Commit

Permalink
Move bootstrap import to css
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Oct 24, 2024
1 parent cb00c86 commit 1a09756
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 228 deletions.
264 changes: 41 additions & 223 deletions app/assets/builds/blacklight.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,100 +5,6 @@
versions of Blacklight change this file. Instead, use your own CSS file
which over-rides things in this file. Or of course you can choose
not to use the Blacklight CSS file at all in your local app. */
.visually-hidden-xs {
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
.visually-hidden-xs:not(caption) {
position: absolute !important;
}

@media (max-width: 575.98px) {
.visually-hidden-sm {
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
.visually-hidden-sm:not(caption) {
position: absolute !important;
}
}

@media (max-width: 767.98px) {
.visually-hidden-md {
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
.visually-hidden-md:not(caption) {
position: absolute !important;
}
}

@media (max-width: 991.98px) {
.visually-hidden-lg {
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
.visually-hidden-lg:not(caption) {
position: absolute !important;
}
}

@media (max-width: 1199.98px) {
.visually-hidden-xl {
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
.visually-hidden-xl:not(caption) {
position: absolute !important;
}
}

@media (max-width: 1399.98px) {
.visually-hidden-xxl {
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
.visually-hidden-xxl:not(caption) {
position: absolute !important;
}
}

/* Warning! If you want to change these, just copy them into your own theme css. But you want to remove the !default, which only will set them if not already set. */
/* for compatability with BS < 5.3 */
:root {
Expand Down Expand Up @@ -239,6 +145,10 @@ main {
cursor: pointer;
}

.no-js .btn-group:focus-within .dropdown-menu {
display: block; /* show menu when tabbing to it, without Javascript */
}

.view-type {
display: inline-block;
}
Expand Down Expand Up @@ -325,7 +235,8 @@ main {
}

.group-key {
border-bottom: 1px solid rgb(62.9310344828, 73, 83.0689655172);
--bl-border-color: var(--bs-gray-600);
border-bottom: 1px solid var(--bl-border-color);
clear: right;
}

Expand All @@ -337,47 +248,44 @@ main {
float: right;
}

label.toggle-bookmark {
font-weight: inherit;
min-width: 8.5em;
.bookmark-toggle {
/* override for line 21.
Creates weird spacing in toolbar when min-width is set to 8rem */
}

div.toggle-bookmark {
cursor: pointer;
}

/* override for line 3.
Creates weird spacing in toolbar when min-width is set to 8rem */
.header-tools label.toggle-bookmark {
min-width: 2rem;
}

.no-js .bookmark-toggle input[type=submit] {
display: inline;
}
.no-js .bookmark-toggle div.toggle-bookmark {
.no-js .bookmark-toggle .toggle-bookmark {
display: none;
}
.bookmark-toggle input[type=submit] {
display: none;
}

.toggle-bookmark .blacklight-icons svg {
.bookmark-toggle .toggle-bookmark {
cursor: pointer;
}
.bookmark-toggle .toggle-bookmark .toggle-bookmark-label {
font-weight: inherit;
min-width: 8.5em;
}
.bookmark-toggle .toggle-bookmark .toggle-bookmark-label .blacklight-icons svg {
height: 1.25rem;
width: 1.25rem;
overflow: visible;
fill: var(--bs-primary);
}
.toggle-bookmark .blacklight-icons svg.bookmark-checked {
.bookmark-toggle .toggle-bookmark .toggle-bookmark-label .blacklight-icons svg.bookmark-checked {
display: none;
}

.toggle-bookmark[type=checkbox]:checked + span svg.bookmark-checked {
.bookmark-toggle .toggle-bookmark .toggle-bookmark-input:checked + span svg.bookmark-checked {
display: inherit;
}
.toggle-bookmark[type=checkbox]:checked + span svg.bookmark-unchecked {
.bookmark-toggle .toggle-bookmark .toggle-bookmark-input:checked + span svg.bookmark-unchecked {
display: none;
}
.bookmark-toggle .header-tools .toggle-bookmark-label {
min-width: 2rem;
}

.dl-invert dt {
font-weight: normal;
Expand Down Expand Up @@ -429,104 +337,12 @@ Creates weird spacing in toolbar when min-width is set to 8rem */
display: inline;
}

@media (max-width: 575.98px) {
.facets-toggleable {
border: var(--bl-facets-smallish-border);
padding: var(--bl-facets-smallish-padding);
margin-bottom: var(--bl-facets-smallish-margin-bottom);
border-radius: var(--bl-facets-smallish-border-radius);
}
}
@media (min-width: 576px) {
.facets-toggleable .facets-collapse {
display: block !important;
width: 100%;
}
.facets-toggleable .navbar-toggler {
display: none;
}
}
@media (max-width: 767.98px) {
.facets-toggleable-sm {
border: var(--bl-facets-smallish-border);
padding: var(--bl-facets-smallish-padding);
margin-bottom: var(--bl-facets-smallish-margin-bottom);
border-radius: var(--bl-facets-smallish-border-radius);
}
}
@media (min-width: 768px) {
.facets-toggleable-sm .facets-collapse {
display: block !important;
width: 100%;
}
.facets-toggleable-sm .navbar-toggler {
display: none;
}
}
@media (max-width: 991.98px) {
.facets-toggleable-md {
border: var(--bl-facets-smallish-border);
padding: var(--bl-facets-smallish-padding);
margin-bottom: var(--bl-facets-smallish-margin-bottom);
border-radius: var(--bl-facets-smallish-border-radius);
}
}
@media (min-width: 992px) {
.facets-toggleable-md .facets-collapse {
display: block !important;
width: 100%;
}
.facets-toggleable-md .navbar-toggler {
display: none;
}
}
@media (max-width: 1199.98px) {
.facets-toggleable-lg {
border: var(--bl-facets-smallish-border);
padding: var(--bl-facets-smallish-padding);
margin-bottom: var(--bl-facets-smallish-margin-bottom);
border-radius: var(--bl-facets-smallish-border-radius);
}
}
@media (min-width: 1200px) {
.facets-toggleable-lg .facets-collapse {
display: block !important;
width: 100%;
}
.facets-toggleable-lg .navbar-toggler {
display: none;
}
}
@media (max-width: 1399.98px) {
.facets-toggleable-xl {
border: var(--bl-facets-smallish-border);
padding: var(--bl-facets-smallish-padding);
margin-bottom: var(--bl-facets-smallish-margin-bottom);
border-radius: var(--bl-facets-smallish-border-radius);
}
}
@media (min-width: 1400px) {
.facets-toggleable-xl .facets-collapse {
display: block !important;
width: 100%;
}
.facets-toggleable-xl .navbar-toggler {
display: none;
}
}
.facets-toggleable-xxl {
.facets-toggleable {
border: var(--bl-facets-smallish-border);
padding: var(--bl-facets-smallish-padding);
margin-bottom: var(--bl-facets-smallish-margin-bottom);
border-radius: var(--bl-facets-smallish-border-radius);
}
.facets-toggleable-xxl .facets-collapse {
display: block !important;
width: 100%;
}
.facets-toggleable-xxl .navbar-toggler {
display: none;
}

@media (max-width: 991.98px) {
.no-js #sidebar {
Expand Down Expand Up @@ -559,10 +375,19 @@ Creates weird spacing in toolbar when min-width is set to 8rem */

.facet-limit {
margin-bottom: var(--bl-facet-margin-bottom);
/* Provide a focus ring on the expand/collapse button */
}
.facet-limit .card-body {
padding: var(--bl-facet-limit-body-padding);
}
.facet-limit .btn {
--bs-btn-focus-shadow-rgb: 50, 50, 50;
}
.facet-limit .btn:focus-visible {
border-color: var(--bs-btn-hover-border-color);
outline: 0;
box-shadow: var(--bs-btn-focus-box-shadow);
}

.facet-limit-active {
border-color: #198754;
Expand All @@ -585,7 +410,7 @@ Creates weird spacing in toolbar when min-width is set to 8rem */
align-items: flex-start;
padding: 3px 0;
}
.facet-values li[role=treeitem] {
.facet-values li.treeitem {
display: block;
}
.facet-values li .selected {
Expand Down Expand Up @@ -636,7 +461,7 @@ Creates weird spacing in toolbar when min-width is set to 8rem */
padding: 1rem;
}

.pivot-facet.show, .no-js .btn-group:focus-within .pivot-facet.dropdown-menu {
.pivot-facet.show {
display: flex;
}

Expand All @@ -649,25 +474,25 @@ Creates weird spacing in toolbar when min-width is set to 8rem */
.pivot-facet .facet-toggle-handle {
margin-inline-start: -1.5rem;
}
.facet-toggle-handle.collapsed .show, .facet-toggle-handle.collapsed .no-js .btn-group:focus-within .dropdown-menu, .no-js .btn-group:focus-within .facet-toggle-handle.collapsed .dropdown-menu {
.facet-toggle-handle.collapsed .show {
display: flex;
}
.facet-toggle-handle.collapsed .hide {
display: none;
}
.facet-toggle-handle .show, .facet-toggle-handle .no-js .btn-group:focus-within .dropdown-menu, .no-js .btn-group:focus-within .facet-toggle-handle .dropdown-menu {
.facet-toggle-handle .show {
display: none;
}
.facet-toggle-handle .hide {
display: flex;
}
.facet-toggle-handle .show .icon, .facet-toggle-handle .no-js .btn-group:focus-within .dropdown-menu .icon, .no-js .btn-group:focus-within .facet-toggle-handle .dropdown-menu .icon,
.facet-toggle-handle .show .icon,
.facet-toggle-handle .hide .icon {
width: 1em;
height: 1em;
padding: 0.375rem 0.75rem;
}
.facet-toggle-handle .show .icon, .facet-toggle-handle .no-js .btn-group:focus-within .dropdown-menu .icon, .no-js .btn-group:focus-within .facet-toggle-handle .dropdown-menu .icon {
.facet-toggle-handle .show .icon {
background: transparent url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-square" viewBox="0 0 16 16"%3e%3cpath d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" /%3e%3cpath d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" /%3e%3c/svg%3e') center/1em auto no-repeat;
}
.facet-toggle-handle .hide .icon {
Expand All @@ -694,7 +519,7 @@ Creates weird spacing in toolbar when min-width is set to 8rem */
}

.modal-content .facet-pagination.top {
display: none;
display: none; /* Doesn't display in a modal, but would display on a new page (e.g. without Javascript) */
}
.modal-content .page-sidebar {
display: none;
Expand All @@ -710,13 +535,6 @@ Creates weird spacing in toolbar when min-width is set to 8rem */
display: none;
}

.btn.btn-icon {
padding: 0.375rem;
}
.btn.btn-icon.btn-sm {
padding: 0.25rem;
}

.remove .bi {
height: 1em;
width: 1em;
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/blacklight/build.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import "bootstrap/scss/functions";
@import "bootstrap/scss/mixins/breakpoints";
@import "bootstrap/scss/mixins/visually-hidden";
@import "bootstrap/scss/variables";
@import "blacklight";
1 change: 0 additions & 1 deletion app/views/layouts/blacklight/base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<%= opensearch_description_tag application_name, opensearch_catalog_url(format: 'xml') %>
<%= favicon_link_tag %>
<%= stylesheet_link_tag "application", media: "all", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" unless defined? Propshaft %>
<% if defined? Importmap %>
<%= javascript_importmap_tags %>
Expand Down
Loading

0 comments on commit 1a09756

Please sign in to comment.