From 21917a093fe91894b82a30e5f54e066cfe217ca4 Mon Sep 17 00:00:00 2001 From: Adam Piontek Date: Wed, 4 Aug 2021 11:11:15 -0400 Subject: [PATCH] fix README --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 89738c6..63583d4 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,9 @@ Images placed in `assets/images` will be copied to `dist/images` -- however, SVG ```js import '../raw/rdnyc-logo.svg'; ``` -This will output an optimized version to `dist/images` +This will output an optimized version to `dist/images` with `svg-` prefix; these can be used per below: -SVG icons can be pulled into a sprite file (output to `dist/images/icon-sprites.svg`). For this to work, `@import` them in main.js (see examples). Sprite names are set by the config in `webpack.config.js` with prefixes supported for some icon packs ([@mdi/svg](https://www.npmjs.com/package/@mdi/svg), [bootstrap-icons](https://www.npmjs.com/package/bootstrap-icons), [heroicons](https://www.npmjs.com/package/heroicons)). They can then be used for menus (put `icon--` in the class for a menu item), or used in the theme php files with the `svg_icon_use($icon_name, $div_class)` function from `custom-functions.php` to get a div containing the correct svg use tag. `$div_class` should usually include `baseline` for proper layout. - -#### Including +#### Using optimized SVGs SVG images can be implemented two ways: