Skip to content

Commit

Permalink
fix: add primary, secondary variation against white variables
Browse files Browse the repository at this point in the history
  • Loading branch information
laurelfulford committed Jan 22, 2024
1 parent b21d3de commit 675609b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions newspack-theme/inc/color-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ function newspack_custom_colors_css() {
--newspack-theme-color-primary-against-white: ' . esc_attr( newspack_color_with_contrast( $colors['primary'] ) ) . ';
--newspack-theme-color-secondary-against-white: ' . esc_attr( newspack_color_with_contrast( $colors['secondary'] ) ) . ';
--newspack-theme-color-primary-variation-against-white: ' . esc_attr( newspack_color_with_contrast( newspack_adjust_brightness( $colors['primary'], -30 ) ) ) . ';
--newspack-theme-color-secondary-variation-against-white: ' . esc_attr( newspack_color_with_contrast( newspack_adjust_brightness( $colors['secondary'], -40 ) ) ) . ';
--newspack-theme-color-against-primary: ' . esc_attr( $colors['primary_contrast'] ) . ';
--newspack-theme-color-against-secondary: ' . esc_attr( $colors['secondary_contrast'] ) . ';
';
Expand Down
2 changes: 1 addition & 1 deletion newspack-theme/sass/site/primary/_posts-and-pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ amp-script .cat-links {
}

&:hover {
color: var( --newspack-theme-color-primary-variation );
color: var( --newspack-theme-color-primary-variation-against-white );
}
}
}
Expand Down

0 comments on commit 675609b

Please sign in to comment.