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

Simplify SCSS variables #2317

Merged
merged 1 commit into from
Jan 31, 2025
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
10 changes: 6 additions & 4 deletions app/assets/stylesheets/common.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
// All classes should be scoped within the .sul-embed-container
@import "palette";
@import "sul_variables";
@import "modules/buttons";
@import "modules/popup_panels";
@import "modules/shadows";
@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 @@ -101,7 +103,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