Published on Sep 6, 2021

Colorizing active carousel cell using OxyExtras in Oxygen

Sridhar Katakam

OxyExtrasCarousel Builder module integrates Flickity as a native component with a ton of options including being able to select ACF/Meta Box Gallery or Easy Posts or Repeater or WooCommerce components/product gallery.

This tutorial provides the steps to set black & white background color of all carousel cells except the selected i.e, in-view (mainly) one when using OxyExtras.

Step 1

Install and activate OxyExtras.

Go to Oxygen → OxyExtras → License, paste your license key and activate the plugin.

Go to Settings tab, tick “Carousel Builder” and save.

Step 2

Edit your Template/Page with Oxygen.

Here’s the sample Structure by the end of this step:

1-click copy and paste Hydrogen code is provided near the end.

Add a Section and inside that a Carousel Builder component.

In this example we shall add a static carousel with hardcoded cells with each cell being a div having a unique background image and text.

Carousel content: Custom elements (.cell)

Cells → Cell width: 60%
Space between cells: 10px

Carousel → Group cells by: % of carousel viewport

Add a Div inside the Carousel Builder. Set a background image. Image Overlay Color: rgba(0,0,0,0.26).

Set it a class of cell .

Set Horizontal Item Alignment to Center and Vertical Item Alignment to Middle since we want the heading (to be added next) inside the Div to be centered.

Background Size: cover
Background Repeat: no-repeat
Left: 50%
Top: 50%

Padding: 100px at top and bottom

Add a Heading inside the Div and change its text to say, Slide 1. You may want to change the tag to h2/h3/h4 as needed.

Select the Div and duplicate it.

Change the background image and the heading text.

Repeat for as many slides/cells as needed.

1-click copy and paste Hydrogen code

With either Hydrogen Pack or Hydrogen Paste you can copy the code below and paste in your Oxygen editor to paste the Carousel Builder from my test page.

Note: You will need to change the URLs of the background images for the Divs.

eyJzb3VyY2UiOiJodHRwczovL294eWdlbi5sb2NhbCIsImNvbXBvbmVudCI6W3siaWQiOjMsIm5hbWUiOiJveHktY2Fyb3VzZWwtYnVpbGRlciIsIm9wdGlvbnMiOnsiY3RfaWQiOjMsImN0X3BhcmVudCI6Miwic2VsZWN0b3IiOiItY2Fyb3VzZWwtYnVpbGRlci0zLTExMSIsIm9yaWdpbmFsIjp7Im94eS1jYXJvdXNlbC1idWlsZGVyX2Nhcm91c2VsX3R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cCI6IjUwIn19fSwiY29sb3JzIjp7fX0=

Step 3

Add the following in a Stylesheet at Manage → Stylesheets:

.oxy-carousel-builder .flickity-slider > div:not(.is-selected) {
background-color: rgba(255,255,255,1);
background-blend-mode: luminosity;
}

This will affect all the Carousel Builder instances.

Replace .oxy-carousel-builder with the ID (Ex.: #-carousel-builder-3-111 ) to limit this to a specific instance.

Reference

https://stackoverflow.com/a/65124277/778809

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right