Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

[Feature request] Option for adding prefix/suffix to custom property names #217

Open
SevenOutman opened this issue Apr 17, 2020 · 0 comments

Comments

@SevenOutman
Copy link

SevenOutman commented Apr 17, 2020

I'm writing styles for a react component library and we're going to adopt custom properties. One thing I'm worrying is that global custom properties defined in my library may pollute those in the user application. One possible solution is adding a unique prefix for every custom properties in my library, e.g. --btn-bg -> --rs-btn-bg. So I wonder if I can have this option that allow adding prefixes/suffixes.

API Proposal

renameProperties: { test: RegExp, handler(originalName: string) => string }

Allows user to rename properties that matches the pattern they want.

prefix: string/suffix: string

Short for predefined renaming rules with '*' test pattern.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant