Skip to content

Instantly share code, notes, and snippets.

@nanoanno
Last active April 17, 2019 08:28
Show Gist options
  • Save nanoanno/f30555183363b2896a6cbcef5f012d2e to your computer and use it in GitHub Desktop.
Save nanoanno/f30555183363b2896a6cbcef5f012d2e to your computer and use it in GitHub Desktop.
Twenty-Nineteen Custom Color Override
/*
* Set background for:
* - featured image :before
* - featured image :before
* - post thumbmail :before
* - post thumbmail :before
* - Submenu
* - Sticky Post
* - buttons
* - WP Block Button
* - Blocks
*/
.image-filters-enabled .site-header.featured-image .site-featured-image:before,
.image-filters-enabled .site-header.featured-image .site-featured-image:after,
.image-filters-enabled .entry .post-thumbnail:before,
.image-filters-enabled .entry .post-thumbnail:after,
.main-navigation .sub-menu,
.sticky-post,
.entry .entry-content .wp-block-button .wp-block-button__link:not(.has-background),
.entry .button, button, input[type="button"], input[type="reset"], input[type="submit"],
.entry .entry-content > .has-primary-background-color,
.entry .entry-content > *[class^="wp-block-"].has-primary-background-color,
.entry .entry-content > *[class^="wp-block-"] .has-primary-background-color,
.entry .entry-content > *[class^="wp-block-"].is-style-solid-color,
.entry .entry-content > *[class^="wp-block-"].is-style-solid-color.has-primary-background-color,
.entry .entry-content .wp-block-file .wp-block-file__button {
background-color: hsl( 326, 100%, 33% ); /* base: #0073a8; */
}
/*
* Set Color for:
* - all links
* - main navigation links
* - Post navigation links
* - Post entry meta hover
* - Post entry header more-link hover
* - main navigation svg
* - comment navigation
* - Comment edit link hover
* - Site Footer Link hover
* - Widget links
*/
a,
a:visited,
.main-navigation .main-menu > li,
.main-navigation ul.main-menu > li > a,
.post-navigation .post-title,
.entry .entry-meta a:hover,
.entry .entry-footer a:hover,
.entry .entry-content .more-link:hover,
.main-navigation .main-menu > li > a + svg,
.comment .comment-metadata > a:hover,
.comment .comment-metadata .comment-edit-link:hover,
#colophon .site-info a:hover,
.widget a,
.entry .entry-content .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
.entry .entry-content > .has-primary-color,
.entry .entry-content > *[class^="wp-block-"] .has-primary-color,
.entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-primary-color,
.entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-primary-color p {
color: hsl( 326, 100%, 33% ); /* base: #0073a8; */
}
/*
* Set left border color for:
* wp block quote
*/
blockquote,
.entry .entry-content blockquote,
.entry .entry-content .wp-block-quote:not(.is-large),
.entry .entry-content .wp-block-quote:not(.is-style-large) {
border-left-color: hsl( 326, 100%, 33% ); /* base: #0073a8; */
}
/*
* Set border color for:
* :focus
*/
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus {
border-color: hsl( 326, 100%, 33% ); /* base: #0073a8; */
}
.gallery-item > div > a:focus {
box-shadow: 0 0 0 2px hsl( 326, 100%, 33% ); /* base: #0073a8; */
}
/* Hover colors */
a:hover, a:active,
.main-navigation .main-menu > li > a:hover,
.main-navigation .main-menu > li > a:hover + svg,
.post-navigation .nav-links a:hover,
.post-navigation .nav-links a:hover .post-title,
.author-bio .author-description .author-link:hover,
.entry .entry-content > .has-secondary-color,
.entry .entry-content > *[class^="wp-block-"] .has-secondary-color,
.entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-secondary-color,
.entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-secondary-color p,
.comment .comment-author .fn a:hover,
.comment-reply-link:hover,
.comment-navigation .nav-previous a:hover,
.comment-navigation .nav-next a:hover,
#cancel-comment-reply-link:hover,
.widget a:hover {
color: hsl( 326, 100%, 23% ); /* base: #005177; */
}
.main-navigation .sub-menu > li > a:hover,
.main-navigation .sub-menu > li > a:focus,
.main-navigation .sub-menu > li > a:hover:after,
.main-navigation .sub-menu > li > a:focus:after,
.main-navigation .sub-menu > li > .menu-item-link-return:hover,
.main-navigation .sub-menu > li > .menu-item-link-return:focus,
.main-navigation .sub-menu > li > a:not(.submenu-expand):hover,
.main-navigation .sub-menu > li > a:not(.submenu-expand):focus,
.entry .entry-content > .has-secondary-background-color,
.entry .entry-content > *[class^="wp-block-"].has-secondary-background-color,
.entry .entry-content > *[class^="wp-block-"] .has-secondary-background-color,
.entry .entry-content > *[class^="wp-block-"].is-style-solid-color.has-secondary-background-color {
background-color: hsl( 326, 100%, 23% ); /* base: #005177; */
}
/* Text selection colors */
::selection {
background-color: hsl( 326, 50%, 90% ); /* base: #005177; */
}
::-moz-selection {
background-color: hsl( 326, 50%, 90% ); /* base: #005177; */
}
@maique
Copy link

maique commented Jan 15, 2019

Thank you SO much for sharing this one. Somehow I feel it would be sooooo much easier to allow inputing the color code instead of the provided slider on the theme's customize page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment