Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cssClasses - how to use, and is it even supported? #1279

Open
smileBeda opened this issue Sep 11, 2024 · 1 comment
Open

cssClasses - how to use, and is it even supported? #1279

smileBeda opened this issue Sep 11, 2024 · 1 comment
Labels
Support Questions and other support issues

Comments

@smileBeda
Copy link

smileBeda commented Sep 11, 2024

Here it is said that cssClasses is an option but the option doc does not mention it, and no matter what I pass to the option, it always ends in undefined classes produced in the HTML.

I then found

target: string;
and if I pass all of those classes like :

cssClasses: {
    target: " string",
    base: " string",
    origin: " string",
    handle: " string",
    handleLower: " string",
    handleUpper: " string",
    touchArea: " string",
    horizontal: " string",
    vertical: " string",
    background: " string",
    connect: " string",
    connects: " string",
    ltr: " string",
    rtl: " string",
    textDirectionLtr: " string",
    textDirectionRtl: " string",
    draggable: " string",
    drag: " string",
    tap: " string",
    active: " string",
    tooltip: " string",
    pips: " string",
    pipsHorizontal: " string",
    pipsVertical: " string",
    marker: " string",
    markerHorizontal: " string",
    markerVertical: " string",
    markerNormal: " string",
    markerLarge: " string",
    markerSub: " string",
    value: " string",
    valueHorizontal: " string",
    valueVertical: " string",
    valueNormal: " string",
    valueLarge: " string",
    valueSub: " string",
}

well... it produces HTML elements with noUi- string, which makes absolutely no sense to me. it seems to replace the class rather than append, and only works if we overwrite them all?
Indeed, I can then also overwrite that with cssPrefix: '', but... that fully defies the purpose of this, IMO.

The final goal is to add classes from Bootstrap - and that just becomes impossible, if we have to either remove the noUi prefix just to add something like a bg-danger (thus totally breaking noUI) or append to it, therefore breaking Bootstrap.

Is there any solution to this?

@leongersen
Copy link
Owner

leongersen commented Jan 15, 2025

it seems to replace the class rather than append, and only works if we overwrite them all?

Correct, that is what this option does. This option is for projects that combine and style multiple UI elements into a library. I would not recommend using it in a one-off project.

@leongersen leongersen added the Support Questions and other support issues label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Questions and other support issues
Projects
None yet
Development

No branches or pull requests

2 participants