An open API service indexing awesome lists of open source software.

https://github.com/mage-os-lab/module-theme-uikit

Utilities for the Mage-OS/Magento UIkit theme
https://github.com/mage-os-lab/module-theme-uikit

mage-os mage-os-extension magento magento2 magento2-extension magento2-module uikit uikit-framework uikit3

Last synced: 6 months ago
JSON representation

Utilities for the Mage-OS/Magento UIkit theme

Awesome Lists containing this project

README

          

# MageOS UIkit Theme Module

**Set of utilities for the Mage-OS/Magento UIkit theme**

See also [mage-os-lab/theme-frontend-uikit](https://github.com/mage-os-lab/theme-frontend-uikit)

---

## Overview

The **UIkit Theme** module allows svg assets compilation inside static contents, removes unused css UIkit3 classes ( "uk-" prefixed classes) and preload fonts.

## How it works

### Fonts preload

Use "head.asset.preload" layout block to preload fonts and assets inside default_head_blocks.xml files
```
...





js/uikit/uikit-icons.min.js

type
script


crossorigin
false



fonts/Montserrat/Montserrat-Light.woff2

type
font/woff2


crossorigin
false


...


```

### UIkit CSS classes safelist

To compile UIkit css classes inside the css files you need to specify file paths to scan into uikit_whitelist.xml files:
```


app/design/frontend/Mage-OS/UIkit
vendor/mage-os/theme-frontend-uikit

```
Or compile a safelist of classes if any phtml/html/xml file expose them
```


uk-button
uk-button-primary

```

## Installation

1. Install it into your Mage-OS/Magento 2 project with composer:
```
composer require mage-os/module-theme-uikit
```

2. Enable module
```
bin/magento setup:upgrade
```

Make sure to also install [mage-os-lab/theme-frontend-uikit](https://github.com/mage-os-lab/theme-frontend-uikit)

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## License

The MIT License (MIT). Please see [License File](LICENSE) for more information.