
CSS you can get excited about in 2015 CSS is a constantly evolving language, and as the new year begins it’s a great time to take a look at some of the emerging features that we can start to experiment with. In this article I’ll take a look at some newer modules and individual CSS features that are gaining browser support. Not all of these are features you’ll be able to use in production immediately, and some are only available behind experimental flags. However you’ll find plenty of things here that you can begin to play with — even if only during a prototyping stage of development. CSS Selectors level 4 The level 3 selectors specification is well implemented in browsers and brought us useful selectors such as nth-child. The negation pseudo-class :not The negation pseudo-class selector :not appears in level 3 but gets an upgrade in level 4. In level 4 of the specification you can pass in a comma separated list of selectors. The relational pseudo-class :has The matches-any pseudo-class :matches CSS Blend Modes Using mix-blend-mode
Using CSS animations - Web developer guide CSS animations make it possible to animate transitions from one CSS style configuration to another. Animations consist of two components, a style describing the CSS animation and a set of keyframes that indicate the start and end states of the animation's style, as well as possible intermediate waypoints along the way. There are three key advantages to CSS animations over traditional script-driven animation techniques: They're easy to use for simple animations; you can create them without even having to know JavaScript. The animations run well, even under moderate system load. Configuring the animation To create a CSS animation sequence, you style the element you want to animate with the animation property or its sub-properties. The sub-properties of the animation property are: animation-delay Configures the delay between the time the element is loaded and the beginning of the animation sequence. animation-direction animation-duration animation-iteration-count animation-name animation-play-state
Rendera - Online HTML5 Editor o testar design responsivo Você já sabe como criar layouts e desenvolver um site responsivo. Na verdade seu projeto já está quase pronto. A última etapa é testar o funcionamento! Existem diversas maneira de garantir a efetividade do layout. A primeira delas, e mais óbvia, é testando ao vivo em diversos dispositivos. Em um mundo ideal você deveria testar o seu layout na maior quantidade de aparelhos, browsers e sistemas operacionais possíveis! Bibliotecas de Dispositivos Se você trabalhar em uma empresa grande (ou tiver grana sobrando) talvez seja bacana investir em um laboratório de testes com uma biblioteca de dispositivos. Device Lab – Rio de Janeiro, BrasilClearleft – Brighton, InglaterraHelsinki Open Device Lab – Helsinque, FinlândiaMobile Portland – Portland, EUAOttawa Open Device Lab – Ottawa, Canadá Através do site Open Device Lab é possível procurar o laboratório mais perto de você. Ou você pode entrar em uma onda faça você mesmo e improvisar a estrutura. Simuladores Screenfly Responsinator Outras ferramentas
Dicas de CSS para impressão Uma das premissas básicas do Design Responsivo é oferecer a melhor experiência do usuário, independente do meio utilizado para acessar a informação. Muitas vezes nos preocupamos muito com smartphones, tablets e outros dispositivos móveis e esquecemos de um tipo de mídia que ainda é essencial para a leitura: o papel. Pois é, o usuário pode sentir a necessidade de imprimir uma página na web por muitos motivos: portabilidade, guardar o conteúdo “offline” ou simplesmente por que – eReaders que me desculpem – é muito mais confortável ler em um papel. Para ilustrar este post eu criei uma pequena demo utilizando como base um outro artigo aqui do Tabless só para ter um conteúdo. Primeiros passos Você pode definir o CSS para impressão de duas maneiras. 1. 2. /*CSS para impressão*/@media print {} Ressetando estilos Dependendo do seu layout atual talvez seja uma boa ressetar algumas propriedades como cor de fundo, margens e espaçamentos para “começar do zero” sua folha de impressão. Estilos de Texto