• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / twentysixteen_main_text_color_css() – Enqueues front-end CSS for the main text color.

You appear to be a bot. Output may be restricted

Description

Enqueues front-end CSS for the main text color.

Usage

twentysixteen_main_text_color_css();

Parameters

Returns

void

Source

File name: twentysixteen/inc/customizer.php
Lines:

1 to 100 of 145
function twentysixteen_main_text_color_css() {
  $color_scheme    = twentysixteen_get_color_scheme();
  $default_color   = $color_scheme[3];
  $main_text_color = get_theme_mod( 'main_text_color', $default_color );

  // Don't do anything if the current color is the default.
  if ( $main_text_color === $default_color ) {
    return;
  }

  // Convert main text hex color to rgba.
  $main_text_color_rgb = twentysixteen_hex2rgb( $main_text_color );

  // If the rgba values are empty return early.
  if ( empty( $main_text_color_rgb ) ) {
    return;
  }

  // If we get this far, we have a custom color scheme.
  $border_color = vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $main_text_color_rgb );

  $css = '
		/* Custom Main Text Color */
		body,
		blockquote cite,
		blockquote small,
		.main-navigation a,
		.menu-toggle,
		.dropdown-toggle,
		.social-navigation a,
		.post-navigation a,
		.pagination a:hover,
		.pagination a:focus,
		.widget-title a,
		.site-branding .site-title a,
		.entry-title a,
		.page-links > .page-links-title,
		.comment-author,
		.comment-reply-title small a:hover,
		.comment-reply-title small a:focus {
			color: %1$s
		}

		blockquote,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.post-navigation,
		.post-navigation div + div,
		.pagination,
		.widget,
		.page-header,
		.page-links a,
		.comments-title,
		.comment-reply-title {
			border-color: %1$s;
		}

		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination:before,
		.pagination:after,
		.pagination .prev,
		.pagination .next,
		.page-links a {
			background-color: %1$s;
		}

		/* Border Color */
		fieldset,
		pre,
		abbr,
		acronym,
		table,
		th,
		td,
		input[type="date"],
		input[type="time"],
		input[type="datetime-local"],
		input[type="week"],
		input[type="month"],
		input[type="text"],
		input[type="email"],
		input[type="url"],
		input[type="password"],
		input[type="search"],
		input[type="tel"],
 
[1] [2] Next »

 View on Trac

Published: 25th November 2019 | Last updated: 25th November 2019

Primary Sidebar

Information

Function name: twentysixteen_main_text_color_css
Plugin ref: Twenty Sixteen
Version: 2.7
Sourcefile: inc/customizer.php
File ref: inc/customizer.php
Deprecated?: No
API Letters: C,M,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.0. PHP: 8.0.20
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wp-a2z.org
© Copyright WordPress a2z 2014-2022. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites