Skip to content

Instantly share code, notes, and snippets.

@Pross
Created June 1, 2021 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pross/21b5d755b938ce9d0bf0c076500d7fff to your computer and use it in GitHub Desktop.
Save Pross/21b5d755b938ce9d0bf0c076500d7fff to your computer and use it in GitHub Desktop.
modules/photo/includes/frontend.css.php
<?php
// Align
FLBuilderCSS::responsive_rule( array(
'settings' => $settings,
'setting_name' => 'align',
'selector' => ".fl-node-$id .fl-photo",
'prop' => 'text-align',
) );
// Width
FLBuilderCSS::responsive_rule( array(
'settings' => $settings,
'setting_name' => 'width',
'selector' => ".fl-node-$id .fl-photo-img, .fl-node-$id .fl-photo-content",
'prop' => 'width',
) );
// Border
if ( 'circle' === $settings->crop ) {
if ( ! is_array( $settings->border ) ) {
$settings->border = array();
}
$settings->border['radius'] = array(
'top_left' => '',
'top_right' => '',
'bottom_left' => '',
'bottom_right' => '',
);
}
FLBuilderCSS::border_field_rule( array(
'settings' => $settings,
'setting_name' => 'border',
'selector' => ".fl-node-$id .fl-photo-img",
) );
FLBuilderCSS::typography_field_rule( array(
'settings' => $settings,
'setting_name' => 'caption_typography',
'selector' => ".fl-node-$id.fl-module-photo .fl-photo-caption",
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment