Skip to content

Commit

Permalink
Merge pull request #123 from moderntribe/feature/MOOSE-51/color-props
Browse files Browse the repository at this point in the history
[MOOSE-51]: Color Names
  • Loading branch information
Vinsanity authored Feb 16, 2024
2 parents e698cde + c3c0789 commit 45660c3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
6 changes: 3 additions & 3 deletions wp-content/themes/core/assets/pcss/actions/_variables.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body {
* ----------------------------------------------------------------------- */

--themed-link-text-color: var(--color-black);
--themed-link-hover-text-color: var(--color-brand-primary);
--themed-link-hover-text-color: var(--color-royal-blue);
}

/* -------------------------------------------------------------------------
Expand All @@ -26,7 +26,7 @@ body {
*
* ------------------------------------------------------------------------- */

.has-brand-secondary-background-color {
.has-jacksons-purple-background-color {
--themed-link-text-color: var(--color-white);
--themed-link-hover-text-color: var(--color-brand-primary);
--themed-link-hover-text-color: var(--color-royal-blue);
}
14 changes: 6 additions & 8 deletions wp-content/themes/core/assets/pcss/color/_variables.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
body {

/* -----------------------------------------------------------------------
* Brand Colors
* Brand Colors:
* When assigning brand colors, please use color names rather than primary
* or secondary, etc.
* Color Naming Site: https://chir.ag/projects/name-that-color/
* ----------------------------------------------------------------------- */

--color-brand-primary: var(--wp--preset--color--brand-primary);

/* -----------------------------------------------------------------------
* Brand: Secondary
* ----------------------------------------------------------------------- */

--color-brand-secondary: var(--wp--preset--color--brand-secondary);
--color-royal-blue: var(--wp--preset--color--royal-blue);
--color-jacksons-purple: var(--wp--preset--color--jacksons-purple);

/* -----------------------------------------------------------------------
* Neutral: Grey
Expand Down
8 changes: 4 additions & 4 deletions wp-content/themes/core/blocks/core/button/_variables.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
/* @TODO: Add documentation on setting up theming to properly utilize */

body {
--themed-button-background-color: var(--color-brand-primary);
--themed-button-background-color: var(--color-royal-blue);
--themed-button-border-color: transparent;
--themed-button-text-color: var(--color-white);
--themed-button-icon: var(--icon-chevron-right-white);
--themed-button-icon-color: var(--color-brand-primary);
--themed-button-icon-color: var(--color-royal-blue);
--themed-button-hover-background-color: var(--color-black);
--themed-button-hover-border-color: transparent;
--themed-button-hover-text-color: var(--color-white);
--themed-button-hover-icon: var(--icon-chevron-right-white);
--themed-button-hover-icon-color: var(--color-brand-primary);
--themed-button-hover-icon-color: var(--color-royal-blue);
}

/* CASE: Secondary Button Properties */
Expand All @@ -45,7 +45,7 @@ body {
*
* ------------------------------------------------------------------------- */

.has-brand-secondary-background-color {
.has-jacksons-purple-background-color {

/* CASE: Secondary Button Properties */
.is-style-secondary {
Expand Down
4 changes: 2 additions & 2 deletions wp-content/themes/core/blocks/core/querypagination/style.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

/* Current page indicator */
&.current {
background-color: var(--color-brand-primary);
background-color: var(--color-royal-blue);
color: var(--color-white);
}
}
Expand All @@ -60,7 +60,7 @@

&:hover,
&:focus:not(:focus-visible) {
color: var(--color-brand-primary);
color: var(--color-royal-blue);

.wp-block-query-pagination-previous-arrow::before {
background-image: var(--icon-chevron-left-primary);
Expand Down
8 changes: 4 additions & 4 deletions wp-content/themes/core/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
},
{
"color": "#3050E5",
"name": "Brand Primary",
"slug": "brand-primary"
"name": "Royal Blue",
"slug": "royal-blue"
},
{
"color": "#2238a0",
"name": "Brand Secondary",
"slug": "brand-secondary"
"name": "Jacksons Purple",
"slug": "jacksons-purple"
},
{
"color": "#f5f5f5",
Expand Down

0 comments on commit 45660c3

Please sign in to comment.