Logo
  • PHP
    • HipHop / HHVM
    • Modern PHP
    • PHPStorm
    • LAMP
    • Laravel
    • Composer
    • PDO
  • JavaScript
    • node.js
    • AngularJS
  • CSS
    • SASS
    • “CSS4” (CSS level 4)
  • HTML
  • Git
  • LAMP
  • Vagrant
  • UI / UX
  • Architecture of …
  • Off-Topic
With ♥ from Berlin
November 15, 2013
Chris
CSS, HTML5, Local Development, PHPStorm
Comments Off on Increase your HTML / CSS coding speed with EMMET

Increase your HTML / CSS coding speed with EMMET

PreviousNext

Codeninja.com just published a very interesting article about the excellent free code-completion/code-generation tool EMMET, which allows you to create huge HTML or CSS constructs by simple typing some characters. Let’s have a look:

When using EMMET (usually a seamless integrated plugin in your favourite IDE/coding tool) you can simply type:

ul>li*5

and press TAB (or ENTER or whatever is defined as the EMMET-action-key) to create something like

<ul> 
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
</ul>

Cool ! But that’s just VERY basic. You can put variables and “counter values” in there, like:

ul#nav>li*5>a{Page $}

which will create

<ul id="nav">
    <li><a href="">Page 1</a></li>
    <li><a href="">Page 2</a></li>
    <li><a href="">Page 3</a></li>
    <li><a href="">Page 4</a></li>
    <li><a href="">Page 5</a></li>
</ul>

Create a full font-face construct with

@f+

When editing the result, EMMET will automatically sync the values of the “Filename”:

@font-face { 
    font-family: 'FontName'; 
    src: url('FileName.eot'); 
    src: url('FileName.eot?#iefix') 
    format('embedded-opentype'), 
    url('FileName.woff') format('woff'), 
    url('FileName.ttf') format('truetype'), 
    url('FileName.svg#FontName') 
    format('svg'); 
    font-style: normal; 
    font-weight: normal; 
}

 

There are hundreds of commands like that, and you can create your own. This comes extremely handy when writing a lot of CSS, especially when using a lot of browser vendor fixes, like -webkit… !

PHPStorm users: EMMET is integrated into PHPStorm 6/7 by default. Interesting side-fact: There’s a code-completion for PHP too, built-in into PHPStorm, but more on that in another article.

List of EMMET commands:

http://docs.emmet.io/cheat-sheet/

List of supported IDEs and coding tools

http://emmet.io/download/

Demo Video

 

code completionemmetPHPStormzen coding
Share this

How to get a single table out of a massive MySQL .sql database backup file (mysql dump splitter)

Imagine the following situation: Somebody backs up an entire MySQL database – a very large one – with common tools.

The New Era of JavaScript (28min conference talk, Jack Franklin, 2013)

Hacked french TV channel exposed passwords in TV interview (video, screenshots, links)

This week a major french TV networks was hacked (Article on CNN #1, #2), resulting in 11 channels being completely

css3-chrome-font

Google rolls out Chrome 37, finally fixes horrible font-rendering

Google has rolled out Chrome 37 today, a legendary milestone that fixes one of the most annoying “bugs” in frontend

set up a local virtual machine for development with vagrant and puphpet / puppet (and ubuntu, linux, php, apache, mysql)

A list of downloadable Vagrant boxes (CentOS 5.9 / 6.4, Ubuntu 12 / 13, Debian 6 / 7 / 7.1 / 7.2)

Offical boxes (directly from Vagrant) Ubuntu 12.04 LTS 32-bit http://files.vagrantup.com/precise32.box Ubuntu 12.04 LTS 64-bit http://files.vagrantup.com/precise64.box   Boxes from puppetlabs.com Seems

php

PHP 5.7 gets refactored core, is 10%-30% faster than PHP 5.5! Wow!

What an announcement! The awesome PHP core guys have refactored the Zend Engine (which drives PHP) and could successfully speed

vagrant

How to setup a (or multiple) server/LAMP-stack inside a virtual machine for local development with Vagrant and PuPHPet

You know this: You need a new server, something to develop on, something to test on, something to put your

How Snapchat wants to earn money (by establishing vertical videos)

Snapchat is worth 15-19 billion dollars. An insane number, making everybody ask: How the hell is this possible, why has

-45% (or even 50%) off on DesignWall today

Get 45% off on DesignWall.com with this coupon code: AMTHUNTER45 It’s also possible to get off 50% by taking part

pdo-debug

Debug PDO with this one-line function. Yeah!

Update: This article is a little bit older, the tool has changed gently. Everthing this article still works exactly like

1/4

Categories

Search

phpstorm-8
Killer-feature in PHPStorm: Search everywhere
php
Somebody is writing a compiler for PHP, compiles down to machine code, outperforms HHVM
github-logo-octocat
GitHub rolls out .PSD diff and viewing
Install MINI in 30 seconds inside Ubuntu 14.04 LTS
the-php-login-project
How to install php-login-minimal on Ubuntu 12.04 LTS
vagrant
A super-simple Vagrant LAMP stack bootstrap (installable with one command)
MINI, an extremely simple barebone PHP application
Increase your HTML / CSS coding speed with EMMET
battlefield-3-free
Electronic Arts / Origin offers Battlefield 3 for free (limited promo action) !
8 awesome pure CSS spinner / loader
microsoft-windows-azure-cloud-hosting
Microsoft’s Azure platform gives away high money prizes for “testing out” their cloud services
PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)
zend framework 3
First view on Zend Framework 3 by Matthew O’Phinney
php
Must-read PHP blog: PHPweekly.com
the-php-login-project
How to install php-login-one-file on Ubuntu 12.04 LTS

Tags

apache bash centos composer conference coupon CSS debian fonts framework git GitHub hack HHVM HipHop HTML HTML5 IDE JavaScript JS LAMP laravel linux mod_rewrite MVC MySQL Nginx optimization PHP PHP 5.5 PHP 5.6 phpmyadmin PHPStorm security server SSD Ubuntu UI UX vagrant video virtual machine voucher VPS wordpress
Side-Project: Wordle-Solver:
www.wordle-helper.info

Pages

  • Privacy Policy