frontend.css.php 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. $alignment_tr = array(
  3. 'left' => 'flex-start',
  4. 'center' => 'center',
  5. 'right' => 'flex-end',
  6. );
  7. ?>
  8. .fl-node-<?php echo esc_html( $id ); ?>.fl-module-vamtam-heading .vamtam-heading {
  9. text-align: <?php echo esc_html( $settings->alignment ); ?>;
  10. <?php if ( 'off' === $settings->with_divider ) : ?>
  11. justify-content: <?php echo esc_html( $alignment_tr[ $settings->alignment ] ) ?>;
  12. <?php endif ?>
  13. <?php if ( 'custom' === $settings->font_size ) : ?>
  14. font-size: <?php echo intval( $settings->custom_font_size ); ?>px;
  15. <?php endif; ?>
  16. <?php if ( 'custom' === $settings->line_height ) : ?>
  17. line-height: <?php echo esc_html( $settings->custom_line_height ); ?>;
  18. <?php endif; ?>
  19. <?php if ( 'custom' === $settings->letter_spacing ) : ?>
  20. letter-spacing: <?php echo intval( $settings->custom_letter_spacing ); ?>px;
  21. <?php endif; ?>
  22. }
  23. <?php if ( ! empty( $settings->color ) ) : ?>
  24. .fl-node-<?php echo esc_html( $id ) ?> <?php echo esc_html( $settings->tag ) ?>.vamtam-heading * {
  25. color: <?php echo esc_html( vamtam_el_sanitize_accent( $settings->color ) ); ?> !important;
  26. <?php // !important necessary to override default Beaver CSS ?>
  27. }
  28. <?php endif; ?>
  29. <?php if ( in_array( $settings->alignment, array( 'left', 'right' ), true ) ) : ?>
  30. .fl-node-<?php echo esc_html( $id ); ?>.fl-module-vamtam-heading .vamtam-heading-line-<?php echo esc_html( $settings->alignment ) ?> {
  31. display: none;
  32. }
  33. <?php endif ?>
  34. .fl-node-<?php echo esc_html( $id ); ?> .vamtam-heading .vamtam-heading-text {
  35. <?php if ( ! empty( $settings->font ) && 'Default' !== $settings->font['family'] ) : ?>
  36. <?php FLBuilderFonts::font_css( $settings->font ); ?>
  37. <?php endif; ?>
  38. }
  39. <?php if ( $global_settings->responsive_enabled && in_array( 'custom', array( $settings->r_font_size, $settings->r_alignment, $settings->r_line_height, $settings->r_letter_spacing ), true ) ) : ?>
  40. @media screen and (max-width: <?php echo intval( $global_settings->responsive_breakpoint ) ?>px) {
  41. <?php if ( in_array( $settings->alignment, array( 'left', 'right' ), true ) ) : ?>
  42. .fl-node-<?php echo esc_html( $id ); ?>.fl-module-vamtam-heading .vamtam-heading-line-<?php echo esc_html( $settings->r_custom_alignment ) ?> {
  43. display: none;
  44. }
  45. .fl-node-<?php echo esc_html( $id ); ?>.fl-module-vamtam-heading .vamtam-heading-line:not(.vamtam-heading-line-<?php echo esc_html( $settings->r_custom_alignment ) ?>) {
  46. display: block;
  47. }
  48. <?php endif ?>
  49. .fl-node-<?php echo esc_html( $id ); ?>.fl-module-vamtam-heading .vamtam-heading {
  50. <?php if ( 'custom' === $settings->r_alignment ) : ?>
  51. text-align: <?php echo esc_html( $settings->r_custom_alignment ) ?>;
  52. <?php endif; ?>
  53. <?php if ( 'off' === $settings->with_divider && 'custom' === $settings->r_alignment ) : ?>
  54. justify-content: <?php echo esc_html( $alignment_tr[ $settings->r_custom_alignment ] ) ?>;
  55. <?php endif ?>
  56. <?php if ( 'custom' === $settings->r_font_size ) : ?>
  57. font-size: <?php echo intval( $settings->r_custom_font_size ) ?>px;
  58. <?php endif; ?>
  59. <?php if ( 'custom' === $settings->r_line_height ) : ?>
  60. line-height: <?php echo esc_html( $settings->r_custom_line_height ) ?>;
  61. <?php endif; ?>
  62. <?php if ( 'custom' === $settings->r_letter_spacing ) : ?>
  63. letter-spacing: <?php echo intval( $settings->r_custom_letter_spacing ) ?>px;
  64. <?php endif; ?>
  65. }
  66. }
  67. <?php endif; ?>