background preloader

SVG Icons FTW

SVG Icons FTW
Despite the growing popularity of SVG, its time around and excellent browser support, we have a lack of good vector icon approaches. It's time to fill this gap and use SVG as icons in our web projects. A lot of great methodologies and principles arose making our CSS more and more modular, structured and flexible. But fortunately we’ve had icon fonts coming to the rescue. It’s plain text, which means they can be gzipped to up to 95%It’s a vector graphic, which means it can be scaled to any size making it Retina readyIt’s one source file, which means a minimum of HTTP requestsIt’s a font – you can easily change size, color, shape and add a shadowBrowser support for older browsers possible (e.g. Unfortunately, icon fonts have some limitations like being monochrome (still) and we can only use styles for texts like e.g. a text shadow. So today we will explore the possibilities of using SVG icons instead. Using SVG icons Currently, SVG looks more like a retired super hero. Getting started

Applying App Design Concepts to Website Design Should we let app design guide us more in website design? In this article we'll explore how app design concepts can help rethink the planning and design of websites for a better user experience. If you ever look up best practices, design techniques, or trends in application design, you’ll notice something significant: there seems to be a much greater focus on what is most important, that being the user experience, usability, and functionality. We see this stressed every now and then for that in web design too, but how often is it done? Web design should not only be about making things look good, but also about good user experiences and a website’s goals. A Very Well Planned Out Layout If we’re talking about mobile apps or tablet apps, layout is extensively planned out ahead of time — usually to make efficient use of space. The same principle should apply to the Web right? I’m not against pattern libraries. Interactivity & User-Centric Design What makes an app, an app? Mobile First Conclusion

Document Structure – SVG 1.1 (Second Edition) Contents 5.1 Defining an SVG document fragment: the ‘svg’ element 5.1.1 Overview An SVG document fragment consists of any number of SVG elements contained within an ‘svg’ element. An SVG document fragment can range from an empty fragment (i.e., no content inside of the ‘svg’ element), to a very simple SVG document fragment containing a single SVG graphics element such as a ‘rect’, to a complex, deeply nested collection of container elements and graphics elements. An SVG document fragment can stand by itself as a self-contained file or resource, in which case the SVG document fragment is an SVG document, or it can be embedded inline as a fragment within a parent XML document. The following example shows simple SVG content embedded inline as a fragment within a parent XML document. This example shows a slightly more complex (i.e., it contains multiple rectangles) stand-alone, self-contained SVG document: <? ‘svg’ elements can appear in the middle of SVG content. 5.1.2 The ‘svg’ element ‘svg’ <? <?

Techniques for Responsive Typography When it comes to responsive type on the web, there's more to do than just resizing the text's container and having the text reflow inside of it. This in-depth article covers various techniques for making text responsive. One of the most important aspects of responsive web design is responsive typography. When it comes to responsive type on the web, there’s more to do than just resizing the text’s container and having the text reflow inside of it. First Things First: Making text accessible Before getting into techniques to resize text on different screen sizes, you need to make sure that your text is legible and accessible by using sufficient color contrast and an easily readable font to avoid turning your page’s content into an eye sore. If text is not legible to begin with, then no matter how much you resize it, you’ll still end up with illegible text, which is of course the opposite of what you’re setting out to achieve in the first place. Choose A Readable Font Face Resources:

Understanding SVG Coordinate Systems and Transformations (Part 1) — The viewport, <code>viewBox</code>, and <code>preserveAspectRatio</code> SVG elements aren't governed by a CSS box model like HTML elements are. This makes positioning and transforming these elements trickier and may seem—at first glance—less intuitive. However, once you understand how SVG coordinate systems and transformations work, manipulating SVGs becomes a lot easier and makes a lot more sense. In this article we're going to go over three of the most important SVG attributes that control SVG coordinate systems: viewport, viewBox, and preserveAspectRatio. This is the first in a series of three articles covering the topic of coordinate systems and transformations in SVG. For the sake of visualizing the concepts and explanations in the article even further, I created an interactive demo that allows you to play with the values of the viewBox and preserveAspectRatio attributes. Check the interactive demo out. The demo is the cherry on top of the cake, so do make sure you come back to read the article if you check it out before you do! The SVG Canvas The viewport

Elastic Stack: Elastic Dragging Interaction ElastiStack is a little script that let's you navigate through a stack of items by dragging away the first one. It comes with an elastic touch meaning that when dragging the top-most item, the other ones will follow as if they were connected elastically. When reaching a certain distance, the dragged item will release itself and the next item will pop out. View demo Download source Today we’d like to share a little script that lets you navigate through a stack of thumbnails with an elastic touch. Three items are visible initially, the main one and the the two next ones, which can be seen because we’ve added some perspective to the item list and translated the two items on the Z-axis. The HTML structure that we are working with is the following: When the first item gets dragged, we’ll want it to bounce back if it’s dropped too close to the stack. And this is how you can initialize the script: The beautiful illustrations used in the demo are by talented artist Guzk.

Text in SVG (Font, Anchor, Alignment) | apike.ca | Science, Technology, Programming and Anime This page deals with the typography attributes of text. The text tags are described on the linked page. SVG supports many of the more esoteric aspects of typography. Since the W3C is responsible for HTML, CSS and SVG, it is perhaps not surprising the level of sharing going on here. Font Styling The basic font attributes are quite similar in SVG and HTML. Commonly used values for font-family: Arial, Helvetica, sans-serifTahoma, Geneva, sans-serif'Times New Roman', serif Anchors and Alignment The anchor point is the x and y position defined by the text tag. The many options for the attribute alignment-baseline alter the positioning of the baseline with respect to the anchor point. Example 1. Combining 'middle' for both options is convenient for positioning text centered upon a spot regardless of size and length. Code 1. CSS/Attributes To style text using presentation attributes, use XML's attribute format (attribute="value"). The two 'text' tags are equivalent.

CSS Overlay Techniques There are several techniques for creating overlays: from using an absolutely positioned element to outlines and pseudo-elements. In this article we are going to explore each technique's styles with their pros and cons. Design patterns, a set of best practices and techniques that aim to solve some of the most common design “problems”, are usually presented in the context of design principles. We can decide intelligently when to keep the user on the page and model his process. Lightweight overlays can be used for asking questions, obtaining input, introducing features, indicating progress, giving instructions, or revealing information. When the user interaction is only accepted in the pop-up modal, a Lightbox effect is usually applied and the rest of the page is dimmed, indicating its inactivity. The aim of this tutorial is to introduce you to several techniques that can be used to create this dimmed overlay with CSS, and determine the pros and cons of each technique as we go over them.

SVG Viewport and View Box The viewport and view box of an SVG image set the dimensions of the visible part of the image. The Viewport The viewport is the visible area of the SVG image. An SVG image can logically be as wide and high as you want, but only a certain part of the image can be visible at a time. The area that is visible is called the viewport. You specify the size of the viewport using the width and height attributes of the <svg> element. This examples defines a viewport that is 500 units wide and 300 units high. Coordinate System Units If you do not specify any units inside the width and height attributes, the units are assumed to be pixels. If you prefer to use different units than pixels, you can. The units you set on the <svg> element only affects the size of the <svg> element (the viewport). Here is an example that shows an <svg> element with one set of units, containing shapes with their own units set: The <svg> image has its units set in cm. Here is the resulting image. The View Box xMaxYMax xMidYMid

Medium-Style Page Transition An article on how to achieve Medium’s next page transition effect—an effect that can be seen by clicking anywhere on the “Read Next” footer at the bottom of the page. This effect is characterized by the lower article easing upward as the current article fades up and out. View demo Download source Medium, a blogging platform which has gained popularity over the past several months, has one of the smoothest, most polished user interfaces on the web. As you click and touch the interface, you’ll notice that great attention has been paid to transitions, white space, color, fonts, imagery, and iconography. In this article, I will outline how to achieve Medium’s page transition effect—an effect that can be seen by clicking anywhere on the “Read Next” footer at the bottom of the page. In this demo, the page first loads with barebones HTML, which we’ll use as a template that will be filled in later with Ajax’d-in data. Once the content is Ajax’d-in, the <body> looks something like so: Javascript

Techniques for Creating Textured Text In this article we'll explore all the current techniques for creating image or texture filled text and show you how to apply them. View demo Download source In this article we’re going to explore several techniques that can be used to create textured text or apply a background to text. Please remember that some of the techniques covered in the article are experimental with very low browser support, and may not be the best technique to use when you’re building real projects that need wide browser support. I’ve included a screenshot for each demo, the link to the demo in the end of each technique. You can also click the screenshot to see the respective demo. Applying an Image Background to Text Using -webkit-background-clip: text We’re going to start with the CSS background-clip property and use it to get the following result: The CSS background-clip property determines an element’s background painting area, which is the area within which the background is painted. Check out demo 7 in action.

"Look Inside" Book Preview with BookBlock A "look inside" book preview with BookBlock. A concept for book showcases or online book stores that shows a grid of books with the options to view the details and to look inside of the book, opening the BookBlock in fullscreen and allowing for a 3D page navigation. View demo Download source There is something really fascinating about (real) books. Although we live in times where everything is digitalized by now, there is really nothing like picking up a real book and browsing through the pages. Many layouts on the web try to transmit that feeling by creating book-like experiences. Please note that this is just a proof-of-concept and might not work properly in older browsers. For the book grid we use figures and this is how it looks: When we click on “view details”, we rotate the book in 3D and move it to the left side, allowing for the details to slide in from the right: Once “look inside” is clicked we perform a series of animations on the book, its cover and the BookBlock. Credits

Related: