Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap 4 #1888

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem 'sqlite3'
gem 'puma', '~> 6.0'
gem 'bootsnap'
# Use bootstrap_form for easy form building
gem 'bootstrap_form', '< 4' # pin to < 4 since we are not on bootstrap 4
gem 'bootstrap_form', '~> 4.5'
# A gem for simple rails environment specific config
gem 'config'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
Expand Down
6 changes: 4 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ GEM
bindex (0.8.1)
bootsnap (1.16.0)
msgpack (~> 1.2)
bootstrap_form (2.7.0)
bootstrap_form (4.5.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
borrow_direct (1.2.0)
httpclient (~> 2.4)
builder (3.2.4)
Expand Down Expand Up @@ -465,7 +467,7 @@ PLATFORMS

DEPENDENCIES
bootsnap
bootstrap_form (< 4)
bootstrap_form (~> 4.5)
borrow_direct
cancancan
capistrano (~> 3.0)
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.sass.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import 'palette';
@import 'variables';
@import "bootstrap-icons/font/bootstrap-icons";
@import 'bootstrap-sass/assets/stylesheets/bootstrap';
@import 'bootstrap/scss/bootstrap';
@import 'sul-requests-mixins';
@import 'sul-requests';

Expand Down
109 changes: 102 additions & 7 deletions app/assets/stylesheets/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,106 @@ dt {
font-weight: normal;
}

button:focus,
embed:focus,
input:focus,
object:focus,
select:focus,
textarea:focus {
@include tab-focus;

h1 {
color: $sul-h1-font-color;
letter-spacing: -0.05em;
padding-bottom: 0;
}

h2 {
color: $sul-h2-font-color;
}

dt {
color: $gray-41-percent;
font-size: 0.9em;
padding-top: 0.15em;
text-transform: uppercase !important;
}

dd {
margin-bottom: 0.5em;
max-width: 45em;
}

.col-form-label {
text-align: right;
}

@media (min-width: 768px) {
.dl-horizontal dt {
float: left;
width: 160px;
clear: left;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dl-horizontal dd {
margin-left: 180px;
}
}

.dl-horizontal dd:before,
.dl-horizontal dd:after, {
display: table;
content: " ";
}

.dl-horizontal dd:after {
clear: both;
}

.table th {
border-top: 0 !important;
}

.well {
@extend .card;
background-color: $gray-100;
padding: $spacer;
}

.help-block {
@extend .form-text;
@extend .text-muted;
}

p.form-control-static {
margin-bottom: 0;
padding-top: 7px;
padding-bottom: 7px;
}

.input-like-text {
padding-top: 7px;
padding-bottom: 7px;
}

.alert p:last-child {
@extend .mb-0;
}

.alert .form-group {
margin-bottom: 0;
}

#copyright-restrictions {
.card-title {
margin-bottom: 0;
}
.card-body {
padding-top: 0;
}
}

#header-navbar {
.navbar-brand {
display: none;
}

padding-bottom: 5px;
padding-top: 5px;
}
8 changes: 5 additions & 3 deletions app/assets/stylesheets/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,25 @@
#topnav,
#main-container,
#sul-footer {
width: 750px;
max-width: 750px;
padding-left: 0;
padding-right: 0;
}
}

@media (min-width: 980px) {
#topnav,
#main-container,
#sul-footer {
width: 970px;
max-width: 970px;
}
}

@media (min-width: 1200px) {
#topnav,
#main-container,
#sul-footer {
width: 1170px;
max-width: 1170px;
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/modules/aeon-overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
}
}

// above $screen-md-min, .aeon-overlay's parent div switches to a float-based stacked grid layout per Bootstrap 3
// above md .aeon-overlay's parent div switches to a float-based stacked grid layout per Bootstrap 3
// this top spacing fixes a resulting overlap with the header's box shadow
@media (min-width: $screen-md-min) {
@media (min-width: breakpoint-min(md)) {
.aeon-overlay {
top: 10px;
}
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/modules/breadcrumb-pills.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
padding: 4px;

.pill-addon {
@extend .pull-right;
@extend .float-right;
border-left: 2px solid $breadcrumb-pill-border-color;
margin-left: 10px;
padding: 0 5px;
}
}
}
22 changes: 15 additions & 7 deletions app/assets/stylesheets/modules/forms.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.form-group {
@extend .row;
h3 {
margin-top: 0;
}
}

.destination-note-callout {
color: $text-color;
color: $body-color;
}

// This ensures that the login options toggle is viewed
Expand All @@ -24,7 +25,7 @@ hr {
}

.input-like-text {
padding-top: 7px;
// padding-top: 7px;
}

.or-divider {
Expand All @@ -37,9 +38,9 @@ hr {
}

.required:not([for='request_destination']) {
&::after {
@extend .label;
@extend .label-warning;
&:after {
@extend .badge;
@extend .badge-warning;
content: 'Required';
display: inline-block;
margin-left: 5px;
Expand All @@ -48,7 +49,7 @@ hr {

.hold-recall {
label {
&[for="request_needed_date"]::after {
&[for="request_needed_date"]:after {
display: none;
}
}
Expand Down Expand Up @@ -101,6 +102,13 @@ hr {
}
}

// This is done because the html5 shim uses an element with the .help-block class
// to display error messages. When a successful date is chosen the shim will remove
// elements with a .help-block class which removes our note.
.needed-date-help-block {
@extend .help-block;
}

.no-js .go-back-link {
display: none;
}
Expand All @@ -112,4 +120,4 @@ hr {
.suid-prefix {
font-weight: bold;
letter-spacing: 0.1em;
}
}
11 changes: 2 additions & 9 deletions app/assets/stylesheets/modules/item-selector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@
}

.sort {
line-height: $line-height-computed;
line-height: $line-height-base;

i {
font-size: $font-size-tiny;
line-height: $line-height-computed;
line-height: $line-height-base;
margin-left: 15px;
}

&.asc,
&.desc {
background-color: darken($btn-default-bg, 10%);
border-color: darken($btn-default-border, 12%);
color: $btn-default-color;
}
}

Expand Down Expand Up @@ -61,17 +58,13 @@
}

.barcode-checkbox {
background-color: $btn-default-bg;
border-color: $btn-default-border;
border-radius: 0;
border-top: 0;
color: $btn-default-color;
vertical-align: top;
}

.list .input-group:first-child {
.barcode-checkbox {
border-top: 1px solid $btn-default-border;
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/modules/messages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
display: inline-block;
}

@media screen and (max-width: $screen-xs-max) {
@media screen and (max-width: breakpoint-min(sm)) {
.start-at,
.end-at {
display: block;
}

.control-label {
.col-form-label {
width: 14ch;
}
}
Expand Down
8 changes: 4 additions & 4 deletions app/assets/stylesheets/modules/scan-or-deliver.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
}

.panel-danger {
.panel-heading {
.card-header {
border-bottom: 0;
font-size: 1.3em;
}

.panel-body {
background: $panel-danger-bg;
.card-header, .card-body {
background: lighten($panel-danger-bg, 60);
}

.panel-title {
.card-title {
font-weight: 500;
}
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/modules/success.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.success-page {

.request-info {
color: $gray-base;
color: $body-color;

h2 {
color: inherit;
Expand Down
Loading