GithubHelp home page GithubHelp logo

jouni / cssinject Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 8.0 126 KB

Dynamic CSS injection add-on for Vaadin Framework

Home Page: http://vaadin.com/addon/cssinject

License: Apache License 2.0

Java 97.14% CSS 2.86%

cssinject's People

Contributors

binbalenci avatar jouni avatar wbadam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cssinject's Issues

CssInject and Vaadin 7.3.9 compatibility?

Hi,
I'm facing problems to use CssInject Add On with Vaadin 7.3.9
in fact, the style is not injected in the ui? is it a problem of compatibility?
i got this Error message : "Thread http-bio-8102-exec-8 stopped at Css.java:31."
thank u for responding.

Remove StyleSheet

What's wrong with this picture?

public void removeStyleSheet(Resource styleSheet) {
    if(this.styleSheets == null) {
        this.styleSheets.remove(styleSheet);
    }

}

Brgds
Joakim

Support for linked stylesheets

One thing that would be great would be able to link in stylesheets in code, rather than using the CSS @import directive. Would it be possible for CSSInject to have the ability to import custom stylesheets in the form of a 'link' element in the document?

In my use-case, my style sheets are hosted by a CDN, so I am simply referring to an external URL in my CSS @import when I extend theme. For example:

@import "../reindeer/styles.css";
@import url("http://my-cdn.com/styles/styles.css)

Ideally I'd like to handle this in code instead of having to extend a theme. Perhaps if the CSSInject component could work with an ExternalResource, and this was rendered as a 'link' element in the DOM?

cheers,

Rob

Vaadin 7.1.0 support

We are facing problems to use VAADIN 7.1.0, Is there any forecast about Vaadin 7.1.0 support?

It seems that CSS Inject project has some fixed dependencie versions. Can we change that for VAADIN 7.1.0 or make it flexible so it uses my project´s Vaadin version?

Thanks!

removeStyleSheet method implementation

Please note removeStyleSheet method implantation is wrong in org.vaadin.cssinject.CSSInject (should be if (styleSheets != null) {)

public void removeStyleSheet(Resource styleSheet) {
if (styleSheets == null) {
styleSheets.remove(styleSheet);

        // TODO how to clear the resource from the state?
    }
}

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.