-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(makeStyles): add an ability to increase specificity #16232
Conversation
@@ -1,7 +1,17 @@ | |||
import { compile, middleware, serialize, stringify } from 'stylis'; | |||
import { hyphenateProperty } from './utils/hyphenateProperty'; | |||
|
|||
export function compileCSS(className: string, selector: string, property: string, value: number | string): string { | |||
function repeatSelector(selector: string, times: number) { | |||
return new Array(times + 2).join(selector); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-O
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 6496b18:
|
Perf AnalysisNo significant results to display. All results
Perf Analysis (Fluent)Perf comparison
Perf tests with no regressions
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 81651e8f3c1ea57df77214a50eb47fe5a816a236 (build) |
7c06620
to
611b165
Compare
🎉 Handy links: |
😕Problem
With atomic classes in Northstar components it's impossible to use
makeStyles
for overrides as Fela produces also atomic classes for us. The idea of implementation is taken from robinweser/fela#827.unstable_cssPriority
is added tomakeStyles
, however it should be not present in framework (React) specific implementation.For example, it will output:
This allows overrides to win over Fela classes due higher specificity.