background preloader

Html5

Facebook Twitter

Pure CSS3 Star Wars Lightsaber Checkboxes. Front-end Code Standards & Best Practices. Overview This document contains guidelines for web applications built by the Creative Technology (front end engineering) practice of Roundarch Isobar. It is to be readily available to anyone who wishes to check the iterative progress of our best practices. This document's primary motivation is two- fold: 1) code consistency and 2) best practices. By maintaining consistency in coding styles and conventions, we can ease the burden of legacy code maintenance, and mitigate risk of breakage in the future.

By adhering to best practices, we ensure optimized page loading, performance and maintainable code. Pillars of Front-end Development ◊ General Practices ◊ Indentation ◊ For all code languages, we require indentation to be done via soft tabs (using the space character). Readability vs Compression ◊ We prefer readability over file-size savings when it comes to maintaining existing files. The first component of any web page is the tag-based markup language of HTML . Template ◊ Doctype ◊ HTML5 Doctype. An analogue clock using only CSS. Having read the blurb around Safari’s CSS transitions I opted to familiarize myself with a quick project — the aim of which was to create a functional, CSS only, analogue clock.

An analogue clock using only CSS

Result Experiment: CSS Analogue Clock Experiment works in Safari 4 Beta and Google Chrome. A working clock that optionally resorts to JavaScript to grab the current time (can be achieved by other means). Exper­i­ment updated. Transforms are now widely sup­ported. How To Before getting into the nitty gritty I created four images, a clock face and three transparent PNG hands (seconds, minutes and hours), ensuring that each of these were the same size so that when overlayed their centres would align. The magic that rotates the clock’s hands comes via two WebKit specific CSS properties, -webkit-transition (documentation) and -webkit-transform (documentation). Grab the current time Although the animation works beautifully, CSS alone is not capable of obtaining the current time. Animatable: One property, two values, endless possiblities. Box-shadow From: 0 0 black To: 0 150px 10px -50px rgba(0,0,0,.5)

Animatable: One property, two values, endless possiblities

Let Your Content Do the Talking: Fullscreen API. Most browsers have the ability to enter a fullscreen or kiosk mode for a while now.

Let Your Content Do the Talking: Fullscreen API

Basically, the browser's chrome UI gets out of the way, and the content takes over. For apps installed from the Chrome Web Store, it's even been possible for users to manually configure an app to run fullscreen when it's opened from the New Tab Page. Manual fullscreen is good. Programmatic fullscreen is better! The Fullscreen API allows web apps to programmatically tell any content on the page to enter the browser's fullscreen viewing mode, from JavaScript. If you want to skip the details, here's a demo: So how does the API work? Div.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); div.mozRequestFullScreen(); div.msRequestFullscreen(); div.requestFullscreen(); // standard Then to exit fullscreen, the document exposes a method for that: document.webkitExitFullscreen(); document.mozCancelFullscreen(); document.msExitFullscreen(); document.exitFullscreen(); Note: the exitFullscreen() is the spec version.

Jhollingworth/bootstrap-wysihtml5. Bootstrap-wysihtml5. When can I use... Support tables for HTML5, CSS3, etc. - Recommendation * Usage stats: Global Support: Partial support: Total: Method of displaying basic Vector Graphics features using the embed or object elements Show all versions Firefox Chrome Safari Opera iOS Safari Opera Mini Android Browser Blackberry Browser Current Near future Farther future Notes Known issues (0) Resources (6) Feedback - Working Draft Method of displaying SVG images in HTML using <img> Known issues (2) Resources (3) Partial support in Safari 3.2 refers to buggy behavior with certain SVG images. - Candidate Recommendation Method of using SVG images as CSS backgrounds Resources (2) Partial support in iOS Safari refers to buggy behavior.

Method of using SVG tags directly in HTML documents. Method of using SVG transforms, filters, etc on HTML elements using either CSS or the foreignObject element Resources (4) Partial support refers to lack of filter support or buggy result from effects. No known issues.