Description
Dynamically generate a CSS class for min-heightWhat are the best units for this: percentages, pixels, em or otherwise?
Usage
oik_rwd_dynamic_css_generate_height( $class, $height, $ptop, $pbottom, $mtop, $mbottom );Parameters
- $class
- ( mixed ) required –
- $height
- ( mixed ) required –
- $ptop
- ( mixed ) required –
- $pbottom
- ( mixed ) required –
- $mtop
- ( mixed ) required –
- $mbottom
- ( mixed ) required –
Returns
voidSource
File name: oik-rwd/shortcodes/oik-rwd.phpLines:
1 to 14 of 14
function oik_rwd_dynamic_css_generate_height( $class, $height, $ptop, $pbottom, $mtop, $mbottom ) { $kvs = oik_rwd_dynamic_css_pv( "min-height", "$height%" ); if ( $ptop ) $kvs .= oik_rwd_dynamic_css_pv( "padding-top", "$ptop%" ); if ( $pbottom ) $kvs .= oik_rwd_dynamic_css_pv( "padding-bottom", "$pbottom%" ); if ( $mtop ) $kvs .= oik_rwd_dynamic_css_pv( "margin-top", "$mtop%" ); if ( $mbottom ) $kvs .= oik_rwd_dynamic_css_pv( "margin-bottom", "$mbottom%" ); $css = ".$class { $kvs}"; e( $css ); return( $css ); }View on GitHub
Called by
1 to 1 of 1
Invoked by
Call hooks
API Letters:
