Open edhebi opened 1 year ago
I also sometimes work with icon fonts but have never written a code point for them manually.
Usually one would generate classes to give proper names that can be used to reference them. And if reuse within CSS is required, one can use pre-processor variables or custom CSS properties.
.icon-base.icon-a::before { content: "\f101"; }
.icon-base.icon-b::before { content: "\f102"; }
.icon-base.icon-b::before { content: "\f103"; }
html {
--icon-a: "\f101";
/* ... */
}
.some-element::before { content: var(--icon-a); }
Adding unmapped or private code points would add a great number of entries which may hurt selection performance. It would be acceptable behind a flag but I currently do not see much of a use case here.
Sorry for the late reply, somehow github didn't send my any notification whatsoever. I'm working with icon fonts but not with web, and I actually need to write those in-line ^^'. This is not a super common usecase I realize, and honestly considering there's no name to look for or anything, this should absolutely be a vscode builtin feature. I can live without it ultimately, do you want me to close the issue ?
Just realized, have you tried the "Insert from Hex Code" command?
Hi!
With vscode not having a direct way to insert a codepoint from its hex, I tend to use this extensions a lot, but it frustratingly
The combination of those two makes it impossible to insert codepoints from the private area, which is fairly annoying when working with say, icon fonts.
Disclaimer: This might already possible and I'm just missing it
Suggestion
I think (1) is reasonable and (2) is reasonable most of the time. I think the right call would be to add a
insert-unicode.include-private-area
options to make those insertable. If there's interest I'm willing to dedicate time to implement it.