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

GH-2105: Sync button hover states in the hub #607

Merged
merged 4 commits into from Sep 25, 2020
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Next

Add and use mixin for button hover backgrounds in the hub

  • Loading branch information
benstrumeyer committed Sep 22, 2020
commit 4237441c1fc9c03958781142081f292765142b11
@@ -16,14 +16,9 @@
padding-top: 45px;
padding-bottom: 25px;
color: $tundora;
// Foundation Overrides
.button {
&:not(.hollow):hover {
background-color: #0078CA;
}
&.hollow:hover {
color: #0078CA;
border-color: #0078CA;
}
@include button-hover-color-for($ghosty-blue-alt);
}
}
.HomeView--bolded {
@@ -67,6 +67,10 @@
}
.SetupDone__featureButton {
margin: 20px 10px 10px;
// Foundation Overrides
&.button {
@include button-hover-color-for($ghosty-blue);
}
}
@media only screen and (max-width: 840px) {
.SetupDone__featureList {
@@ -89,7 +89,7 @@ const basicCard = () => (
<div className="price">
<p className="price-blue-alt font-size-36">{t('hub_upgrade_plan_free')}</p>
</div>
<NavLink className="button already-protected" to="/home" title="Already Protected">
<NavLink className="button primary already-protected" to="/home" title="Already Protected">
{t('hub_upgrade_already_protected')}
</NavLink>
<p className="card-sub-header"><strong>{t('hub_upgrade_basic_protection')}</strong></p>
@@ -405,7 +405,7 @@ const UpgradePlanView = (props) => {
<tr>
<td />
<td className="default">
<NavLink className="button already-protected" to="/home" title="Already Protected">
<NavLink className="button primary already-protected" to="/home" title="Already Protected">
{t('hub_upgrade_already_protected')}
</NavLink>
</td>
@@ -487,7 +487,7 @@ const UpgradePlanView = (props) => {
<div className="row align-center footer-buttons">
<div className="small-12 text-center columns">
<span className="col-free">
<NavLink className="button already-protected" to="/home" title="Already Protected">
<NavLink className="button primary already-protected" to="/home" title="Already Protected">
{t('hub_upgrade_already_protected')}
</NavLink>
</span>
@@ -381,6 +381,10 @@ section.home-template .section.section-pricing {
text-transform: none;
height: 38px;
line-height: 22px;
// Foundation Overrides
&.primary {
@include button-hover-color-for($price-blue);
}
&.already-protected {
@include breakpoint($medium-large-breakpoint down) {
margin-top: 45px;
@@ -550,10 +554,11 @@ section.home-template .section.section-pricing {
text-transform: none;
white-space: nowrap;
font-family: 'Open Sans';
background-color: $price-blue;
font-weight: 600;
&:hover {
background-color: $price-blue-hover;
background-color: $price-blue;
// Foundation Overrides
&.primary {
@include button-hover-color-for($price-blue);
}
}

@@ -17,3 +17,25 @@
-o-transition: $transitions;
transition: $transitions;
}

// Takes in the original button color ($ghosty-blue, $ghosty-blue-alt, $secondary, etc...) and sets a button hover color
@mixin button-hover-color-for($button-color) {
@if $button-color == #1dafed or $button-color == #00AEF0 {
&:not(.hollow):hover {
background-color: #0078CA;
}
&.hollow:hover, &.hollow:focus {
border-color: #0078CA;
color: #0078CA;
}
} @else {
&:not(.hollow):hover, &:not(.hollow):focus {
background-color: scale-color($button-color, $lightness: -15%);
color: scale-color($button-color, $lightness: -15%);
}
&:hover, &:focus {
border-color: scale-color($button-color, $lightness: -15%);
color: scale-color($button-color, $lightness: -15%);
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.