Skip to main content

better_messages_css_customizations

REQUIREMENTS

To be able to implement this guide, you need to learn how to insert PHP snippets to your website.

You can find guide here: WP Beginner

This filter allows to apply custom CSS to Better Messages plugin. This filter is also working in Better Messages mobile applications and this is the way to apply custom CSS styles to mobile apps.

Example

add_filter( 'better_messages_css_customizations', 'custom_css_variables' );

function custom_css_variables( $rules ) {
// Set custom font size and line height for messages
$rules[] = ':root{--bm-message-font-size: 16px;--bm-message-line-height: 20px;}';

// Reverse video from camera in video calls
$rules[] = '.bp-messages-wrap .bp-messages-video-container video[datatype="camera"]{ transform: scaleX(-1); }';

return $rules;
}