Git Product home page Git Product logo

Comments (6)

vzaccaria avatar vzaccaria commented on August 10, 2024

Hi, make sure to:

  1. serve the page from a web server (it can be even local)
  2. bower_components is accessible from the root of the served directory. Otherwise, you should update the path in the src attribute.

Let me know if the error persists.

from dyncss.

potsky avatar potsky commented on August 10, 2024

Hi !

Same problem here.

DynCss seems to not work at all. No console errors, no anormal behaviour. I have exactly the same result as if I did not load it.

  1. There is this string in your code /Users/zaccaria/development/github/DynCSS/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js. Is it normal ?
  2. I have set debug to true in your code. There is 1 element in my page and I have these console logs at launch :
[Log] dyncss-entry: Scanning for css (vendor.min.js, line 13)
[Log] dyncss-entry: Content loaded (vendor.min.js, line 13)
[Log] dyncss-entry: Initializing handler (vendor.min.js, line 13)

The element css is :

.location {
    position        : absolute;
    top             : 0;
    -dyn-margin-top : '(@win-height - @el-height)/2.0';
}

from dyncss.

vzaccaria avatar vzaccaria commented on August 10, 2024

@potsky you can also merge dyncss.js into your bundle; you should treat it like any other bower module.

  1. That's a weird behavior due to browserify but it works, don't worry. It's just the key it uses to resolve require's.

  2. DynCss looks for css files as specified in link tags:

    <link rel="stylesheet" href="css/client.css" type="text/css">
    ...

    when debug is set to true you should see something like this:

    dyncss-entry: Loaded http://localhost:4000/css/client.css 
    

    In your case, it seems that it cannot find the css file.

  3. Have a look at this example I made for a tutorial on DynCss:
    https://github.com/vzaccaria/dyncss-example1

from dyncss.

potsky avatar potsky commented on August 10, 2024

Ok perfect !

The problem was just the missing type="text/css".

Thanx!

ps : SASS/SCSS/Compass preprocessor do not like the #{} syntax in -dyn-webkit-transform: '"translate( 0px , #{-1*@win-scrollTop}px) "';for example

from dyncss.

vzaccaria avatar vzaccaria commented on August 10, 2024

ps : SASS/SCSS/Compass preprocessor do not like the #{} syntax in
-dyn-webkit-transform: ‘“translate( 0px , #{-1*@win-scrollTop}px) “‘;for
example

Did you try with escaping #?

On Tue, Jun 3, 2014 at 3:16 PM, Potsky [email protected] wrote:

Ok perfect !

The problem was just the missing type="text/css".

Thanx!

ps : SASS/SCSS/Compass preprocessor do not like the #{} syntax in -dyn-webkit-transform:
'"translate( 0px , #{-1*@win-scrollTop}px) "';for example


Reply to this email directly or view it on GitHub
#2 (comment).

from dyncss.

potsky avatar potsky commented on August 10, 2024

Escaping # works

from dyncss.

Related Issues (4)

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.