Skip to content

Commit

Permalink
DEV: Refactor blend-primary-secondary() usage in SCSS
Browse files Browse the repository at this point in the history
  • Loading branch information
pmusaraj committed Jul 28, 2020
1 parent cfd3dce commit 81ab62c
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/common/base/discourse.scss
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ table {
animation: rotate-forever 1s infinite linear;
height: 30px;
width: 30px;
border: 4px solid blend-primary-secondary(50%);
border: 4px solid $primary-low-mid;
border-right-color: transparent;
border-radius: 50%;

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/common/base/menu-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
align-items: center;
min-height: 30px;
color: dark-light-choose($primary-medium, $secondary-high);
background: blend-primary-secondary(5%);
background: $blend-primary-secondary-5;
&:hover {
color: $primary;
background: $primary-low;
Expand Down
8 changes: 4 additions & 4 deletions app/assets/stylesheets/common/base/onebox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ aside.onebox {
}

a[href] {
color: dark-light-choose($tertiary, $tertiary);
color: $tertiary;
text-decoration: none;
}

a[href]:visited {
color: dark-light-choose($tertiary, $tertiary);
color: $tertiary;
}

img {
Expand Down Expand Up @@ -304,7 +304,7 @@ aside.onebox {

// Google Calendar Placeholder
.gdocs-onebox-splash {
background-color: blend-primary-secondary(30%);
background-color: $primary-low-mid;
color: $primary;
border: 1px inset $primary;
.gdocs-onebox-logo {
Expand Down Expand Up @@ -351,7 +351,7 @@ pre.onebox code ol {
line-height: $line-height-large;
}
pre.onebox code {
background-color: dark-light-choose(#fff, #000);
background-color: $primary-very-low;
}
pre.onebox code li {
padding-left: 5px;
Expand Down
7 changes: 2 additions & 5 deletions app/assets/stylesheets/common/base/topic-post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,7 @@ blockquote {
position: absolute;
z-index: z("dropdown");
opacity: 0.9;
background-color: dark-light-choose(
blend-primary-secondary(60%),
blend-primary-secondary(30%)
);
background-color: $secondary-high;

&.visible {
display: inline-flex;
Expand Down Expand Up @@ -668,7 +665,7 @@ pre {
display: block;
padding: 0.5em;
color: $primary;
background: blend-primary-secondary(5%);
background: $blend-primary-secondary-5;
max-height: 500px;
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/common/components/badges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
&.new-posts,
&.unread-posts {
background-color: dark-light-choose($tertiary-medium, $tertiary);
color: dark-light-choose($secondary, $secondary);
color: $secondary;
font-weight: dark-light-choose(normal, bold);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@ $love-low: dark-light-diff($love, $secondary, 85%, -60%) !default;

//wiki
$wiki: green !default;

//blended variants
$blend-primary-secondary-5: blend-primary-secondary(5%) !default;
2 changes: 1 addition & 1 deletion app/assets/stylesheets/common/foundation/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ $breakpoints: (
// Stuff we repeat
@mixin post-aside {
border-left: 5px solid $primary-low;
background-color: blend-primary-secondary(5%);
background-color: $blend-primary-secondary-5;
}

// We still need -webkit for latest iPhone and Safari
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

.header-text {
color: dark-light-choose($tertiary, $tertiary);
color: $tertiary;
cursor: pointer;
margin-bottom: 0;
}
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/desktop/topic-post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ pre.copy-codeblocks:hover .copy-cmd {
border: 0;
padding: 0 23px;
color: dark-light-choose($primary-medium, $secondary-high);
background: blend-primary-secondary(5%);
background: $blend-primary-secondary-5;
border-left: 1px solid $primary-low;
border-top: 1px solid transparent;
&:hover {
Expand All @@ -414,7 +414,7 @@ pre.copy-codeblocks:hover .copy-cmd {
}
.link-summary .btn {
color: dark-light-choose($primary-medium, $secondary-high);
background: blend-primary-secondary(5%);
background: $blend-primary-secondary-5;
width: 100%;
&:hover {
color: $primary;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/mobile/topic-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
.category-topic-link td.num .badge-notification {
&.new-posts,
&.unread-posts {
color: dark-light-choose($secondary, $secondary);
color: $secondary;
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/mobile/topic-post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ a.reply-to-tab {
border: 0;
padding: 0 15px;
color: dark-light-choose($primary-medium, $secondary-high);
background: blend-primary-secondary(5%);
background: $blend-primary-secondary-5;
border-left: 1px solid $primary-low;
.fa {
margin: 0;
Expand All @@ -204,7 +204,7 @@ a.reply-to-tab {
}
.link-summary .btn {
color: dark-light-choose($primary-medium, $secondary-high);
background: blend-primary-secondary(5%);
background: $blend-primary-secondary-5;
width: 100%;
}
}
Expand Down

0 comments on commit 81ab62c

Please sign in to comment.