css icon indicating copy to clipboard operation
css copied to clipboard

Provide all styles as mixins

Open Airblader opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Following #1582, I was trying to use Primer in an Angular application. However, all Primer CSS styles are exposed as classes only, and that makes it impossible to use these styles in Angular wrapper components while preserving some level of encapsulation (preventing styles from being applied globally and rather scope them to the components).

Note: I'm specifically not asking for a Primer Angular implementation, because I figure GitHub has no reason to maintain that. I'm rather asking for a better way to allow arbitrary frameworks to provide components using Primer CSS.

Describe the solution you'd like

If all styles were exposed as mixins (and then separately as classes including those mixins to retain what Primer currently exposes), wrapper components could easily include those mixins.

Describe alternatives you've considered

From the looks of it, Primer React doesn't use Primer CSS at all, but rather duplicates all styles. This is an obvious alternative, but it should be just as obvious why that is far from ideal and produces much more overhead than just wrapping CSS classes into components.

Additional context

Airblader avatar Feb 18 '22 10:02 Airblader

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.

github-actions[bot] avatar Aug 17 '22 11:08 github-actions[bot]