Skip to content

Commit

Permalink
Simplify SCSS variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne authored and thatbudakguy committed Jan 31, 2025
1 parent 5a10851 commit f1c5bb1
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 49 deletions.
10 changes: 6 additions & 4 deletions app/assets/stylesheets/common.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
// All classes should be scoped within the .sul-embed-container
@import "palette";
@import "sul_variables";
@import "modules/buttons";
@import "modules/popup_panels";
@import "modules/utility";

$color-pantone-401: #b6b1a9;
$sul-link-border-color: $color-pantone-401;

body {
margin: 0;
padding: 0;
}

.sul-embed-container {
background: $white-color;
border: 1px solid $color-pantone-405;
border: 1px solid $sul-border-color;
box-sizing: border-box;
color: $sul-font-color;
color: black;
display: flex;
flex-direction: column;
font-family: "Source Sans Pro", "Arial Unicode MS", Helvetica, sans-serif;
Expand Down Expand Up @@ -100,7 +102,7 @@ body {
}

.sul-embed-download-count {
background-color: $btn-default-bg;
background-color: white;
border-radius: 16px;
color: $color-pantone-405;
display: inline-block;
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/file.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "common";
$color-beige-10: #f2f1eb;

body {
overflow-y: hidden;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/modules/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
}

.btn-toolbar {
--bs-btn-color: #{$sul-button-color};
--bs-btn-bg: #{$sul-button-bg};
--bs-btn-color: white;
--bs-btn-bg: #{$sul-border-color};
--bs-btn-border-color: transparent;
--bs-btn-hover-bg: #433e38;
--bs-btn-hover-border-color: transparent;
Expand Down
22 changes: 8 additions & 14 deletions app/assets/stylesheets/modules/utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,25 @@
// https://github.com/twbs/bootstrap-sass/blob/d5625c907168b6311be122b99d89614e02448475/assets/stylesheets/bootstrap/_close.scss

.sul-embed-close {
background: transparent;
border: 0;
color: black;
cursor: pointer;
float: right;
font-size: ($font-size-base * 1.5);
font-weight: $close-font-weight;
font-weight: bold;
line-height: 1;
color: $close-color;
text-shadow: $close-text-shadow;
text-shadow: 0 1px 0 #fff;
opacity: 0.2;
padding: 0;
-webkit-appearance: none;

&:hover,
&:focus {
color: $close-color;
text-decoration: none;
cursor: pointer;
opacity: 0.5;
}

// [converter] extracted button& to button.close
}

button.sul-embed-close {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}

// https://github.com/twbs/bootstrap-sass/blob/d5625c907168b6311be122b99d89614e02448475/assets/stylesheets/bootstrap/_scaffolding.scss
Expand Down
20 changes: 0 additions & 20 deletions app/assets/stylesheets/palette.scss

This file was deleted.

12 changes: 4 additions & 8 deletions app/assets/stylesheets/sul_variables.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
// Colors
$color-cardinal-red: #8c1515;
$color-fog-light: #f4f4f4;
$color-beige-05: #fbfbf9;
$color-pantone-405: #5f574f;
$gray-80-percent: #ccc;
$gray-54-percent: #737373;
$white-color: #fff;

// Bootstrap needed (for mixins)
$btn-default-bg: #fff;
$close-color: #000;
$close-font-weight: bold;
$close-text-shadow: 0 1px 0 #fff;
$font-size-base: 14px;

$sul-border-color: $color-pantone-405;
$sul-button-bg: $sul-border-color;
$sul-button-color: white;
$sul-font-color: black;
$sul-input-border: $gray-80-percent;
$sul-title-size: floor(($font-size-base * 1.29));
$sul-header-weight: 300;
$sul-link-border-color: $color-pantone-401;
$sul-link-color: #006cb8;
$sul-link-hover-color: #00548f;
$sul-metadata-bg: $color-beige-05;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/was_seed.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @import 'sul_variables';
@import "common";
$color-beige-30: #e3dfd5;

.sul-embed-was-seed-content {
padding: 10px;
Expand Down

0 comments on commit f1c5bb1

Please sign in to comment.