Giter Site home page Giter Site logo

Can't apply styles about ng2-nouislider HOT 9 CLOSED

tb avatar tb commented on August 16, 2024
Can't apply styles

from ng2-nouislider.

Comments (9)

ahmedsamir6446 avatar ahmedsamir6446 commented on August 16, 2024 1

That's not the best solution but I change in
~nouislider/distribute/nouislider.min.css
directly

from ng2-nouislider.

tb avatar tb commented on August 16, 2024

Check demo, there is custom style example in this line

from ng2-nouislider.

jredd avatar jredd commented on August 16, 2024

I've tried that and it's not working...

from ng2-nouislider.

tb avatar tb commented on August 16, 2024

Demo is using import. You probably use component styles. In that case, read more at https://angular.io/docs/ts/latest/guide/component-styles.html

from ng2-nouislider.

abcd-ca avatar abcd-ca commented on August 16, 2024

Using Webpack here. I'm not getting any errors. component has a width but 0 height. I've tried @import in the scss file like in the demo. Also tried using styleUrls. No luck, same thing. If I manually add height to these components in the dom explorer in chrome I dont' see anything. So, I guess the scss isn't being applied to the component because it's invisible so far

from ng2-nouislider.

abcd-ca avatar abcd-ca commented on August 16, 2024

Update: I can get the component to show up, styled and working by copying the .css that I'm supposed to @import and paste it into my component's .scss file like so:

::ng-deep {
    /* pasted source of ng2-nouislider here */
}

Does that give you any clues as to how I can import it in a nicer way?

from ng2-nouislider.

martin-razus avatar martin-razus commented on August 16, 2024

hey @abcd-ca ,
I had totally same issue and your solution was the only one working. But then I tried to add it into .angular-cli.json as decsribed here: #99

and it started to work.

from ng2-nouislider.

abcd-ca avatar abcd-ca commented on August 16, 2024

Worked for me too, thanks @martin-razus. Go-teamwork!

from ng2-nouislider.

PavolHlavaty avatar PavolHlavaty commented on August 16, 2024

For me this worked without any import:

/deep/ .noUi-target {
    // my custom styles
}

from ng2-nouislider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.