UNPKG

purgetss

Version:

A package that simplifies mobile app creation for Titanium developers.

74 lines (59 loc) 2.16 kB
# What's new in v3.1.2 - [What's new in v3.1.2](#whats-new-in-v312) - [Added Bootstrap Icons v 1.8.0](#added-bootstrap-icons-v-180) - [Add it to your project](#add-it-to-your-project) - [Basic Usage](#basic-usage) - [CommonJS Module](#commonjs-module) ## Added Bootstrap Icons v 1.8.0 [Bootstrap Icons v1.8.0](https://blog.getbootstrap.com/2022/01/31/bootstrap-icons-1-8-0/?fbclid=IwAR1AOTtXafyXVAENckR-rbmkLAdG6KetGeBmIGjW_-is9WTXgWaybVS85YY) is here with over 140 new icons, including dozens of new heart icons ready for Valentine’s Day and dozens of filetype icons. We’re now at almost 1,700 icons and is once again our second largest release. ### Add it to your project To add it to your project, use the following command: ```bash > purgetss fonts --vendor="boostrapicons" # alias: > purgetss f -v=bi ``` ### Basic Usage Use it like any other icon font. ```xml <Alloy> <Window> <ScrollView class="vertical"> <!-- Bootstrap Icons --> <Label class="mt-2 text-gray-700" text="Bootstrap Icons" /> <Label class="text-xl text-blue-500 bi bi-house-fill" /> <Button class="w-10 h-10 my-1 text-xl text-white bg-blue-500 rounded bi bi-house-fill" /> </ScrollView> </Window> </Alloy> ``` ```css // Purge TSS // Created by César Estrada // https://github.com/macCesar/purgeTSS // Main styles 'Window': { backgroundColor: '#ffffff' } '.bg-blue-500': { backgroundColor: '#3b82f6' } '.rounded': { borderRadius: 4 } '.text-xl': { font: { fontSize: 20 } } '.h-10': { height: 40 } '.vertical': { layout: 'vertical' } '.my-1': { top: 4, bottom: 4 } '.mt-2': { top: 8 } '.text-white': { color: '#ffffff' } '.text-gray-700': { color: '#374151' } '.text-blue-500': { color: '#3b82f6' } '.w-10': { width: 40 } // Bootstrap Icons styles '.bi': { font: { fontFamily: 'bootstrap-icons' } } '.bi-house-fill': { text: '\uf424', title: '\uf424' } ``` ### CommonJS Module You can use the `--modules` flag to copy the corresponding CommonJS module into `./app/lib/` folder. ```bash > purgetss fonts --modules > purgetss fonts --modules --vendor="bootstrapicons" # alias: > purgetss f -m > purgetss f -m -v=bi ```