Repository navigation
fix: skills - Address the CodeRabbit findings on the theme token stack #4044
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
base: fix/git-2758-site-tokens-numeric-slugs
Are you sure you want to change the base?
Changes from all commits
0e79d0c
e5ba9b5
2af628a
295f46d
ca9dbc6
0f52f2b
9ccbee9
a1d90c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -735,8 +735,11 @@ export class TokenProposer { | |
| } | ||
| const texts = new Map<string, number>(); | ||
| const fills: string[] = []; | ||
| // Compare colours, not token names: a fill that also matches `contrast` resolves | ||
| // to that name, while the action background can be a family step of the same value. | ||
| const fillValue = primitives[fill.token]; | ||
| for (const [fillHex, onFill] of buttonText) { | ||
| if (this.nearestPrimitive(fillHex, primitives) !== fill.token) { | ||
| if (primitives[this.nearestPrimitive(fillHex, primitives)] !== fillValue) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| continue; | ||
| } | ||
| fills.push(fillHex); | ||
|
|
@@ -1159,17 +1162,17 @@ export class TokenProposer { | |
| ); | ||
| indexes.push(Math.max(nearest, indexes.length ? indexes[indexes.length - 1] + 1 : 0)); | ||
| } | ||
| let shifted = false; | ||
| const moved: string[] = []; | ||
| for (let i = indexes.length - 1; i >= 0; i--) { | ||
| const ceiling = i === indexes.length - 1 ? last : indexes[i + 1] - 1; | ||
| if (indexes[i] > ceiling) { | ||
| indexes[i] = ceiling; | ||
| shifted = true; | ||
| moved.unshift(`${kept[i].max}px to \`${SPACING_STEPS[ceiling].slug}\``); | ||
| } | ||
| } | ||
| if (shifted) { | ||
| if (moved.length) { | ||
| this.decisions.push( | ||
| 'Some spacing values moved down to free lower steps so the whole 5 to 100 ladder is used and none is dropped.' | ||
| `Some spacing values moved down to a free lower step so none is dropped: ${moved.join(', ')}.` | ||
| ); | ||
| } | ||
| const steps: ScaleEntry[] = kept.map((c, i) => ({ | ||
|
|
||
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.
Script executed:
Repository: lightspeedwp/.github
Length of output: 3520
Script executed:
Repository: lightspeedwp/.github
Length of output: 25747
Script executed:
Repository: lightspeedwp/.github
Length of output: 18012
Do not apply another mode’s stack to
Sans Serif.If one mode uses
Robotoand the description containsCSS stack: Roboto, sans-serif, aSans Serifvariation also receives the Roboto stack. It previously used a sans-serif fallback.Avoid using a stack that belongs to another mode’s named family. Preserve declared system stacks for generic families.