Skip to content

Commit

Permalink
refactor(buttons): fix hover/focus bg, use css vars over rules
Browse files Browse the repository at this point in the history
  • Loading branch information
machikoyasuda committed Nov 25, 2024
1 parent 24d6322 commit 4e3fd9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion benefits/core/templates/core/includes/lang-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% get_language_info for code as langinfo %}
<input name="next" type="hidden" value="{{ redirect_to }}" />
<input name="language" type="hidden" value="{{ code }}" />
<button class="btn btn-lg btn-outline-light" type="submit">{{ langinfo.name_local | capfirst }}</button>
<button class="btn btn-outline-light" type="submit">{{ langinfo.name_local | capfirst }}</button>
</form>
{% endif %}
{% endfor %}
16 changes: 9 additions & 7 deletions benefits/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,9 @@ h4 {

/* Language button */
#header-container .btn-outline-light {
font-size: var(--bs-body-font-size);
padding: 3.5px 29.01px; /* 126 x 38px, all screen sizes */
--bs-btn-font-size: var(--bs-body-font-size);
--bs-btn-padding-y: 3.5px;
--bs-btn-padding-x: 29.01px;
}

/* Main */
Expand Down Expand Up @@ -323,6 +324,7 @@ footer .footer-links li a.footer-link:visited {
.btn,
.btn-lg {
--bs-btn-border-radius: var(--border-radius);
--bs-btn-hover-bg: #ffffff;
}

.btn.btn-lg.btn-primary {
Expand All @@ -348,10 +350,10 @@ footer .footer-links li a.footer-link:visited {
.btn-outline-dark:focus,
.btn-outline-dark:focus-visible,
.btn-outline-light:focus,
.btn-ouline-dark:focus-visible {
outline: 3px solid var(--focus-color) !important;
outline-offset: 2px !important;
box-shadow: none !important; /* override CA State Web Template */
.btn-ouline-light:focus-visible {
outline: 3px solid var(--focus-color);
outline-offset: 2px;
box-shadow: none;
}

.btn-text {
Expand All @@ -363,7 +365,7 @@ footer .footer-links li a.footer-link:visited {
/* Previous Button, Language Button */
.btn-outline-dark,
.btn-outline-light {
border-width: 2px;
--bs-btn-border-width: 2px;
}

/* Custom button: Loading spinner */
Expand Down

0 comments on commit 4e3fd9f

Please sign in to comment.