mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 07:25:12 +00:00
preserve ti-fw
classes for icons - fixes #580
I thought that `ti-fw` was mostly useless, but it turns out that: - it affects the alignment of icons in many places - it's set separately in some places (e.g. `packages/frontend/src/ui/_common_/navbar.ts` has `<i class="ti-fw" :class="[$style.itemIcon, navbarItemDef[item].icon]"></i>`) so we have to keep it around.
This commit is contained in:
parent
f9a09b0358
commit
ded459304e
1 changed files with 3 additions and 4 deletions
|
@ -5,10 +5,9 @@ function iconsReplace(opts: RollupReplaceOptions) {
|
|||
return pluginReplace({
|
||||
...opts,
|
||||
preventAssignment: false,
|
||||
// only replace these strings at the start of strings, remove a
|
||||
// `ti-fw` it if happens to be just after, and make sure they're
|
||||
// followed by a word-boundary that's not a dash
|
||||
delimiters: ['(?<=["\'`])', '(?: ti-fw)?\\b(?!-)'],
|
||||
// only replace these strings at the start of strings, and make
|
||||
// sure they're followed by a word-boundary that's not a dash
|
||||
delimiters: ['(?<=["\'`])', '\\b(?!-)'],
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue