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 c86b6a5 commit 50019c9
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 86 deletions.
40 changes: 21 additions & 19 deletions app/assets/stylesheets/application.sass.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
// Entry point for your Sass build

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

$logo-image: url(StanfordLibraries-logo-whitetext.svg);
$logo-width: 200px;
$logo-height: 35px;
@import "palette";
@import "bootstrapVariables";
@import "bootstrap/scss/bootstrap";

$link-light-color: $stanford-white;
$link-dark-color: $stanford-digital-blue;
@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;

@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';
:root {
--bs-border-radius: 0;
--sul-link-color-rgb: 0, 108, 184; /* Digital blue #006CB8; */
--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";
15 changes: 2 additions & 13 deletions app/assets/stylesheets/bootstrapVariables.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
// 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;
$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;
7 changes: 2 additions & 5 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 Down Expand Up @@ -51,7 +47,8 @@
}
}

h2, h3 {
h2,
h3 {
font-weight: bold;
}
}
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;
}
17 changes: 5 additions & 12 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);
}

.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;
}
7 changes: 3 additions & 4 deletions app/assets/stylesheets/sulFooter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ $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 {
Expand All @@ -24,7 +23,7 @@ footer a {

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

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

.navbar-logo {
Expand All @@ -20,7 +21,7 @@ header .topbar > .container-fluid {
// The feedback form is hidden, using inline style, to prevent it from being shown during slow page loads.
display: block !important;
overflow: hidden;
transition: all .5s ease-in-out;
transition: all 0.5s ease-in-out;
max-height: 0;
background-color: white;

Expand All @@ -36,12 +37,12 @@ header .topbar > .container-fluid {
a {
color: $stanford-digital-blue;
}
}
}

#main-flashes {
#main-flashes {
// contain the width of the flashes to Bootstrap's container width
@extend .container;
}
}

.al-masthead {
color: $masthead-color;
Expand All @@ -62,6 +63,7 @@ header .topbar > .container-fluid {
}

.navbar-nav {
--bs-nav-link-padding-y: 0.3rem;
list-style-type: none;
padding-left: 0;
margin-right: 0.5rem;
Expand All @@ -80,7 +82,7 @@ header .topbar > .container-fluid {
}

li:not(:first-child)::before {
content: '';
content: "";
position: absolute;
left: -1.165rem;
top: 0.25rem;
Expand Down Expand Up @@ -115,11 +117,11 @@ header .topbar > .container-fluid {

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

.input-group-text {
background-color: $navbar-background-color;
background-color: $stanford-black;
border: none;
color: $navbar-dark-color;
font-weight: 700;
Expand Down Expand Up @@ -158,7 +160,7 @@ header .topbar > .container-fluid {
}

#search_field {
margin-right: .825rem;
margin-right: 0.825rem;
}
}

Expand All @@ -169,6 +171,6 @@ header .topbar > .container-fluid {
// meet accessibility contrast requirements on this background.
color: #000;
a {
color: #0065AD;
color: #0065ad;
}
}

0 comments on commit 50019c9

Please sign in to comment.