Menu
All plugins
← All plugins
Breakpoint Classes

Your CSS can see the breakpoint.

The active Bricks breakpoint is added to the body element as classes & a data attribute, and kept up to date as the window is resized. There are no settings. Activate the plugin & the classes are there for your own CSS and JavaScript.
Live readout

Resize the window.

This card reads the body element as you resize. The log lists each change of active breakpoint, which is the bpc:breakpoint event.
Active breakpoint (data-bpc)

…

Classes on the body
…
Events
Nothing yet. Change the window width to fire one.
In your CSS

Two kinds of class.

bpc-{key} matches the active breakpoint only. bpc-in-{key} matches every breakpoint whose styles currently apply, so bpc-in-tablet_portrait means tablet portrait & smaller on a desktop-first site. Each box below lights up when its rule matches.
.bpc-desktop
.bpc-in-tablet_portrait
.bpc-in-mobile_landscape
.bpc-mobile_portrait
/* Hide a decorative element on tablet portrait and smaller */
.bpc-in-tablet_portrait .decor { display: none; }

/* Style something at the active breakpoint only */
.bpc-desktop .card { padding: 2rem; }
In your JavaScript

One event, no resize listener.

bpc:breakpoint fires on document when the active breakpoint changes. event.detail has from, to and key. It does not fire for the first breakpoint on page load, so read data-bpc on the body for that.
document.addEventListener('bpc:breakpoint', function (e) {
  console.log(e.detail.from, '→', e.detail.to);
});