Current Path : /storage/v11800/affypharma/public_html/wp-content/themes/phlox-pro/auxin/auxin-include/classes/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/affypharma/public_html/wp-content/themes/phlox-pro/auxin/auxin-include/classes/class-auxin-css-generator-option-slider.php |
<?php
/**
* Generates CSS for a slider option
*
*
* @package Auxin
* @author averta (c) 2014-2019
* @link http://averta.net
*
* Sample data model:
* [
* 'responsive-slider' => [
* '1024' => [
* 'value' => 10,
* 'unit' => 'px'
* ],
* 'desktop' => [
* 'value' => 12,
* 'unit' => 'px'
* ]
* ]
* ];
*/
class Auxin_CSS_Generator_Option_Slider extends Auxin_CSS_Generator_Option_Base{
/**
* Crawls all breakpoints, generates and collects CSS roles
*
* @param array $breakpoints Lits of breakpoints
*
* @return void
*/
protected function walk_breakpoints( $breakpoints ){
foreach( $breakpoints as $breakpoint => $breakpoint_values ){
$placeholder = $this->placeholder;
if( ! empty( $breakpoint_values['value'] ) ){
$placeholder = str_replace( '{{VALUE}}', $breakpoint_values['value'], $placeholder );
$placeholder = str_replace( '{{UNIT}}' , $breakpoint_values['unit'] , $placeholder );
$this->stack_css( $placeholder, $breakpoint );
}
}
}
}