Creating personalized CSS for a Webix toggle button

I have been attempting to repaint a toggle button, but no matter what I do, I cannot seem to find the correct CSS style to override.

The current setup can be viewed at

CSS:

.webix_el_toggle button{
    background-color:grey !important;
    border-color: gray !important;
}
.webix_el_toggle.webix_pressed button{
    background-color:green !important;
    border-color: green !important; 
}

It is clear that the .webix_el_toggle.webix_pressed selector is not working and I am feeling overwhelmed by the number of CSS classes associated with the toggle. Is there a solution to this?

Answer №1

Good news! I have discovered a solution. The CSS class required for the pressed toggle is .webix_el_box.webix_pressed:

.webix_el_toggle button{
    background-color:grey !important;
    border-color: gray !important;
}
.webix_el_box.webix_pressed button{
    background-color:green !important;
    border-color: green !important; 
}

Snippet

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

simplest method to brighten the image in this specific instance

I have a simple question. We are looking to enhance some static images by adding a lightening effect with an overlay. For example, when hovering over an image like on this website: (just for the lightening effect). What is the best approach to achieve thi ...

Ways to specifically select an element based on its type and class

I am struggling to create a vanilla JS function that will resize fonts in a container with a specified class. I came across this demo, which seemed promising. However, the 'Javascript' version uses the $() jquery selector to target elements, maki ...

Trouble centering a list within a parent div using CSS

Even though this issue seems straightforward and many others have asked similar questions on the site, I find myself stuck after reading through several solutions and attempting various fixes. Why is this happening? My problem involves centering a navigat ...

Using the following-sibling selector in Java, you can easily click on all <li> elements within a <ul> tag

I am trying to navigate through the list of li elements starting from the "Mentorship" tag link <ul _ngcontent-cwp-c18="" class="navigation clearfix"> <li _ngcontent-cwp-c18="" routerlinkactive="current" ...

How to align the Bootstrap 4 button toolbar horizontally in an Angular project

I'm struggling to center the button toolbar horizontally on my webpage. This is what I have so far: <div class="row"> <div class="col-sm-6 mx-auto"> <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups"& ...

How to Combine Various Conditions in a ngStyle Directive?

I am working with a NgStyle Tag and would like to incorporate multiple conditions, but I am encountering issues where it doesn't work or produces errors. Here is the code snippet that I have been experimenting with: <div class = "card" [ngStyle] ...

Transitioning smoothly between different backgrounds will be like changing the cursor color

As I work on my website, I encounter the need for a cursor that smoothly changes its color. Specifically, I want the cursor to appear blue (#0059ff) when hovering over a white background and white when over a blue background, with a seamless transition lik ...

Close the fullscreen modal automatically when clicking anywhere inside

Hey there, I'm facing an issue with a button that I want to trigger a full-screen section containing some inputs. I attempted to use Bootstrap's full-screen modal for this purpose, but encountered some challenges. When I clicked anywhere on the ...

Can rows be nested within the d-flex class in Bootstrap 4?

(I found a related inquiry here, however, my current skill level does not allow me to implement it with Bootstrap just yet) My goal is to create a section on the webpage between the "header" and "footer" (referred to as "body"), which should include: ...

What are some ways to prevent pinch zoom on an HTML webpage?

Searching for a way to disable pinch-to-zoom on an HTML web page has proven to be a daunting task. Despite numerous attempts, I have yet to find a solution that works. I am reaching out in the hopes that you may have the answer. Some of the methods I have ...

What steps should I take to adjust the CSS code to properly integrate with my HTML file?

There seems to be an issue with the code provided. The CSS for the menu bar is not functioning properly with the HTML. <!DOCTYPE html> <html> <body class="news"> <head> <style type="text/css">body { margin: 0; paddi ...

Setting up a Bootstrap tokenfield for usage with a textarea

I was attempting to set up a tokenfield on a textarea with increased height, but it is showing up as a single-line textbox. How can I modify the tokenfield to function properly with a textarea? <textarea name="f1_email" placeholder="Enter Friends' ...

Is it possible to use jQuery to dynamically set the line-height of nested objects in CSS?

I am in the process of creating a horizontal family tree. Where I'm At - I am currently working on setting the CSS Line-Height to vertically center each item based on nested content. The Issue - The Line-Height value for nested items keeps growing e ...

Text spilling out of the input

I'm facing an issue with text overflowing from the right side of the container. I've tried setting padding-right but it didn't solve the problem. Any suggestions on how to fix this? Below is the code snippets from my HTML and CSS files: .h ...

Circular Segment Button in Ionic 2

Is there a way to change the appearance of a segment button from square to round using CSS? https://i.sstatic.net/KRjSh.png I attempted to use traditional CSS, but encountered issues when Ionic2 attempted to transform the button on segment-activated. You ...

Iterating over an array and displaying elements on the webpage

Struggling to access an array and loop through it, but only able to print out one element instead of all. Need a hint on how to solve this issue. See my code below: let toppingsCount; const burger = document.createElement('div'); const toppingsD ...

Settings for the packaging of web components

Is there a way to configure a web component in vue.config.js and separate the iconfont.css section when building? I am using the vue-cli-service build --target wc-async --name chat-ui src/views/Chat/Launcher.vue --report command to package the web compon ...

Vue 3 now allows for disabling the automatic renaming of CSS properties like "top/bottom/left/right" to "inset"

I noticed that Vue (or maybe Vite) automatically changes my css style attributes from "top: 0; right: 0; left: 0; bottom: 0;" to "inset: 0px;" However, this adaptation doesn't work well for older browsers that do not support the i ...

Alignment of input

        <section class="newsletter text-white text-center"> <div class="container"> <div class="row"> <div class="col-xl-9 mx-auto"> <h2 class="mb-4" ...

Tips for ensuring a button stays anchored to the bottom of a flatlist while scrolling to the end in React Native

const Layout = () => { return ( <View style={styles.container}> <Text style={styles.heading}>Screen Data</Text> <View> <FlatList data={data} renderItem={({item}) => ( ...