lvivski
lvivski on Hacker News
Posted by
lvivski on Saturday November 06, 2021 @07:34AM
from the aeon.co dept.
Posted by
lvivski on Thursday August 08, 2013 @11:16AM
from the vimeo.com dept.
Gloss supports standard CSS syntax with addition of mixins, variables and calculations. Rework is more about "create your own CSS"
It just shows the power of css, so you can even recreate animated gifs in CSS
Dart syntax is familiar and it's a plus, you don't have to learn new syntax quirks.
:) well I have no test for now, but there will be test for route parsing and other stuff.
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.
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
Posted by
lvivski on Thursday March 21, 2013 @09:57AM
from the github.com dept.
It's more like "Handwritten Javascript vs Dart2JS generated Javascript" and the latter is better optimized
Posted by
lvivski on Thursday March 21, 2013 @07:36AM
from the dartlang.org dept.
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
Thanks for your feedback! You can post issues on github, if you have and troubles or questions.
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
It can do both: generate pure CSS Animations and animate items via Javascript, CSS 3d transforms and requestAnimationFrame.
Posted by
lvivski on Thursday February 14, 2013 @09:37AM
from the lvivski.github.com dept.
I can do both, generate pure CSS3 animations, and animate items through Javascript, CSS 3d transforms and requestAnimationFrame
Posted by
lvivski on Friday February 08, 2013 @06:11PM
from the lvivski.github.com dept.
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
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.
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.
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.
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)
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"
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.
BOSS is compatible with standard CSS selector syntax, you don't have to use BEM features if you don't want to.