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

Stop compiling bootstrap with SASS #884

Merged
merged 1 commit into from
Dec 8, 2023
Merged
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
5 changes: 0 additions & 5 deletions app/assets/stylesheets/application.sass.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
@import 'deja-vu-font';
@import 'sul-variables';

@import 'bootstrap-variables';
@import 'bootstrap/scss/bootstrap';
@import 'bootstrap-mixins';
@import 'bootstrap-overrides';

@import 'base';
@import 'layout';

@import 'modules/buttons';
@import 'modules/feedback-form';
@import 'modules/license-icons';
@import 'modules/purl-embed-viewer';
Expand Down
7 changes: 6 additions & 1 deletion app/assets/stylesheets/base.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
.su-underline {
text-decoration: none;
border-bottom: 1px dotted $sul-link-color-border;
border-bottom: 1px dotted var(--bs-gray-500);
}

h1 {
font-family: 'dejavu_sansextralight';
font-weight: 300;
letter-spacing: -0.05em;
}

h2 {
font-weight: 300;
}

h3 {
font-weight: 400;
}
1 change: 0 additions & 1 deletion app/assets/stylesheets/bootstrap-mixins.scss

This file was deleted.

28 changes: 28 additions & 0 deletions app/assets/stylesheets/bootstrap-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,33 @@ body {
}

:root {
--bs-font-sans-serif: 'Source Sans 3', 'Arial Unicode MS', Helvetica, sans-serif;
--bs-link-color: #{$sul-link-color}; // Needed for .btn-link
--bs-link-color-rgb: #{$sul-link-color};
--bs-heading-color: var(--bs-gray-dark);
--bs-link-hover-color-rgb: var(--bs-body-color-rgb);
--bs-link-decoration: none;
--bs-primary-rgb: #{$color-cardinal-red};
}

// This can be regenerated by setting $primary and running sass on bootstrap.
.btn-primary {
--bs-btn-color: #ffffff;
--bs-btn-bg: var(--bs-primary-rgb);
--bs-btn-border-color: var(--bs-primary-rgb);
--bs-btn-hover-color: #ffffff;
--bs-btn-hover-bg: #771212;
--bs-btn-hover-border-color: #701111;
--bs-btn-focus-shadow-rgb: 157, 56, 56;
--bs-btn-active-color: #ffffff;
--bs-btn-active-bg: #701111;
--bs-btn-active-border-color: #691010;
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
--bs-btn-disabled-color: #ffffff;
--bs-btn-disabled-bg: #8c1515;
--bs-btn-disabled-border-color: #8c1515;
}

.table {
--bs-table-border-color: var(--bs-gray-500);
}
34 changes: 0 additions & 34 deletions app/assets/stylesheets/bootstrap-variables.scss

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/stylesheets/modules/buttons.scss

This file was deleted.

8 changes: 0 additions & 8 deletions app/assets/stylesheets/modules/top-navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@

}

@include media-breakpoint-down(sm) {
#topnav {
padding-left: 10px;
padding-right: 10px;
width: 100%;
}
}

.sdr-brand {
font-family: 'Source Sans 3';
letter-spacing: normal;
Expand Down
9 changes: 2 additions & 7 deletions app/assets/stylesheets/sul-variables.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
// Colors
$color-black: #000;
$white: #ffffff;
$color-cardinal-red: #8c1515;
$color-cardinal-red: rgb(143, 20, 20);
$color-blackish: #2e2d29;
$color-gray-60: #8a887d;
$color-pantone-401: #b6b1a9;
$color-beige-40: #d5d0c0;
$color-beige-10: #f2f1eb;
$color-beige-05: #fbfbf9;

$sul-footer-bg-color: $color-beige-10;
$sul-topnavbar-link-color: $color-cardinal-red;
$sul-link-color: #006CB8;
$sul-link-color-border: $color-pantone-401;
$sul-body-bg: $color-beige-05;
$sul-link-color: rgb(0, 108, 184); // #006CB8;
$sul-text-color: $color-black;
$sul-shadow-color: rgba(0, 0, 0, .2);
2 changes: 2 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<%= stylesheet_link_tag "https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400&display=swap" %>
<link rel="preload" href="<%= asset_path('DejaVuSans-ExtraLight-webfont.woff') %>" as="font" type="font/woff">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<link href="https://www-media.stanford.edu/su-identity/css/su-identity.css" rel="stylesheet">
<%= javascript_importmap_tags %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_top_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= image_tag "sul-logo.svg", class: "d-none d-sm-block", alt: "", height: 25 %>
<%= image_tag "sul-logo-stacked.svg", class: "d-block d-sm-none", alt: "", height: 25 %>
<% end %>
<div class="header-links">
<div class="header-links me-3">
<%= link_to '#feedback-form', class: 'first', data: { bs_toggle: 'collapse', bs_target: '#feedback-form' } do %>
Feedback
<% end if show_feedback_form? %>
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"dependencies": {
"bootstrap": "^5.2.2",
"sass": "^1.57.1"
},
"scripts": {
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ binary-extensions@^2.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==

bootstrap@^5.2.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.2.tgz#97226583f27aae93b2b28ab23f4c114757ff16ae"
integrity sha512-D32nmNWiQHo94BKHLmOrdjlL05q1c8oxbtBphQFb9Z5to6eGRDCm0QgeaZ4zFBHzfg2++rqa2JkqCcxDy0sH0g==

braces@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
Expand Down