News for hackers. Stuff that matters.

lvivski

http://lvivski.com/anima

By the way it's the only to support physics in animations

Re: on Thursday March 28, 2013 @10:04AM (#5454780)
Gloss supports standard CSS syntax with addition of mixins, variables and calculations. Rework is more about "create your own CSS"
Re: on Tuesday March 26, 2013 @10:20AM (#5443432)
It just shows the power of css, so you can even recreate animated gifs in CSS
Re:Start — Dart web framework inspired by Sinatra on Thursday March 21, 2013 @12:11PM (#5416121)
Dart syntax is familiar and it's a plus, you don't have to learn new syntax quirks.
Re:Start — Dart web framework inspired by Sinatra on Thursday March 21, 2013 @12:09PM (#5416088)
:) well I have no test for now, but there will be test for route parsing and other stuff.
Re:Start — Dart web framework inspired by Sinatra on Thursday March 21, 2013 @11:23AM (#5415655)
Dart is a language and a platform behind it. It's really easy do develop advanced applications in Dart and then translate them to javascript. But you are also able to run it in a separate VM.
Re:Dart2js is faster than V8 in DeltaBlue test on Thursday March 21, 2013 @10:56AM (#5415422)
Those graphs show the opposite. DartVM is the fastest among the three "dart, js, dart2js", then comes Dart2js due to highly optimizable generated code, then handwritten javascript
Re:Start — Dart web framework inspired by Sinatra on Thursday March 21, 2013 @10:47AM (#5415356)
Well, Start uses another project called Hart [1] template engine that has syntax similar to Slim or Jade. And I'm going to include Gloss [2] there too, it's a CSS preprocessor, but it's not stable yet.

[1] http://github.com/lvivski/hart [2] http://github.com/lvivski/gloss

Re:Dart2js is faster than V8 in DeltaBlue test on Thursday March 21, 2013 @09:50AM (#5414975)
It's more like "Handwritten Javascript vs Dart2JS generated Javascript" and the latter is better optimized
Re:Anima — tool for CSS3 Animations on Friday February 15, 2013 @04:44AM (#5225338)
Yes, these libraries are very good, but they don't generate "@keyframes", Anima does in CSS mode.

And as far as I see they have no parallel animations like http://lvivski.github.com/anima/example/parallel.html. The ball moves forward with lenear timing-function, and up/down with ease-quad, so is slows down when on top and speeds up when falls down

Re:Anima — tool for CSS3 Animations on Thursday February 14, 2013 @11:37AM (#5220223)
Thanks for your feedback! You can post issues on github, if you have and troubles or questions.
Re:Anima — tool for CSS3 Animations on Thursday February 14, 2013 @11:01AM (#5220022)
Pure CSS animations can be paused and resumed via Javascript. It's not trivial to stop them and preserve last known state of the node, and apply next animation so that is starts with that state.

Controling CSS Transitions is even more difficult and requires multiple actions like: remember current transform, remove transition, apply remembered transform etc.

Yes, CSS Animations have events for animation start and end, but Anima gives intermediate events, for any transformation in a set.

So it's not impossible to control CSS animations, but it's much easier with Anima. In `CSS` mode Anima has `pause()` `resume()` and `stop()` methods

Re:Anima — tool for CSS3 Animations on Thursday February 14, 2013 @09:57AM (#5219679)
It can do both: generate pure CSS Animations and animate items via Javascript, CSS 3d transforms and requestAnimationFrame.
Re: on Thursday February 14, 2013 @09:14AM (#5219498)
I can do both, generate pure CSS3 animations, and animate items through Javascript, CSS 3d transforms and requestAnimationFrame
Re: on Thursday February 14, 2013 @03:12AM (#5218379)
It can create animations using pure css or use requestAnimationFrame to animate. Here are examples http://lvivski.github.com/anima/#examples
Re: on Friday February 08, 2013 @05:54PM (#5190620)
Re:Style like a BOSS. New css preprocessor. on Tuesday October 02, 2012 @08:02AM (#4601547)
well, yes. CSS has variables syntax too (http://dev.w3.org/csswg/css-variables/) but for the time of compiling you don't know anything about the runtime, so you can't calculate things like "10em + 5px" 'cause EM's absolute value depends on many things, so I had to separate "real" css calculations and "fake" ones
Re:Style like a BOSS. New css preprocessor. on Tuesday October 02, 2012 @04:35AM (#4601071)
BOSS uses different approach.

If you want to have declarations of "button" in "button-primary" you can just write <button class="button button-primary">

But is you want to reuse some fancy image-border "button" and "input", so they may have nothing in common, except that image-border. You can create a mixin with desired declarations for all browser, and then use it in your code as simple as "fancy-image-border: url('image.png')". And all rulesets, that have this "fancy-image-border" will then get a list of declarations in place of this mixin.

So you see, the syntax is pretty simple and matches CSS-syntax. You don't need @extends or smth else, you just have to know the name of mixin declaration.

Re:Style like a BOSS. New css preprocessor. on Tuesday October 02, 2012 @04:25AM (#4601055)
there is a list off all HTML tags, if a tag with that name exists, it will be treated as a TAG, if it doesn't, it will be treated as a BEM block. That simple.

This gives some restrictions to Blocks' names, but it's not a big problem, cause normally you won't give block a name which matches existing HTML tag.

The same restrictions are for Modifiers (pseudo-selectors) if it exists, then pseudo, else Modifier.

Re:Style like a BOSS. New css preprocessor. on Tuesday October 02, 2012 @04:17AM (#4601038)
In simple cases `&` is just replaces by parent selector (Like in SASS or LESS), only some cases are treated as BEM nesting (pseudo-selector that doesn't exist, etc).

If you use SASS or LESS and happy with them, you don't need BOSS. But you may take a look at it, 'cause it has simpler syntax for mixins and variables, which is more CSSy.

So BOSS is more like a superset to SASS and LESS, their features + some new stuff + simpler syntax.

Re:Style like a BOSS. New css preprocessor. on Tuesday October 02, 2012 @04:10AM (#4601020)
BOSS already has regular CSS as a starting point. If you give regular CSS to it's input you get this css in output (with some indentation changes 'caused by parsing process)

Then you can use syntactic sugar: variables, declaration mixins, nesting, arithmetic (with type coercion, by the way)

Re:Style like a BOSS. New css preprocessor. on Tuesday October 02, 2012 @04:06AM (#4601003)
You are partially right. I've added a test with simple selectors: classnames, pseudo.

BOSS expands nesting with underscore separation only in case of BEM selectors (Blocks, Elements, Modifiers)

But it uses cascading with all other selectors, see "test/standard.boss" and "test/standard.css"

Re:Style like a BOSS. New css preprocessor. on Tuesday October 02, 2012 @03:55AM (#4600980)
LESS uses ".class" extendig dor mixins. It's totally wrong, you don't need to extend a class, 'cause you can assign multiple classnames to a DOM node. The only thing you need to extend is a set of declarations (properties), so you create a new declaration which contains all declarations you need, so that you can reuse them.
Re:Style like a BOSS. New css preprocessor. on Tuesday October 02, 2012 @03:52AM (#4600975)
BOSS is compatible with standard CSS selector syntax, you don't have to use BEM features if you don't want to.

Older »