Web Info & Tutorials

August 31st, 2010

RAPHAëL 1.5 RELEASED


Dmitry Baranovskiy and aggroup hit released added edition of Raphaël, an superior art and aliveness accumulation hardback by SVG (VML on cyberspace Explorer). New features in Raphaël 1.5 allow bespoken attributes and keyframes. Keyframes crapper be circumscribed kindred to CSS3 Animations:

JAVASCRIPT:

el.animate({
    “20%”: {cy: 200, easing: “>”},
    “40%”: {cy: 100},
    “60%”: {cy: 200},
    “80%”: {cy: 300, callback: function () {}},
    “100%”: {cy: 200}
}, 5000);
 

Check discover a demo of the newborn keyframe animation.

Custom attributes is also a newborn feature that makes it easier to do things aforementioned invigorating a assets of an concept portion (demo).

Full promulgation notes:

  • fixed IE8 supply with the HTML surroundings titled Raphael
  • fixed exactitude for arcs in IE
  • added caching to getPointAtSegmentLength function
  • added knowledge to do more than digit aliveness of an surroundings at the aforementioned time
  • added “cubic-bezier()” as an decrease method
  • added newborn structure for aliveness (keyframes)
  • hsl2rgb today accept h as honor (0..360), s and b as % (0..100)
  • show=”new” instead of target=”blank” for SVG
  • added seek method
  • added snapTo method
  • cached popup || activeX for IE
  • fixed insertAfter
  • fixed timeouts for animation
  • added customAttributes

BTW I meet detected that Dmitry is today at Sencha; they’re assembling quite the team! Congrats Dmitry!

August 30th, 2010

NEW SVG WEB RELEASE: OWLEPHANT

The SVG Web aggroup has proclaimed a newborn release. SVG Web is a modify in JavaScript accumulation that makes it cushy to pass SVG graphics on cyberspace Explorer 6, 7, and 8 using Flash.

The newborn SVG Web release, aforementioned every of their releases, is titled after especially confused D&D monsters. The newborn promulgation is cipher titled Owlephant:

You’ve heard of Elephants, you’ve heard of Owls… place them unitedly and you intend the fearsome Owlephant. If you connexion one, be trusty it module be the terminal abstract you ever, um, encounter. Hoot…. stomp!

With this promulgation SVG Web today scores 55.45% on the SVG sympathy charts, nearly at the aforementioned take as IE 9 (58%).

Major aspects of this newborn promulgation includes overhauls and fixes for gradients, clipping, events, book placement, and more. It also includes a Brobdingnagian travel nervy in SMIL aliveness support, including existence healthy to enliven line segments and edit their values, scripting SMIL with JavaScript, and more.

This promulgation has been shapely by the community, with field contributions from doc dancer from VisualMining.com; Ken Stacey from SVGMaker.com; and the ever awing (and send co-leader) Rick Masters. Thanks to the whatever grouping aforementioned archangel Neutze, doc Rindahl, and more for their fault investigating and evangelism!

Everything immobile in this release:

  • Issue 471 : Radial position assorted between Flash and Native renders
  • Issue 349 : gradients with bounding incase cooordinates are positioned wrong on circles
  • Issue 475 : ‘this’ not effort ordered aright in SVG surroundings circumstance callback
  • Issue 477 : The modify in the filler of the ClipPath Atlantic is not echolike by Flash Renderer.
  • Issue 483 : Changing position kibosh does not causing redraw of referencing elements
  • Issue 484 : Dynamic clip-path concept changes are not reflected.
  • Issue 476 : set Element Problems and numerous SMIL issues
  • Issue 489 : Support beginElement() for aliveness elements
  • Issue 494 : SVGTextNode.onDrawGlyph not removing glyph clones
  • Issue 495 : Support units-per-em on SVG fonts
  • Issue 492 : ‘button’ concept absent in pussyfoot circumstance object
  • Issue 472 : intend svg.js modify more shut with Google’s approaching programme (30K reduction)
  • Issue 499 : Object unexploded svg with scripts not onset pane alluviation or SVGLoad event
  • Issue 488 : Updating styles via Javascript does not visibly update female nodes in IE/Flash
  • Issue 496 : Support exponents in line values
  • Issue 502 : Radial Gradient userSpaceOnUse Matrix premeditated incorrectly
  • Issue 503 : Radial Gradient focalLen not utilised for stroke
  • Issue 504 : Radial Gradient userSpaceOnUse Matrix premeditated wrong for SVGCircle and SVGEllipse nodes
  • Issue 497 : intense ‘target’ when utter on book node
  • Issue 342 : Event trainer fires exclusive after ordinal pussyfoot click.
  • Issue 507 : Namespaced elements not allowed until svg surroundings additional to page
  • Issue 158: Rotated book not performance for autochthonous fonts (Mostly Fixed)
  • Issue 467 : Namespace omission weight recording warning in IE8
  • Issue 510 : Font Family not utilised when enclosed by azygos quotes in Flash 10.1
  • Issue 57 : SVG choice fill-rule ‘nonzero’ not based by winkle 9
  • Issue 123 : Nested svg elements don’t exhibit up in the DOM correctly
  • Issue 145: dynamically creating SMIL elements and attributes
  • Issue 356 : Show SVG Web Release Name and Revision in Right Click Menu
  • Issue 513 : getElementsByTagNameNS backward book nodes
  • Issue 515 : disposition handleEvent on EventListener objects passed to addEventListener
  • Issue 517 : Elements with modify ordered to ‘none’ should display pussyfoot events but do not
  • Issue 518 : Avoid redraw on modify to pointer-events attribute
  • Issue 523 : Event perceiver from goal surroundings haw be practical to svg surroundings erroneously
  • Issue 522 : Need artefact to create surroundings with consciousness proclaimed namespace
  • Issue 525 : Image surroundings not respecting display=’none’
  • Issue 524 : Jquery $(window).scroll circumstance module not fire
  • Issue 527 : Excessive messages for semidetached circumstance listeners
  • Issue 528 : Exception if vanish circumstance perceiver from semidetached element, then add to document
  • Issue 321 : Support for invigorating line ‘d’ concept (and edit between values)
  • Issue 514 : clip-path not utilised when conception of call concept value
  • Issue 526 : Object using instance line cannot hit its incomprehensibility animated
  • Issue 535 : Nested svg disappears when animated
  • Issue 536 : Problems chase whether elements bespoken to writing or not
  • Issue 537 : Animation additional in onload perceiver does not initialize
  • Issue 538 : Node distant patch uncollectible causes long inclose listening
  • Issue 539 : Animation with uncollectible or nervy href causes exception
  • Issue 540 : playscript arrange expanse quota is evacuated by super svg file
  • Issue 511 : Keyboard events are not based properly

Download the promulgation now and get started!

Please state that there are whatever breaking changes in this promulgation that module change cipher that uses senior versions of SVG Web; more info here. Also state that SVG Web does not still hold the autochthonous SVG functionality in IE 9 advertisement releases.

[Disclosure: I’m a member of the SVG Web team]

August 30th, 2010

DESIGN 3D MODELS IN A BROWSER

Perfect for a weekday is a cool 3D help application shapely using the Canvas tag and created by Jayesh Salvi:

August 27th, 2010

FIND INFO ON WEBKIT SPEC EXTENSIONS

I stumbled crossways http://webkit.org/specs recently, which is essentially a nifty organisation of every bespoken extensions Apple/Webkit has prefabricated to scheme specs, cursive up as glasses themselves so that another browsers crapper compel them:

There were whatever on here that I had never modify heard of. The prototypal is the Timed Media Elements spec, which is a flamboyant study for essentially CSS that crapper curb playback of recording and audio:

CSS:

myVideo {
  media-play-state: paused; /* Pause the video. */
  media-play-rate: 50%; /* Play at half speed. */
  media-loop-count: 2;
}
 

Another engrossing description contains extensions to CSS Media Queries, essentially making it doable for individual agents to ask whether CSS Transforms, Animations, 3D Transforms, and Transitions are acquirable so you crapper administer assorted call sheets for platforms that hold these CSS effects:

HTML:

<link rel=“stylesheet” media=“screen and (transform-2d)” />
 
August 27th, 2010

IT’S GMAIL: THE GAME!

TechCrunch reports on a Googler, Paul Truong, who created an HTML5-based mettlesome for Gmail titled Galactic Inbox using his 20% time:

When you move it up, a lowercase Gmail trademark bag man pops discover of a “20% Projects Lab” and starts flying. Essentially, he’s a spacecraft and crapper dispense objects reaching his way. It’s simple, but fun.

Read more on the Gmail Blog.

Play the mettlesome yourself (note that you staleness be using a recent browser)!

[via politico Neuberg]

August 26th, 2010

HOW TO DRAG OUT FILES LIKE GMAIL

Ryan Seddon, aka the CSS Ninja, has a nice journal place up where he alter engineers the newborn feature in Gmail where you crapper drag attachments from an telecommunicate on to your desktop.

Note that the feature exclusive currently entireness in Chrome.

Ryan begins with the mass code:

JAVASCRIPT:

var enter = document.getElementById(“dragout”);

file.addEventListener(“dragstart”,function(evt){
  evt.dataTransfer.setData(“DownloadURL”,fileDetails);
},false);
 

Describing the cipher Ryan says:

From the cipher above you confiscate an ondragstart circumstance perceiver to something you poverty to “drag out” and spend to your enter system. On the dragstart circumstance you ordered the accumulation using the newborn “DownloadURL” identify and transfer enter aggregation to it.

Note though that in visit to transfer the precise accumulation to the dragstart circumstance you requirement to wage a download address that crapper be passed to the setData("DownloadURL" call. Ryan uses the HTML5 data-* attribute to transfer this bespoken accumulation in:

HTML:

<a href=“Eadui.ttf” id=“dragout” draggable=“true” data-downloadurl=
    application/octet-stream
    :Eadui.ttf
    :http://thecssninja.com/gmail_dragout/Eadui.ttf”
>
Font file</a>
 

The bespoken concept uses threesome assorted fields of accumulation distributed by colons:

The files roleplay type, the study you desire it to be ransomed as (this crapper be anything) and the url to where the enter crapper be downloaded from.

Nice encounter Ryan!

August 26th, 2010

INNERSHIV: MAKE INNERHTML + HTML5 WORK IN IE

(Various Shivs)

Via JD Bartlett comes HTML5 innerShiv for IE. Before innerShiv, the mass would not impact in IE:

HTML:

var s = document.createElement(’div’);
s.innerHTML = "<section>Hi!</section>";
document.body.appendChild(s);
 

For example, let’s envisage we hit whatever CSS that defines the mass for the HTML5 elements footer, header, and section:

CSS:

footer, header, country {
  border:1px solid #ccc;
  display:block;
  padding:10px;
}
 

Unfortunately, modify if you are using digit of the tricks to obligate IE to care with HTML5 elements shivs don’t impact when handling with innerHTML before an surroundings is appended to the DOM:

However, the shiv doesn’t impact in cyberspace Explorer when an element’s noesis is additional with innerHTML before existence appended to the document. That’s a ordinary ingest case, and perceptible in libraries same jQuery when you essay to attach or alluviation (etc.) HTML5 content

Some warning intense JQuery cipher that runs into this problem:

JAVASCRIPT:

$(‘#example-1′).append(“<section><header><h3>Example 1:\
  a busted section</h3></header><p>This country surroundings should\
  hit a black abut same the others. It doesn’t in Internet\
  Explorer. :( </p></section>”
);
 

JD’s accumulation is the resolution to this problem:

innerShiv is a duty which takes your HTML string, adds it to a unseeable document-appended surroundings in IE, and returns an IE-safe writing separate or collection

Now you crapper do the mass to hit things work:

JAVASCRIPT:

$(‘#example-2′).append(innerShiv(“<section><header><h3>\
  Example 2: a successfully styled section</h3></header>\
  <p>This country surroundings should hit a wear abut same the\
  others. And it does! Even in cyberspace Explorer! Yay!.</p>\
  </section>”
));
 

Note that you don’t hit to ingest JQuery to ingest innerShiv.

August 25th, 2010

ADOBE RELEASES WEB FONTS

Last hebdomad Adobe announced they are actuation into the Web Fonts mettlesome in a partnership with Typekit:

For this entry of Adobe Web Fonts, I conceive we’ve prefabricated whatever enthusiastic choices. Everyone knows Myriad and Minion — general sumpter sans line and line typefaces, respectively, which will found to be as multipurpose on the scheme as they hit been in print. saint Phinney’s Hypatia Sans and Carol Twombly’s Chaparral are characteristic and versatile. Adobe Text is Robert Slimbach’s newest organisation which a aggregation of grouping haven’t modify seen still (so farther it has exclusive been available as a entrance goodness for CS5 customers) but I’m destined it module apace found itself as a flexible and sure book typeface, and I’m entertained it module today intend a wider audience.

Richard Lipton’s classic Bickham Script is digit of our most favourite pass typefaces and a distinctive constituent to the Adobe Web Fonts collection. solon of parliamentarian Slimbach’s impact now available for scheme ingest include Adobe GaramondCaflisch ScriptCronos, and the “display” designs for Garamond Premier (based on Claude Garamond’s beautiful Gros Canon type).

Speaking of which: You module encounter that we’ve included optical filler variations for whatever of our typefaces. These designs are carefully crafted to countenance their prizewinning at diminutive sizes (“caption”), medium- to large-size headings (“subhead”), or in headlines and another large sizes (“display”). On the web, these distinctions are inferior resolute than in print, but optical sizes module provide you more options to encounter meet the correct type for your needs — and giving users meliorate options for dustlike printing is what Adobe Originals are every about.

Remember, Adobe Web Fonts hold the aforementioned languages and scripts as their screen counterparts. Most are “Pro” fonts — message their case ordered supports Central dweller languages. Adobe Text, Garamond Premier, uranologist Sans, Minion, and Myriad also hold Hellenic and Cyrillic. (Select the “All Characters” Subset choice in Typekit to ingest them.)

It’s elating to wager Adobe activity scheme fonts!

August 24th, 2010

MOTOROLA PURCHASES 280 NORTH

I don’t commonly place acquisition programme on here, but I meet desired to crow 280 North, who we’ve awninged on here some nowadays and are man members of the Ajax community. 280 North produces the awing Cappuccino language/framework, including the 280 Slides show scheme application. Techcrunch is reporting that Motorola has bought 280 North. From Motorola:

I crapper support that Motorola acquired 280 North early this summer. The dealings provides Motorola with special web-app field talent and profession that module support assist the continuing treatment of Motorola’s covering ecosystem. We conceive 280 North module be device in serving us move to boost the Android ecosystem with original web-based technologies and applications. Terms of the dealings were not disclosed.

Congrats!

[via Evangelist Resig]

August 23rd, 2010

THE CSS3 SONG

Don’t be bummed it’s Monday, ‘cuse the CSS3 Song is here to embolden you up:


How crapper you go criminal with lyrics same this:

CSS3
Web aliveness finished properly
CSS3
Degrading gracefully

I had a dream, an awing dream
People aquatics in the park
On Windows, UNIX and Mac
And their tender alluviation speeds were oh-so-high
No bounteous JavaScript library
Just to exhibit whatever eye-candy

CSS3
Web aliveness finished properly
CSS3
Degrading gracefully

As we wave downbound the superhighway
Did you ever modify think
We could change <marquee> and <blink>?
With meet one, meet digit distinction of code
But it’s unstoppered to abuse
We staleness be certain not to exploitation it

CSS3
Web aliveness finished properly
CSS3
Degrading gracefully

CSS3
Web aliveness finished properly
CSS3
Degrading gracefully
Degrading gracefully
With HTML5, naturally

[via doc Lawson]