agoat/contao-autoprefixer

Contao 4 autoprefixer plugin

Installs: 445

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:contao-bundle

1.4.0 2021-01-20 12:05 UTC

This package is auto-updated.

Last update: 2024-10-23 01:08:33 UTC


README

Version License Downloads

About

Forget about vendor prefixes. Just write pure (S)CSS. This plugin adds vendor prefixes (depending on your settings) to CSS rules using values from Can I Use.

Write your CSS rules without vendor prefixes:

:fullscreen a {
    display: flex
}

Autoprefixer will use the data based on current browser popularity and property support to apply prefixes for you. You can try the interactive demo of Autoprefixer.

:-webkit-full-screen a {
    display: -webkit-box;
    display: flex
}
:-moz-full-screen a {
    display: flex
}
:-ms-fullscreen a {
    display: -ms-flexbox;
    display: flex
}
:fullscreen a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex
}

Autoprefixer uses Browserslist, so you can specify the browsers you want to target in your project by queries like last 2 versions or > 5%.

See Browserslist docs for queries, browser names, config format, and default value.

Or visit the Autoprefixer project page for more informations.

Requirements

The autoprefixer tool used by this plugin is written in Javascript and called via node. Therefore, Node.js has to be installed on the server.

Visit https://nodejs.org to see how to installing Node.js.

Install

Contao manager

Search for the package and install it

agoat/contao-autoprefixer

Managed edition

Add the package

# Using the composer
composer require agoat/contao-autoprefixer

Registration and configuration is done by the manager-plugin automatically.

Standard edition

Add the package

# Using the composer
composer require agoat/contao-autoprefixer

Register the bundle in the AppKernel

# app/AppKernel.php
class AppKernel
{
    // ...
    public function registerBundles()
    {
        $bundles = [
            // ...
            // after Contao\CoreBundle\ContaoCoreBundle
            new Agoat\AutoPrefixerBundle\AgoatAutoPrefixerBundle(),
        ];
    }
}