PHPackages                             loki/magento2-css-utils - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. loki/magento2-css-utils

ActiveMagento2-module[Templating &amp; Views](/categories/templating)

loki/magento2-css-utils
=======================

CSS class and style utilities for Magento 2 PHTML templates

1.0.5(4mo ago)17.2k↓18.1%110OSL-3.0PHPCI passing

Since Aug 20Pushed 4mo agoCompare

[ Source](https://github.com/LokiExtensions/Loki_CssUtils)[ Packagist](https://packagist.org/packages/loki/magento2-css-utils)[ Fund](https://www.paypal.me/yireo)[ GitHub Sponsors](https://github.com/yireo)[ RSS](/packages/loki-magento2-css-utils/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (10)

Loki\_CssUtils
==============

[](#loki_cssutils)

**This Magento 2 module is part of the core packages for Loki Components, as is being used by the Loki Checkout, Loki Admin Components and Loki Theme for Luma. This module allows a Magento 2 template to call `$css()` and `$style()` to generate CSS classes and CSS styles, that are easily overwritten via XML layout and/or PHP parser classes - without template overrides.**

Installation
------------

[](#installation)

Install this package via composer:

```
composer require loki/magento2-css-utils
```

Next, enable this module:

```
bin/magento module:enable Loki_CssUtils
```

Basic usage
-----------

[](#basic-usage)

Add the CSS utility to the PHP-section of your PHTML template:

```
