Skip to content

Commit

Permalink
Prune away unnecessary sass
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jun 5, 2024
1 parent 3a16d8f commit ffd2f37
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 119 deletions.
45 changes: 25 additions & 20 deletions app/assets/stylesheets/application.sass.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
// Entry point for your Sass build

@import 'palette';
@import 'bootstrapVariables';
@import 'bootstrap/scss/bootstrap';
@import "palette";
@import "bootstrapVariables";
@import "bootstrap/scss/bootstrap";

$logo-image: url(StanfordLibraries-logo-whitetext.svg);
$logo-width: 200px;
$logo-height: 35px;

$link-light-color: $stanford-white;
$link-dark-color: $stanford-digital-blue;
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap");
$font-family-serif: "Source Serif 4", serif;
:root {
--bs-border-radius: 0;
--bs-font-sans-serif: "Source Sans 3", "Source Sans Pro", "Helvetica Neue",
Helvetica, Arial, sans-serif;
--bs-link-color-rgb: var(--sul-link-color-rgb);
--bs-link-decoration: none;
--bs-link-hover-decoration: underline;

@import 'blacklight-frontend/app/assets/stylesheets/blacklight/blacklight';
@import 'arclight/app/assets/stylesheets/arclight/application';
@import 'stanfordStripe';
@import 'sulBase';
@import 'featuredItemTeasers';
@import 'sulHeader';
@import 'sulLanding';
@import 'sulCollection';
@import 'sulFooter';
@import 'sulFacets';
@import 'cards';
--sul-link-color-rgb: 0, 108, 184; /* Digital blue #006CB8; */
--stanford-black: #2e2d29; // "100% black" in Stanford brand identity
}
@import "blacklight-frontend/app/assets/stylesheets/blacklight/blacklight";
@import "arclight/app/assets/stylesheets/arclight/application";
@import "stanfordStripe";
@import "sulBase";
@import "featuredItemTeasers";
@import "sulHeader";
@import "sulLanding";
@import "sulCollection";
@import "sulFooter";
@import "sulFacets";
@import "cards";
16 changes: 0 additions & 16 deletions app/assets/stylesheets/bootstrapVariables.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
// This file overrides variables set by Bootstrap (see https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss)

// Colors
$primary: $stanford-cardinal;
$danger: $stanford-digital-red;
$info: $stanford-digital-blue;
$success: $stanford-fog;
$dark: $stanford-palo-alto-dark;
$secondary: $stanford-palo-alto-dark;

// Components
$border-radius: 0;

// Typography
$headings-color: $stanford-white;

// Fonts
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap");
$font-family-base: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;

// Navbar
$navbar-padding-y: 0;
$navbar-dark-color: white;
$navbar-background-color: $stanford-black;
$nav-link-padding-y: 0.3rem;
24 changes: 11 additions & 13 deletions app/assets/stylesheets/cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
padding-right: 20px;
border: none;

a.btn {
color: $link-light-color;
}

.card-img-top,
.card-body {
width: 100%;
Expand All @@ -36,26 +32,28 @@
}
}

ul {
padding-left: 1.25rem;
}

li::marker {
color: $link-dark-color;
}

h2 {
font-size: calc(1.3rem + 0.6vw);
@include media-breakpoint-up(xxl) {
font-size: 1.75rem;
}
}

h2, h3 {
h2,
h3 {
font-weight: bold;
}
}

.blacklight-landing_page {
ul.locations {
padding-left: 1.25rem;
li::marker {
color: $stanford-digital-blue;
}
}
}

.blacklight-landing_page .card-container,
.al-repositories .card-container {
// this centers the cards if there are less than 3 in a row
Expand Down
21 changes: 5 additions & 16 deletions app/assets/stylesheets/palette.scss
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
// https://identity.stanford.edu/design-elements/color/primary-colors/
$stanford-cardinal: #8c1515;
$stanford-cool-grey: #53565a; // used in SDR header (not yet added)
$stanford-black: #2e2d29; // "100% black" in Stanford brand identity
$tapa: #767674; // "60% black" in Stanford brand identity
$silver-sand: #c0c0bf; // "30% black" in Stanford brand identity
$stanford-black-20: #d5d5d4; // "20% black" in Stanford brand identity
$stanford-white: #ffffff;
$whisper: #eaeaea; // "10% black" in Stanford brand identity, used as modal bg color

// https://identity.stanford.edu/design-elements/color/web/
$stanford-digital-blue: #006cb8;
$stanford-digital-blue-dark: #00548f;
$stanford-digital-green: #008566;
$stanford-digital-red: #b1040e;

// https://identity.stanford.edu/design-elements/color/accent-colors/
$stanford-fog: #dad7cb;
$stanford-fog-light: #f4f4f4;
$stanford-illuminating: #FEDD5C;
$stanford-illuminating-dark: #FEC51D;
$stanford-palo-alto-light: #2D716F;
$stanford-illuminating: #fedd5c;
$stanford-palo-alto-light: #2d716f;
$stanford-palo-alto-dark: #014240;
$stanford-stone: #7F7776;
$stanford-stone-light: #D4D1D1;
$stanford-stone: #7f7776;
$stanford-stone-light: #d4d1d1;

// Non-Stanford identity colors
$cyan-blue-light: #f8f9fa;
$gray-light: #fafafa;
$green-white: #EBF5F1;
$green-white: #ebf5f1;
:root {
--grey-lighter: #ededed;
}
6 changes: 3 additions & 3 deletions app/assets/stylesheets/stanfordStripe.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Stanford Stripe
$stanford-stripe-color: $stanford-black;

.su-brand-bar {
width: 100%;
height: 30px;
}

.su-brand-bar__logo {
color: $stanford-stripe-color;
--stanford-stripe-color: var(--stanford-black);
color: var(--stanford-stripe-color);
display: inline-block;
font-size: 1rem;
font-family: $font-family-serif;
Expand All @@ -20,7 +20,7 @@ $stanford-stripe-color: $stanford-black;
&:hover,
&:active,
&:focus {
color: $stanford-stripe-color;
color: var(--stanford-stripe-color);
text-decoration: none;
}
}
21 changes: 7 additions & 14 deletions app/assets/stylesheets/sulBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,22 @@ body {
--bs-heading-color: $primary;
}

@mixin sulLinkStyle {
text-decoration: none;
color: $link-dark-color;
a {
text-decoration: var(--bs-link-decoration);
font-weight: 450;

&:hover,
&:focus-visible {
color: $link-dark-color;
text-decoration: underline;
text-decoration: var(--bs-link-hover-decoration);
}
}

a {
@include sulLinkStyle;
}

.form-control:focus {
border-color: $link-dark-color;
box-shadow: 0 0 0 0.25rem rgba($link-dark-color, 0.25);
border-color: $stanford-digital-blue;
box-shadow: 0 0 0 0.25rem rgba($stanford-digital-blue, 0.25);
}

.bg-dark a {
color: $link-light-color;
--bs-link-color-rgb: 255, 255, 255;
}

.warning-icon svg {
Expand All @@ -41,4 +34,4 @@ a {
.btn-close:focus {
box-shadow: none;
}
}
}
15 changes: 7 additions & 8 deletions app/assets/stylesheets/sulFacets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

#facet-date_range {
// Hide some features that don't work or we don't want
.distribution, .more_facets, .facet-values.missing, .facet-count {
.distribution,
.more_facets,
.facet-values.missing,
.facet-count {
display: none;
}
p.range.subsection {
Expand All @@ -24,15 +27,15 @@
// many of these properties are !important in Blacklight Core, so it's needed here to override
.facet-limit-active {
border-color: black !important;

.card-header {
background-color: #D4d1d1 !important;
background-color: #d4d1d1 !important;
}
}

.facet-values li .selected {
color: black !important;
font-weight: bold;;
font-weight: bold;
}

.facets .card {
Expand All @@ -44,7 +47,3 @@
.applied-filter .filter-name:after {
color: black;
}

.facet-pagination a.btn-link {
@include sulLinkStyle;
}
10 changes: 4 additions & 6 deletions app/assets/stylesheets/sulFooter.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
$brand-color: $stanford-cardinal !default;
$footer-color: $white !default;
$pre-footer-background: $stanford-black !default;


footer a {
color: $link-light-color;
--bs-link-color-rgb: 255, 255, 255;
}

#pre-footer {
background-color: $pre-footer-background;
background-color: var(--stanford-black);
}

.su-logo {
Expand All @@ -24,7 +22,7 @@ footer a {

.su-logo-university {
font-size: 1.5rem;
padding-left: .5rem;
padding-left: 0.5rem;
}

#su-footer {
Expand All @@ -49,4 +47,4 @@ footer a {
font-size: 0.9375rem;
}
}
}
}
27 changes: 16 additions & 11 deletions app/assets/stylesheets/sulHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ $masthead-color: $stanford-white;
.navbar {
--bs-navbar-hover-color: rgba(255, 255, 255, 1);
padding-top: 0.75rem;
padding-bottom: 0;
}

.navbar-logo {
height: 41px;
width: 258px;
background-size: 258px 41px;
background: transparent no-repeat url(StanfordLibraries-logo-whitetext.svg) 0
0 / 258px auto;
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
}

header .topbar > .container,
Expand Down Expand Up @@ -62,12 +67,15 @@ header .topbar > .container-fluid {
}

.navbar-nav {
--bs-nav-link-padding-y: 0.3rem;
list-style-type: none;
padding-left: 0;
margin-right: 0.5rem;

// This overrides Arclight. We can use --al-mastead-active-link-color once
// https://github.com/projectblacklight/arclight/pull/1539 is released
li.active a {
color: $navbar-dark-color;
color: var(--bs-nav-link-color);
}

li {
Expand All @@ -90,7 +98,7 @@ header .topbar > .container-fluid {

.input-group {
.search-btn {
background-color: $navbar-dark-color;
background-color: white;
border-color: #dee2e6; // Border color of Blacklight inputs
border-left: none;
padding: 0;
Expand All @@ -108,24 +116,24 @@ header .topbar > .container-fluid {
}

> .search-autocomplete-wrapper ul li:active {
color: $stanford-black;
color: var(--stanford-black);
background-color: var(--grey-lighter);
}
}

.al-masthead ~ .navbar-search {
border-top: none;
background-color: $navbar-background-color;
background-color: var(--stanford-black);
margin-bottom: 0;

search {
width: 100%;
}

.input-group-text {
background-color: $navbar-background-color;
border: none;
color: $navbar-dark-color;
--bs-body-color: white;
--bs-tertiary-bg: var(--stanford-black);
--bs-border-width: none;
font-weight: 700;
padding-top: 0.25rem;
padding-bottom: 0.25rem;
Expand Down Expand Up @@ -172,7 +180,4 @@ header .topbar > .container-fluid {
// but no combination of official interactive colors
// meet accessibility contrast requirements on this background.
color: #000;
a {
color: #0065ad;
}
}
Loading

0 comments on commit ffd2f37

Please sign in to comment.