Drupal 8 Mobile Initiative

Drupal 8 mobile-first approach that would allow to make great, relevant content to all devices such us smartphone, tablet and desktop etc. Drupal 8 helps to create an elegant and responsive mobile website with great SEO, larger potential audience. Drupal 8 has few default responsive theme, Bartik theme is fully responsive, so you can get responsive theme with Drupal 8 core.

Drupal 8 elements like blocks and menus has default responsive feature which will fit in the screen based on viewport. It has in-build responsive image feature also, Image will scale proportionally based on size of the screen. All the basic and advanced responsive are there in-build in drupal 8.

Twig templating

Drupal 8 uses Twig, Twig compiles templates down to plain optimized PHP code. All theme files will be html.twig instead of .tpl.php.

Example "page.html.twig" and variables in the template use twig syntax.

Drupal 7 templating (PHP)

<?php if ($title): ?>
    <h1 class="page-title"><?php print $title; ?></h1>
<?php endif; ?>

Drupal 8 templating (Twig)

{% if title %}
    <h1 class="page-title">{{ title }}</h1>
{% endif %}