background preloader

Web

Facebook Twitter

What the heck is the event loop anyway? – Philip Roberts. HTML5 Mastery: Constraint Validation. HTML5 gives us a lot of really good advantages. Besides the usual suspects like the unified error model, the introduction of new semantic tags or a simplified document type, one of the greatest improvements is constraint validation for forms.

What would the web be without forms? Constraint validation tries to improve the usability of web forms. Instead of sending a form to the server, which will then be evaluated as invalid, returned to the client and finally adjusted by the user, the browser can directly inform the user about the possibility of invalid values. This not only reduces network communication, but also improves the usability of the page. It is important to remark that constraint validation cannot replace server-side validation. We will start our journey with non-validating forms. The most classic version of an HTML form is one that does not come with any client-side validation logic.

In principle, the browser has two options: Change the action to carry the form’s values.

ReactJS

How do you judge a javascript programmer by only 5 questions. How do JavaScript closures work? Relative Import with SASS ← jefffabiny. While working with SASS and the Scout application I ran into a small problem. I was tasked with a color scheme change for the Concrete5 template were building. This of course is not that big of an issue, but what kind of programmer would I be if I didn’t abstract all repetitive tasks into single, easily manageable occurrence? At the time, all my colors were explicitly defined with hexadecimal codes in my CSS. My first thought was to create color variables and throw them at the top of each SASS file I would need them in.

The first step was to create the file, and it looks like this: I put this at the project root directory. @import '../../../../../.. This is ugly. I attempted to have multiple @import statements, but files/paths that don’t exist throw an error in the SASS compiling. The final product looked like this: Each individual .scss file: @import 'color_constants'; The config-template.rb tracked by Git: # Rename this file to config.rb.

CSS super power

AngularJS. Utilitarian libraries. Local Storage. You are here: Home Dive Into HTML5 Diving In Persistent local storage is one of the areas where native client applications have held an advantage over web applications. For native applications, the operating system typically provides an abstraction layer for storing and retrieving application-specific data like preferences or runtime state. These values may be stored in the registry, INI files, XML files, or some other place according to platform convention. If your native client application needs local storage beyond key/value pairs, you can embed your own database, invent your own file format, or any number of other solutions. Historically, web applications have had none of these luxuries. Cookies were invented early in the web’s history, and indeed they can be used for persistent local storage of small amounts of data. What we really want is a lot of storage space on the client that persists beyond a page refresh and isn’t transmitted to the server Introducing HTML5 Storage HTML5 storage:

Google Font API. Google recently debuted a new web service called the Font API. Google's Font API provides developers a means by which they may quickly and painlessly add custom fonts to their website. Let's take a quick look at the ways by which the Google Font API can be used. Font Request Format Many of the fonts within Google's font archive are available not only in standard format but also in Italic, Bold, and Italic Bold. The format for requesting a given font variant is: Here are a few examples of requesting each variant: Cantarell Cantarell:bold Cantarell:italic Cantarell:bolditalic Now let's see how we can include special fonts in our page and use these them.

The CSS Stylesheet Method The stylesheet gets included into the page like any other stylesheet would be. Take a moment to examine the stylesheet from Google: The @font-face method of font embedding is Google's chosen method. You may also embed the font within the "style" attribute of a given element: I t doesn't get more painless than that.

Web Mobile

Mobile Site Optimization. Backbone. Bootstrap. JS. Typescript. Webstorm Experience. Upload files FileAPI. Communication C/S. Demo HTML5. Viewport for mobile browser.