Skip to content
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

Update the color of rationales #797

Merged
merged 3 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nervous-camels-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": minor
---

Change the rational color in radio widget
Original file line number Diff line number Diff line change
Expand Up @@ -3638,7 +3638,7 @@ exports[`single-choice question reviewMode: true should snapshot the same: first
</button>
</div>
<div
class="perseus-radio-rationale-content rationale_1w3tmyh"
class="perseus-radio-rationale-content rationale_1ctj0s0"
data-test-id="perseus-radio-rationale-content-0"
>
<div
Expand Down Expand Up @@ -3834,7 +3834,7 @@ exports[`single-choice question reviewMode: true should snapshot the same: first
</button>
</div>
<div
class="perseus-radio-rationale-content rationale_1w3tmyh"
class="perseus-radio-rationale-content rationale_1ctj0s0"
data-test-id="perseus-radio-rationale-content-1"
>
<div
Expand Down Expand Up @@ -4014,7 +4014,7 @@ exports[`single-choice question reviewMode: true should snapshot the same: first
</button>
</div>
<div
class="perseus-radio-rationale-content rationale_1w3tmyh"
class="perseus-radio-rationale-content rationale_1ctj0s0"
data-test-id="perseus-radio-rationale-content-2"
>
<div
Expand Down Expand Up @@ -4195,7 +4195,7 @@ exports[`single-choice question reviewMode: true should snapshot the same: first
</button>
</div>
<div
class="perseus-radio-rationale-content rationale_1w3tmyh"
class="perseus-radio-rationale-content rationale_1ctj0s0"
data-test-id="perseus-radio-rationale-content-3"
>
<div
Expand Down
1 change: 1 addition & 0 deletions packages/perseus/src/widgets/radio/choice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ const styles = StyleSheet.create({
padding: intermediateCheckboxPadding,
paddingTop: 0,
marginLeft: 54,
color: Color.offBlack64,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two references to rationales in our .less styles:

  1. .text(@choiceTextSize, @choiceLineHeight, @gray17);
  2. .text(@choiceTextSize, @choiceLineHeight, @gray17);

These are in Article styles. Just wanted to check if you verified this in Articles. The styles you've added here likely override those .less styles, but it might be useful to clean them up just so we don't introduce a regression at some point in the future if we move this color style for some reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm nervous to take these out because I'm afraid of strange CSS-at-a-distance meaning that these are used in ways I don't understand in prod.

[mediaQueries.smOrSmaller]: {
padding: intermediateCheckboxPaddingPhone,
paddingTop: 0,
Expand Down
Loading