Function EmToPx->find_font_size_from_chain

Definitions

sources/css_cleanup.php

  • Find the font size given a chain of possible parent selectors.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$chain array No No required parameter N/A N/A Possible parent selectors
$context_selector string No No required parameter N/A N/A The selector this is for (useful for debugging, not used for calculation)

Returns

  • Font size in px units
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find the font size given a chain of possible parent selectors.
 *
 * @param  array $chain Possible parent selectors
 * @param  string $context_selector The selector this is for (useful for debugging, not used for calculation)
 * @return integer Font size in px units
 */

protected function find_font_size_from_chain(array $chain, string $context_selector) : int