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
october cms

October CMS, built on top of Laravel, is beautiful, clever and on the way to be the new #1 CMS

Do you remember when you tried to edit one line of code inside TYPO3 or Contao ? And the extreme

git-php-deployment

Extremely simple deployment with PHPloy

Let me ask you a question: How mad do you get when you have to remember which files you edited

Install Laravel 4 on Ubuntu 12.04 LTS (a how-to tutorial)

Laravel 4 is the big thing. Every blog talks about it, nearly every developer-twitter-account mentions it. Hmm, looks like everybody

php

How to install sqlite driver for PHP in Ubuntu & Debian

It’s easy to install sqlite (for usage with PHP): sudo apt-get install php5-sqlite This will also restart apache (on modern

Serious hard-to-fix bug in OAuth and OpenID discovered, lots of major sites affected

Just a short notice rather than a real article, full story later (I need to check the facts): Several sources

Going node.js at Netflix (Slides by Micah R of Netflix)

It’s awesome how node.js takes over the absolute AAA-level corporate world. Note that node.js is still an early alpha product

A collection of beautiful ajax loaders / spinners in pure .svg / CSS

No images used, pure svg/css and scaleable. Bookmark now! Brent Jackson‘s ajax spinner / loader library on the project’s demo

Experimenting with HHVM at Etsy (Link)

Extremely interesting blog post of Etsy on how they try out HHVM / HipHop: https://codeascraft.com/2015/04/06/experimenting-with-hhvm-at-etsy/

laracon-2014-eu-amsterdam

Laracon 2013 – Jordi Boggiano: In Depth Composer (47min video)

More videos of 2013’s and 2014’s Laracon events from US and EU on their Youtube channel.

phpstorm-8

Ignore .idea folder from git in PHPStorm

By default (?) PHPStorm will create a hidden folder named .idea directly within your project, containing user-specific stuff like chosen

1/4

Categories

Search

steam sale coupon voucher
-30% to -90% on Steam and Origin
Dangerous Performance Myths in the Web (video talk by Thomas Lohner, PHPUG Latvia)
php uk conference
PHP Opcache Explained by Julien Pauli (video from PHP UK Conference 2014)
composer
How to install Composer on Windows 7 / 8 or Ubuntu
Increase your HTML / CSS coding speed with EMMET
phpstorm 7.0 php
How to install GitHub’s, NetBeans’s and Sublime2’s syntax highlighting code colours theme in PHPStorm 6/7
cheap cloud server php
DigitalOcean rolls out interesting feature: Transfering server snapshots directly to the client’s account
phpstorm-8
Killer-feature in PHPStorm: Search everywhere
This picture shows the icon of blindness
How blind people use websites (video with Sina Bahram, blind accessibility researcher)
php
“Belt” adds very clever everyday functions to PHP, comes with JavaScript naming styles and eventually solves the needle/haystack problem
js javascript
How JavaScript really works – An introduction into the JavaScript call stack by Philip Roberts (20min video)
DigitalOcean coupon voucher 50
Only today: $50 coupon for DigitalOcean SSD VPS / hosting
the-php-login-project
How to install php-login-minimal on Ubuntu 12.04 LTS
Frontend Ops Conf 2014 – Sarah Goff-Dupont: Git, Continuous Integration and Making It Pretty (31min video)
This is an experimental advertisement

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